-
-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (54 loc) · 1.35 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
61 lines (54 loc) · 1.35 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-toml
name: check toml files
- id: check-yaml
name: check yaml files
# https://docs.rs/cargo-deny/latest/cargo_deny/#pre-commit-hook
- repo: https://github.com/EmbarkStudios/cargo-deny
rev: 0.19.0 # choose your preferred tag
hooks:
- id: cargo-deny
args: ["check"]
- repo: local
hooks:
# rust codes
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --all -- --check
language: system
pass_filenames: false
types: [rust]
- id: cargo-check
name: cargo check
entry: cargo check
language: system
pass_filenames: false
types: [rust]
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy -- -D warnings
language: system
pass_filenames: false
types: [rust]
- id: cargo-clippy-python
name: cargo clippy python
entry: cargo --features python -- -D warnings
language: system
pass_filenames: false
types: [rust]
- repo: https://github.com/allganize/ty-pre-commit
rev: v0.0.18
hooks:
# Run the type checker.
- id: ty-check
exclude: .*test.*.py$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.5
hooks:
- id: ruff-check
args: [--fix]
# Run the formatter.
- id: ruff-format