Debian Codegraph @

.pre-commit-config.yaml

raw
1 # run all hooks with:
2 # pre-commit run --hook-stage manual --all
3 ci:
4 skip:
5 # pre-commit.ci doesn't have Rust installed
6 - cargo-fmt
7 - cargo-deny
8
9 repos:
10 - repo: local
11 hooks:
12 - id: cargo-fmt # rustup component add rustfmt
13 name: cargo fmt
14 entry: cargo fmt --all --
15 language: system
16 types: [rust]
17 pass_filenames: false
18
19 - id: cargo-deny # cargo install --locked cargo-deny
20 name: cargo deny
21 entry: cargo deny --all-features check --
22 language: system
23 pass_filenames: false
24
25 - id: cargo-check
26 name: cargo check
27 entry: cargo check --all-features --all-targets --
28 language: system
29 pass_filenames: false
30 types: [rust]
31 stages: [manual] # because it's slow
32
33 - id: cargo-clippy # rustup component add clippy
34 name: cargo clippy
35 entry: cargo clippy --tests --all-features -- -D warnings
36 language: system
37 pass_filenames: false
38 types: [rust]
39 stages: [manual] # because it's slow
40 - repo: https://github.com/pre-commit/pre-commit-hooks
41 rev: v6.0.0
42 hooks:
43 - id: check-yaml
44 - id: check-toml
45 - id: end-of-file-fixer
46 exclude: |
47 (?x)(
48 (^sysconfig/)|
49 (.*\.stdout)
50 )
51 - id: trailing-whitespace
52 exclude: |
53 (?x)(
54 (^sysconfig/)|
55 (.*\.stdout)
56 )
57 - id: mixed-line-ending
58 - repo: https://github.com/astral-sh/ruff-pre-commit
59 rev: v0.12.10
60 hooks:
61 - id: ruff-format
62 - id: ruff
63 - repo: https://github.com/pre-commit/mirrors-mypy
64 rev: v1.17.1
65 hooks:
66 - id: mypy
67 entry: mypy maturin/
68 pass_filenames: false
69 - repo: https://github.com/codespell-project/codespell
70 rev: v2.4.1
71 hooks:
72 - id: codespell