This repository was archived by the owner on Sep 22, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
89 lines (79 loc) · 2.41 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
89 lines (79 loc) · 2.41 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: trailing-whitespace
- id: check-toml
- id: end-of-file-fixer
- id: detect-private-key
# Secret scanning — catches API keys/tokens/private keys by content.
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.2.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-yaml
args:
- --autofix
- --preserve-quotes
- --indent=2
- repo: local
hooks:
- id: autoflake
name: autoflake
entry: uv run autoflake
language: system
types: [python]
args: [--in-place, --remove-all-unused-imports, --remove-duplicate-keys]
- id: black
name: Format with Black
entry: uv run black
language: system
types: [python]
- id: isort
name: isort
entry: uv run isort
language: system
types: [python]
- id: check-no-release-versioning
name: no first-party release versioning
# Plain python3, not `uv run`: the script is stdlib-only, and `uv run`
# resolves the workspace first. pyproject.toml is Poetry-only, so uv finds
# no PEP 621 requires-python, normalises uv.lock from >=3.12 to its >=3.11
# default, and pre-commit then fails the commit for "files were modified by
# this hook" — blocking every commit in the repo.
entry: python3 scripts/check_no_release_versioning.py
language: system
pass_filenames: false
# - id: flake8
# name: Check with Flake8
# entry: uv run flake8
# language: system
# pass_filenames: false
# types: [python]
# args: [--count, .]
# - id: mypy
# name: Validate types with MyPy
# entry: uv run mypy
# language: system
# types: [python]
# pass_filenames: false
# args:
# - "."
- repo: local
hooks:
- id: agents-md-fresh
name: AGENTS.md is up to date
entry: "sh -c 'if [ -f .agents/global-rules/build_agents_md.py ]; then python3 .agents/global-rules/build_agents_md.py --check; else echo \"shared-rules submodule not checked out; skipping AGENTS.md check\"; fi'"
language: system
pass_filenames: false
files: ^(\.agents/|AGENTS\.md$)