-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
72 lines (64 loc) · 2.46 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
72 lines (64 loc) · 2.46 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
# Local commit gate. Every hook here mirrors a step in .github/workflows/ci.yml,
# so a clean `pre-commit run --all-files` means CI will not fail on lint or drift.
# The bats suite is the deliberate exception — it runs in CI and via `just test`,
# not on every commit.
repos:
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.10.0-1
hooks:
- id: shfmt
args: ["-i", "2", "-bn", "-sr", "-d"]
# CI lints `*.sh` only. Without this, pre-commit also picks up `.bats`
# files, which shfmt formats differently and CI never sees.
files: \.sh$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ["--shell=bash"]
files: \.sh$
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.17.0
hooks:
- id: markdownlint-cli2
- repo: local
hooks:
# Prettier runs from this repo's pinned devDependency rather than
# pre-commit/mirrors-prettier. The mirror pins its own (older) prettier,
# and the two disagree on Markdown tables containing `|` inside code
# spans: the mirror rewrites files that CI's prettier considers clean.
- id: prettier
name: prettier (repo devDependency, matches CI)
entry: npx prettier --check
language: system
types_or: [markdown]
- id: template-drift
name: principled-docs template drift check
entry: bash plugins/principled-docs/skills/scaffold/scripts/check-template-drift.sh
language: system
pass_filenames: false
always_run: true
- id: cross-plugin-drift
name: cross-plugin script drift check (check-gh-cli.sh)
entry: bash scripts/check-cross-plugin-drift.sh
language: system
pass_filenames: false
always_run: true
- id: skill-references
name: skill and hook reference integrity
entry: bash scripts/check-skill-references.sh
language: system
pass_filenames: false
always_run: true
- id: pipeline-audit
name: pipeline audit (numbering, linkage, statuses, supersession)
entry: bash scripts/pipeline-audit.sh
language: system
pass_filenames: false
always_run: true
- id: validate-root
name: root documentation structure
entry: bash plugins/principled-docs/lib/validate-structure.sh --root
language: system
pass_filenames: false
always_run: true