-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
33 lines (31 loc) · 996 Bytes
/
.pre-commit-config.yaml
File metadata and controls
33 lines (31 loc) · 996 Bytes
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
repos:
# Code Quality - Run on COMMIT
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.4
hooks:
# Format first (fixes many lint issues automatically)
- id: ruff-format
name: Format code with ruff
exclude: '^\.vulture_whitelist\.py$'
stages: [pre-commit]
# Then lint (on formatted code)
- id: ruff
name: Run ruff linter
args:
- --fix
- --exit-non-zero-on-fix
exclude: '^\.vulture_whitelist\.py$'
stages: [pre-commit]
# Dead Code Detection - Run on COMMIT (BLOCKS if found)
- repo: https://github.com/jendrikseipp/vulture
rev: v2.14
hooks:
- id: vulture
name: Find dead code with vulture (STRICT)
args:
- 'src/'
- '.vulture_whitelist.py'
- '--min-confidence=80'
- '--exclude=tests/'
stages: [pre-commit]
# BLOCKS commit if dead code found - add to whitelist if intentional