-
Notifications
You must be signed in to change notification settings - Fork 234
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
58 lines (56 loc) · 1.7 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
58 lines (56 loc) · 1.7 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
default_install_hook_types:
- pre-commit
- commit-msg
repos:
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.25.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies:
- "@commitlint/config-conventional@20.4.1"
- repo: local
hooks:
- id: spdx-headers
name: SPDX headers (auto-add)
entry: python .hooks/add_spdx_headers.py
language: system
types: [python]
stages: [pre-commit]
- id: ruff-fix
name: ruff (auto-fix, non-blocking)
entry: bash -c 'ruff check --fix . || true'
language: system
types: [python]
pass_filenames: false
stages: [pre-commit]
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --all --check
language: system
files: ^(Cargo\.toml|Cargo\.lock|crates/.*\.rs)$
pass_filenames: false
stages: [pre-commit]
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --workspace --all-targets -- -D warnings
language: system
files: ^(Cargo\.toml|Cargo\.lock|crates/.*\.rs)$
pass_filenames: false
stages: [pre-commit]
- id: mypy
name: mypy (strict, non-blocking)
entry: bash -c 'mypy --config-file=pyproject.toml switchyard/ || true'
language: system
types: [python]
pass_filenames: false
verbose: true
stages: [pre-commit]
- id: pyright
name: pyright (non-blocking)
entry: bash -c 'pyright switchyard/ || true'
language: system
types: [python]
pass_filenames: false
verbose: true
stages: [pre-commit]