Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (53 loc) · 1.82 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
61 lines (53 loc) · 1.82 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
# Mechanical checks of the rules in AGENTS.md. `just bootstrap` installs these
# as git hooks (pre-commit and commit-msg) in .git/hooks.
repos:
- repo: local
hooks:
- id: no-em-dashes
stages: [pre-commit]
name: no em dashes in text files
entry: sh scripts/check-no-em-dashes.sh
language: system
pass_filenames: false
- id: code-layout
stages: [pre-commit]
name: code layout follows the AGENTS.md paragraph rules
entry: uv run python scripts/check-layout.py
language: system
types_or: [python, rust]
- id: user-text
stages: [pre-commit]
name: text users see names no design section, phase or ADR
entry: uv run python scripts/check-user-text.py
language: system
types_or: [python, rust]
- id: user-docs
stages: [pre-commit]
name: user pages describe what Muru does, not what is to come
entry: uv run python scripts/check-user-docs.py
language: system
files: ^docs/.*\.md$
- id: commit-message
name: commit message has no agent attribution
entry: sh scripts/check-commit-message.sh
language: system
stages: [commit-msg]
- id: ruff-format
stages: [pre-commit]
name: ruff format
entry: uv run ruff format
language: system
types: [python]
- id: ruff-check
stages: [pre-commit]
name: ruff check
entry: uv run ruff check --fix
language: system
types: [python]
- id: rustfmt
stages: [pre-commit]
name: rustfmt
entry: sh -c 'if command -v cargo >/dev/null 2>&1; then cargo fmt --all; else echo "cargo not found; skipping rustfmt"; fi'
language: system
types: [rust]
pass_filenames: false