-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
108 lines (106 loc) · 4.69 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
108 lines (106 loc) · 4.69 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
default_language_version:
python: python3
exclude: 'dotnet'
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_schedule: 'monthly'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
hooks:
- id: check-added-large-files
exclude: 'listmonk_api/skills/.*-docs/'
- id: check-ast
- id: check-yaml
args: ["--unsafe"]
- id: check-toml
- id: check-json
- id: fix-byte-order-marker
exclude: .gitignore
- id: check-merge-conflict
- id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
- id: no-commit-to-branch
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 1986670a8c4578a526ad3dddee3b35d9cfb9d7be # v0.3.4
hooks:
- id: ruff
exclude: ^(tests/|test/|scripts/|script/)
types_or: [ python, pyi, jupyter ]
args: ["--fix", "--ignore=E402"]
- repo: https://github.com/codespell-project/codespell
rev: 63c8f8312b7559622c0d82815639671ae42132ac # v2.4.1
hooks:
- id: codespell
args: ["-L", "nam,tread,ot,"]
exclude: |
(?x)^(
\./test/.*|
\./tests/.*|
listmonk_api/skills/.*-docs/.*
)$
- repo: https://github.com/nbQA-dev/nbQA
rev: d31b7eae1767c43460afb3ba130e0a6602933abe # 1.9.1
hooks:
- id: nbqa-ruff
exclude: ^(tests/|test/|scripts/|script/)
- repo: local
hooks:
- id: okf-no-legacy-concepts
name: OKF-CIS — no legacy CONCEPT ids
entry: bash -c 'repo=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)"); root=${AGENT_UTILITIES_ROOT:-"$(dirname "$repo")/agent-utilities"}; python3 "$root/scripts/check_no_legacy_markers.py" . "$@"' --
language: system
pass_filenames: false
always_run: true
- id: check-mermaid
name: Check Mermaid syntax
entry: bash -c 'repo=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)"); root=${AGENT_UTILITIES_ROOT:-"$(dirname "$repo")/agent-utilities"}; python3 "$root/scripts/mermaid_linter.py" "$@"' --
language: system
files: \.md$
pass_filenames: true
- id: lane-guard
name: Lane guard — canonical checkout read-only + stray CARGO_TARGET_DIR (D-CP-3/D-CP-4 reach)
entry: bash -c 'repo=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)"); root=${AGENT_UTILITIES_ROOT:-"$(dirname "$repo")/agent-utilities"}; python3 "$root/scripts/check_lane_guard.py"'
language: system
pass_filenames: false
always_run: true
- id: check-stubs
name: Check for Active Stubs and TODOs
entry: bash -c 'repo=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)"); root=${AGENT_UTILITIES_ROOT:-"$(dirname "$repo")/agent-utilities"}; python3 "$root/scripts/check_stubs.py" "$@"' --
language: system
types: [python]
- id: mcp-readme-table
name: sync MCP tools table in README
entry: |-
bash -c 'if [ -f uv.lock ]; then uv run python -m agent_utilities.mcp.readme_tools; else python -m agent_utilities.mcp.readme_tools; fi'
language: system
files: ^(README\.md|.*/mcp_server\.py|.*/mcp/.*\.py)$
pass_filenames: false
- id: readme-env-vars
name: sync env-vars table in README
entry: |-
bash -c 'if [ -f uv.lock ]; then uv run python -m agent_utilities.mcp.readme_env_vars; else python -m agent_utilities.mcp.readme_env_vars; fi'
language: system
files: ^(README\.md|\.env\.example)$
pass_filenames: false
- id: readme-mcp-examples
name: sync mcp_config examples in README + env blocks
entry: |-
bash -c 'if [ -f uv.lock ]; then uv run python -m agent_utilities.mcp.readme_mcp_examples; else python -m agent_utilities.mcp.readme_mcp_examples; fi'
language: system
files: ^(README\.md|\.env\.example|mcp_config.*\.json|.*/mcp_config.*\.json|.*/mcp_server\.py)$
pass_filenames: false
- id: env-var-drift
name: check env-var/config drift
entry: bash -c 'if [ -f uv.lock ]; then uv run python -m agent_utilities.mcp.check_env_var_drift --check; else python -m agent_utilities.mcp.check_env_var_drift --check; fi'
language: system
pass_filenames: false
files: ^(README\.md|\.env\.example|mcp_config.*\.json|.*/mcp_config.*\.json|docker/.*compose.*\.ya?ml|.*/auth\.py|.*/mcp_server\.py)$
- id: security-sanitizer
name: Security and Garbage Sanitizer
entry: python scripts/security_sanitizer.py
language: python
pass_filenames: false
always_run: true