-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpre-commit-config.yaml
More file actions
63 lines (55 loc) · 1.57 KB
/
pre-commit-config.yaml
File metadata and controls
63 lines (55 loc) · 1.57 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
62
63
# Pre-commit hooks - Enforce quality BEFORE commit
# These run automatically on every commit
repos:
# Python code formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# Type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
additional_dependencies: [types-all]
args: [--strict, --ignore-missing-imports]
# Security checks
- repo: https://github.com/PyCQA/bandit
rev: 1.8.0
hooks:
- id: bandit
args: [-r, claude_parser]
# Check for large files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=500]
- id: check-json
- id: check-yaml
- id: check-merge-conflict
- id: check-case-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
# Test coverage enforcement
- repo: local
hooks:
- id: pytest-coverage
name: pytest with coverage
entry: pytest tests/ --cov=claude_parser --cov-fail-under=90 --cov-report=term-missing
language: system
pass_filenames: false
always_run: true
- id: validate-spec
name: validate specification compliance
entry: python verify_spec.py
language: system
pass_filenames: false
always_run: true
# Configuration
default_language_version:
python: python3.11
fail_fast: false # Run all hooks even if one fails
verbose: true # Show output