-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
66 lines (59 loc) · 1.88 KB
/
.pre-commit-config.yaml
File metadata and controls
66 lines (59 loc) · 1.88 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
65
66
# Pre-commit hooks for RAG-Templates
# Install with: pre-commit install
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
# Python formatting
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3.12
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
# Custom local hooks for compliance
- repo: local
hooks:
# TDD compliance check for contract tests
- id: tdd-compliance
name: TDD Compliance Check
entry: python scripts/validate_tdd_compliance.py
language: python
files: 'tests/contract/.*\.py$|tests/.*_contract\.py$'
pass_filenames: false
additional_dependencies: [GitPython]
verbose: true
# This is a warning only - won't block commits
always_run: false
# Task mapping validation
- id: task-mapping
name: Requirement-Task Mapping Check
entry: python scripts/validate_task_mapping.py
language: python
files: '(spec|tasks)\.md$'
pass_filenames: false
verbose: true
# This is a warning only - won't block commits
always_run: false
# Check for good error messages in new tests
- id: error-message-quality
name: Error Message Quality Reminder
entry: echo "Remember to use three-part error messages (what/why/action) in test assertions!"
language: system
files: 'tests/.*\.py$'
pass_filenames: false
always_run: false
# Configuration
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [commit]