-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.pre-commit-config.yaml
85 lines (77 loc) · 2.3 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
args: ["--maxkb=1000"]
- id: check-ast
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/shutter-network/pre-commit-go-hooks
rev: "ed735ca2048f831625cd155cf6a38b4a42d79d9b"
hooks:
- id: go-mod-tidy
name: Run go mod tidy in shuttermint
args: ["./shuttermint"]
- id: go-mod-tidy
name: Run go mod tidy in shlib
args: ["./shlib"]
- id: gci
args:
[
"--custom-order",
"-sStandard",
"-sDefault",
"-sPrefix(github.com/shutter-network/shutter)",
]
exclude: |
(?x)(
^shuttermint/contract/binding\.go$|
^shuttermint/shmsg/.*\.pb\.go$|
^shuttermint/shcryptowasm/.*_wasm\.go$
)
- id: gofumpt
exclude: |
(?x)(
^shuttermint/contract/binding\.go$|
^shuttermint/shmsg/.*\.pb\.go$|
^shuttermint/shcryptowasm/.*_wasm\.go$
)
# CircleCI stop here
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.1
hooks:
- id: prettier
additional_dependencies:
["prettier@2.3.1", "prettier-plugin-solidity@1.0.0-beta.13"]
args: ["--plugin=prettier-plugin-solidity"]
exclude: "^contracts/openzeppelin/.*"
- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
- id: black
additional_dependencies: ["click==8.0.1"]
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/sqlalchemyorg/zimports
rev: 38c16831e6ee709aa9b4395b9b1efb6ed4d6ad8c
hooks:
- id: zimports
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
entry: tools/pre-commit-wrapper.py mypy
additional_dependencies: ["pip-tools==6.2.0"]
files: "^(contracts/tests/.*|noxfile.py)$"