-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
85 lines (75 loc) · 2.41 KB
/
.pre-commit-config.yaml
File metadata and controls
85 lines (75 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
exclude: |
(?x)^(
.*\.ambr$|
src/kagan/core/adapters/db/migrations/versions/.*\.py$
)
# Baseline for local hooks:
# uv sync --dev
repos:
# Secret detection
- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.3
hooks:
- id: gitleaks
# Pre-commit default hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
exclude: ^(tests/snapshots/__snapshots__/|CNAME$)
- id: trailing-whitespace
exclude: ^(tests/snapshots/__snapshots__/|.*\.svg$)
- id: check-yaml
exclude: ^(mkdocs\.yml$|.*\.svg$)
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf]
exclude: ^tests/snapshots/__snapshots__/
# Markdown formatter
- repo: https://github.com/hukkin/mdformat
rev: 1.0.0
hooks:
- id: mdformat
exclude: ^(\.github/|README\.md$|CNAME$|CHANGELOG\.md$)
additional_dependencies:
- mdformat-gfm
- mdformat-ruff
- mdformat-frontmatter
# UV lock file sync
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.26
hooks:
- id: uv-lock
# Local hooks using uv and poe tasks
- repo: local
hooks:
- id: lint
name: ruff lint
entry: uv run poe lint
language: system
types: [python]
pass_filenames: false
- id: format
name: ruff format
entry: uv run poe format
language: system
types: [python]
pass_filenames: false
- id: typecheck
name: pyrefly typecheck
entry: uv run poe typecheck
language: system
types: [python]
pass_filenames: false
- id: web-typecheck
name: web typecheck
entry: bash -c 'cd packages/web && pnpm exec tsc --noEmit'
language: system
files: ^packages/web/.*\.(ts|tsx)$
pass_filenames: false
- id: wire-drift
name: wire drift check
entry: uv run python scripts/check_wire_drift.py
language: system
files: ^(src/kagan/server/responses\.py|packages/web/src/lib/api/generated-wire-types\.ts)$
pass_filenames: false