-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
85 lines (79 loc) · 3.42 KB
/
.pre-commit-config.yaml
File metadata and controls
85 lines (79 loc) · 3.42 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# =============================================================================
# Pre-commit Configuration
# =============================================================================
# Foundation hooks for local development. Install with:
# pip install pre-commit && pre-commit install --hook-type commit-msg --hook-type pre-push
#
# Run manually: pre-commit run --all-files
# Update hooks: pre-commit autoupdate
# =============================================================================
repos:
# ---------------------------------------------------------------------------
# Base hooks - standard file hygiene
# ---------------------------------------------------------------------------
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
name: Validate YAML syntax
- id: check-json
name: Validate JSON syntax
- id: end-of-file-fixer
name: Fix end-of-file newlines
exclude: '^\.github/(aw/imports/|workflows/.*\.lock\.yml$)'
- id: trailing-whitespace
name: Trim trailing whitespace
exclude: '^\.github/(aw/imports/|workflows/.*\.lock\.yml$)'
- id: check-case-conflict
name: Check for case conflicts
- id: check-merge-conflict
name: Check for merge conflict markers
- id: mixed-line-ending
name: Normalize line endings
args: [--fix=lf]
# ---------------------------------------------------------------------------
# Markdown linting
# ---------------------------------------------------------------------------
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.20.0
hooks:
- id: markdownlint-cli2
name: Lint markdown files
exclude: '^\.github/(aw/imports/|workflows/.*\.lock\.yml$)'
# ---------------------------------------------------------------------------
# Commit message validation (commit-msg stage)
# ---------------------------------------------------------------------------
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.24.0
hooks:
- id: commitlint
name: Validate commit message format
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional@20.4.1"]
- repo: https://github.com/commit-check/commit-check
rev: v2.4.1
hooks:
- id: check-branch
name: Check branch naming conventions
stages: [pre-push]
# ---------------------------------------------------------------------------
# File size enforcement
# ---------------------------------------------------------------------------
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
name: Check file sizes
args: ['--maxkb=10']
exclude: '^\.github/(aw/imports/|workflows/.*\.lock\.yml$)'
# ---------------------------------------------------------------------------
# Agent Skills validation (agentskills.io spec)
# ---------------------------------------------------------------------------
- repo: local
hooks:
- id: validate-skills
name: Validate agent skills (agentskills.io)
entry: bash -c 'for d in $(find . -name "SKILL.md" -path "*/skills/*" -not -path "./.github/*" -exec dirname {} \;); do agentskills validate "$d" || exit 1; done'
language: system
pass_filenames: false
files: 'skills/.*SKILL\.md$'