-
Notifications
You must be signed in to change notification settings - Fork 318
/
.pre-commit-config.yaml
76 lines (69 loc) · 1.86 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
repos:
- repo: local
hooks:
- id: bazel_buildifier
name: Auto format Bazel build files.
stages: [commit]
entry: bazel run //:buildifier
files: \.bazel|\.bzl$
language: system
- id: bazel_shfmt_format
name: Auto format shell files
stages: [commit]
entry: bazel run //:shfmt-format
files: \.sh$
language: system
- id: bazel_ruff_format
name: Auto format Python files
stages: [commit]
entry: bazel run //:ruff-format
files: \.py$
language: system
- id: bazel_ormolu_format
name: Auto format Haskell files
stages: [commit]
entry: bazel run //:ormolu-format
files: \.hs|\.lhs$
language: system
- id: bazel_rust_format
name: Auto format Rust files
stages: [commit]
entry: bazel run //:rustfmt
files: \.rs$
language: system
- id: bazel_smoke
name: Run all bazel test smoke targets
entry: bazel test --config=precommit //...
pass_filenames: false
language: system
always_run: true
# 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: 17101bf5cebeda988b13764909a6140badc5ef03
hooks:
- id: nixpkgs-fmt
exclude: |
(?x)^(
.*/Cargo\.nix|
experimental/.*
)$
- id: rustfmt
exclude: |
(?x)(
experimental/|
rust_canisters/|
nix/overlays/|
gitlab-ci/|
crypto/internal/crypto_lib/fs_ni_dkg/miracl_core
) # exclude these directories.
- repo: https://github.com/willthames/ansible-lint.git
rev: v4.2.0
hooks:
- id: ansible-lint
always_run: false
files: (^|/)testnet/.+\.(yaml|yml)$
exclude: |
(?x)^(
testnet/tests/.*|.*/docker-compose.yml|testnet/env/shared-config\.yml
)$