-
Notifications
You must be signed in to change notification settings - Fork 317
/
.pre-commit-config.yaml
60 lines (53 loc) · 1.43 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
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_protobuf_format
name: Auto format Protobuf files
stages: [commit]
entry: bazel run //:protobuf-format
files: \.proto$
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
verbose: true
- id: bazel_rust_format_check
name: Run rust format check
entry: bazel build --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect --output_groups=rustfmt_checks //...
pass_filenames: false
language: system
always_run: true
verbose: true