Skip to content

Commit c386733

Browse files
Support pre-commit (#397)
1 parent 795e7f4 commit c386733

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pre-commit:
10+
strategy:
11+
matrix:
12+
go-version: [ 1.19.x ]
13+
platform: [ ubuntu-latest ]
14+
runs-on: ${{ matrix.platform }}
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v3
18+
- uses: pre-commit/action@v3.0.0
19+
with:
20+
extra_args: -c .pre-commit-config.yaml

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
exclude: |
8+
(?x)^(
9+
.*.key|
10+
.*.bin|
11+
.*.abi|
12+
.*/address
13+
)$
14+
- id: trailing-whitespace

0 commit comments

Comments
 (0)