-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
83 lines (77 loc) · 2.21 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
default_language_version:
python: python3
default_stages: [pre-push]
exclude: '^Cargo\.lock$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: no-commit-to-branch
stages: [pre-commit]
# The following repo is maintained by us at
# https://gitlab.com/dfinity-lab/open/pre-commit-tools.
- repo: https://gitlab.com/dfinity-lab/open/pre-commit-tools.git
rev: 65e8990328b0651ab00d5653d26535d4080ca5f3
hooks:
- id: shfmt
args: ["-w", "-i", "4", "-bn", "-ci"]
- id: nixpkgs-fmt
exclude: |
(?x)^(
.*/Cargo\.nix|
experimental/.*
)$
- id: rustfmt
- id: ormolu
- repo: https://github.com/ambv/black
rev: 24.3.0
hooks:
- id: black
additional_dependencies: ["click==8.0.4"]
exclude: |
(?x)^(
release-controller/release_index.py
)$
args:
- --line-length=120
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
exclude: |
(?x)^(
release-controller/release_index.py
)$
args:
- --application-directories=.:gitlab-ci/src/
- repo: https://github.com/pycqa/flake8
rev: "7.0.0"
hooks:
- id: flake8
args: ["--config=flake8.cfg"]
- repo: https://github.com/pycqa/pydocstyle
rev: 5.1.1
hooks:
- id: pydocstyle
exclude: |
(?x)^(
release-controller/release_index.py
)$
args:
- --ignore=D100,D103,D104,D203,D212
# The default for pydocstyle is to match only on files that end in .py,
# even if pre-commit specifies other files. This makes it so Python
# files will be recognized regardless of extension.
- --match=.*
- repo: local
hooks:
- id: release-index-checks
language: script
name: release-index-checks
verbose: true
entry: bin/release-index-checks.sh
- id: cargo-deny-checks
language: script
name: Cargo deny checks
verbose: true
entry: scripts/cargo-deny-checks.py