Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
65 lines (58 loc) · 1.83 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
65 lines (58 loc) · 1.83 KB
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
minimum_pre_commit_version: "4.4.0"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: [ --fix=lf ]
- id: check-merge-conflict
- id: check-case-conflict
- id: check-added-large-files
exclude: ^(assets/banner\.png|docs/public/cmakefmt\.gif|docs/public/og-image\.png)$
- id: check-json
- id: check-yaml
exclude: ^packaging/conda-forge/meta\.yaml$
- id: check-toml
- id: detect-private-key
- id: check-executables-have-shebangs
- repo: https://github.com/rhysd/actionlint
rev: v1.7.8
hooks:
- id: actionlint
- repo: https://github.com/fsfe/reuse-tool
rev: v6.2.0
hooks:
- id: reuse
# benches/cmakefmt-* is for locally-extracted prior-release binaries
# used for ad-hoc perf comparison (see benches/version-trend-datapoint.sh).
# They are not part of the repo and never tracked.
exclude: ^(\.pre-commit-cache/|benches/repos/|benches/cmakefmt-[^/]+/)
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt --all
entry: cargo
args: [ fmt, --all ]
language: system
pass_filenames: false
- id: check-docs
name: check docs
entry: bash scripts/check-docs.sh
language: system
pass_filenames: false
- id: cargo-clippy
name: cargo clippy --all-targets -- -D warnings
entry: cargo
args: [ clippy, --all-targets, --, -D, warnings ]
language: system
pass_filenames: false
stages: [ pre-push ]
- id: cargo-test
name: cargo test
entry: cargo
args: [ test ]
language: system
pass_filenames: false
stages: [ pre-push ]