-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
64 lines (57 loc) · 2.21 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
64 lines (57 loc) · 2.21 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
64
# Pre-commit hooks for CoreRag
# Install: pip install pre-commit && pre-commit install
# Version: 2 (2026-03-16)
#
# Standard hooks enforced across the portfolio. Projects may add
# project-specific hooks below the "# === Project-specific ===" marker.
repos:
# ── Baseline file hygiene ──────────────────────────────────────
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=500']
# ── Python lint + format (ruff replaces black + isort) ─────────
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.4
hooks:
- id: ruff
args: ['--fix']
- id: ruff-format
# ── Type checking (informational — does not block commit) ──────
- repo: local
hooks:
- id: mypy
name: mypy (informational)
entry: bash -c './venv/bin/mypy --strict --ignore-missing-imports "$@" || true' --
language: system
types: [python]
verbose: true
# ── Security scanning ──────────────────────────────────────────
- repo: https://github.com/PyCQA/bandit
rev: 1.8.2
hooks:
- id: bandit
args: ['-r', '--skip', 'B101']
- repo: local
hooks:
- id: security-scan
name: Security Scanner (staged files)
entry: bash -c './scripts/security_scan.sh --staged || true'
language: system
pass_filenames: false
always_run: true
# ── Dependency health ──────────────────────────────────────────
- repo: local
hooks:
- id: pip-check
name: pip dependency check
entry: bash -c 'if [ -f ./venv/bin/pip ]; then ./venv/bin/pip check || true; else pip check || true; fi'
language: system
always_run: true
pass_filenames: false
files: 'requirements.*\.txt$'
# === Project-specific hooks below this line ===