-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
28 lines (26 loc) · 1.21 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
28 lines (26 loc) · 1.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
# Pre-commit-Hooks für AI_docs. Aktivieren: pip install pre-commit && pre-commit install
# Danach laufen die Checks bei jedem Commit über die geänderten Dateien.
repos:
- repo: local
hooks:
# out/ ist ein gitignorierter Staging-Ordner — Dateien daraus werden nie
# gestaged, ein Hook darauf würde nie feuern. Die Validierung echter out/-Docs
# passiert lokal beim Erzeugen (new_doc.py --validate). Hier prüfen wir nur die
# versionierten Beispiel-Dokumente, damit das Schema selbst sauber bleibt.
- id: validate-frontmatter
name: Frontmatter gegen Schema validieren
entry: python scripts/validate.py
language: system
files: '^tests/fixtures/valid/.*\.md$'
- id: sync-fields
name: Rule-Felder mit Schema in Sync
entry: python scripts/sync_fields.py --check
language: system
pass_filenames: false
files: '^(schemas/frontmatter\.yaml|rules/.*\.md|templates/.*\.md)$'
- id: validate-config
name: config.yaml & Schema konsistent
entry: python scripts/validate_config.py
language: system
pass_filenames: false
files: '^(config\.yaml|schemas/frontmatter\.yaml|rules/|templates/)'