Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
68 lines (63 loc) · 2.29 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
68 lines (63 loc) · 2.29 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
# The Studio UI bundle is a build artifact synced from agentomatic-studio
# releases (sync-studio.yml). Whitespace fixers would rewrite its minified
# chunks, so the shipped files would no longer match the release tarball.
exclude: ^src/agentomatic/studio/static/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- id: check-toml
- id: check-json
exclude: \.vscode/
- id: check-added-large-files
args: ["--maxkb=500"]
- id: debug-statements
- id: check-merge-conflict
# Ruff runs from the project's own lockfile rather than a separately
# pinned hook environment. The two used to drift: the hook pinned v0.8.6
# while the dev dependency resolved to 0.15, and they disagreed on 34 lint
# findings and 9 files' formatting. Every PR that touched one of those
# files failed the gate on code it had not written. Sourcing ruff from
# `uv run` — as the mypy hook below already does — makes that impossible:
# there is one ruff, the one in uv.lock.
- repo: local
hooks:
- id: ruff
name: ruff
entry: uv run ruff check --fix
language: system
types_or: [python, pyi]
require_serial: true
- id: ruff-format
name: ruff-format
entry: uv run ruff format
language: system
types_or: [python, pyi]
require_serial: true
- repo: local
hooks:
- id: mypy
name: mypy
entry: uv run mypy src/agentomatic/ --ignore-missing-imports
language: system
pass_filenames: false
files: ^src/agentomatic/
# Strip ANSI / bat line numbers before conventional-commit validation.
# Needed when `cat` is aliased to `bat` and HEREDOC commit messages get colored.
- repo: local
hooks:
- id: strip-commit-msg-ansi
name: strip ANSI from commit message
entry: python3 scripts/strip_commit_msg_ansi.py
language: system
stages: [commit-msg]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [feat, fix, docs, chore, test, ci, refactor, perf, style, build]