-
Notifications
You must be signed in to change notification settings - Fork 22
/
.pre-commit-config.yaml
79 lines (78 loc) · 2.42 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
77
78
79
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 # Use the ref you want to point at
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: detect-private-key
#- id: end-of-file-fixer
#- id: trailing-whitespace
- id: fix-byte-order-marker
- id: mixed-line-ending
# Python-specific
- id: check-ast
- id: check-docstring-first
- id: debug-statements
- repo: local
hooks:
- id: cargo-fmt
name: cargo format
description: Format rust code with `cargo fmt`.
entry: cargo fmt --all -- --check
language: system
files: \.rs$
pass_filenames: false
- id: cargo-check
name: cargo check
description: Check rust code with `cargo check`.
entry: cargo check --all --all-features --workspace
language: system
files: \.rs$
pass_filenames: false
- id: cargo-test
name: cargo test
description: Run tests with `cargo test`.
entry: cargo test --all-features -p quizx
language: system
files: \.rs$
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
description: Run clippy lints with `cargo clippy`.
entry: cargo clippy --all-features --all-targets --workspace -- -D warnings
language: system
files: \.rs$
pass_filenames: false
- id: ruff format
name: ruff format
description: Format python code with `ruff format`.
entry: uv run ruff format
language: system
files: \.py$
pass_filenames: false
- id: ruff lint
name: ruff lint
description: Lint python code with `ruff lint`.
entry: uv run ruff check
language: system
files: \.py$
pass_filenames: false
- id: mypy
name: mypy
description: Run mypy type checker.
entry: uv run mypy pybindings
language: system
files: \.py$
pass_filenames: false
- id: cargo-doc
name: cargo doc
description: Generate documentation with `cargo doc`.
entry: cargo doc --no-deps --all-features --workspace
language: system
files: \.rs$
pass_filenames: false