-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
50 lines (44 loc) · 1.66 KB
/
.pre-commit-config.yaml
File metadata and controls
50 lines (44 loc) · 1.66 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
# See https://pre-commit.com for more information
# Install: pip install pre-commit && pre-commit install
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
- id: check-merge-conflict
- id: check-added-large-files
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.38.0
hooks:
- id: markdownlint
args: ["--fix"]
exclude: ^tests/
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.6.0
hooks:
- id: cspell
args: ["--no-progress", "--no-summary"]
exclude: ^tests/
# Conventional commits for semver
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
# Local AISD format validation
- repo: local
hooks:
- id: aisd-forbidden-words
name: AISD forbidden words check
entry: bash -c 'if grep -rn -E "\b(should|might|could|typically|usually|often)\b" "$@" 2>/dev/null; then echo "❌ Found forbidden words. Use MUST/REQUIRED/FORBIDDEN instead."; exit 1; fi' --
language: system
files: \.(md)$
exclude: ^(README\.md|CHANGELOG\.md|AGENTS\.md|tests/)
- id: aisd-line-count
name: AISD line count check (max 600)
entry: bash -c 'for file in "$@"; do lines=$(wc -l < "$file"); if [ $lines -gt 600 ]; then echo "❌ $file has $lines lines (max 600). Consider splitting."; exit 1; fi; done' --
language: system
files: ^(docs|spec)/.*\.md$