-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
89 lines (89 loc) · 2.66 KB
/
.pre-commit-config.yaml
File metadata and controls
89 lines (89 loc) · 2.66 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/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.12.12
hooks:
# Run the linter.
- id: ruff
exclude: ^(src/tagpack/|src/tagstore/|clients/|tests/regressions/)
# Run the formatter.
- id: ruff-format
exclude: ^(src/tagpack/|src/tagstore/|clients/|tests/regressions/)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: ^(clients/|src/graphsenselib/tagstore/web/statics/assets/)
- id: end-of-file-fixer
exclude: ^(clients/|tagpack/admin-ui/|src/graphsenselib/tagstore/web/statics/assets/)
-
id: check-yaml
exclude: tests/testfiles
- id: check-added-large-files
args: ['--maxkb=4096']
exclude: |
(?x)^(
uv.lock
)$
-
id: name-tests-test
args: [--pytest-test-first]
exclude: (helpers\.py|tests/web/|tests/regressions/)
-
id: debug-statements
exclude: postmortemdebug.py
- id: check-docstring-first
exclude: ^clients/
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.7.1
hooks:
# Update the uv lockfile
- id: uv-lock
- repo: local
hooks:
- id: semver-check
name: Ensure semantic versions are valid
entry: make check-semver
language: system
pass_filenames: false
always_run: true
stages: [pre-commit, pre-push]
- id: update-api-version
name: Sync API version from Makefile to version.py
entry: make update-api-version
language: system
pass_filenames: false
always_run: true
- id: type-check
name: type-check
entry: make type-check
language: system
pass_filenames: false
always_run: true
- id: codegen
name: Ensure Generated Code is up to date
entry: make run-codegen
language: system
pass_filenames: false
always_run: true
- id: ensure-env
name: Ensure UV environment is ready
entry: uv sync --dev --all-packages --all-extras
language: system
pass_filenames: false
always_run: true
stages: [pre-commit, pre-push]
- id: pytest-check
name: pytest-check
entry: make test
language: system
pass_filenames: false
always_run: true
- id: package-ui
name: Build & Package Admin UI
entry: make package-ui
language: system
pass_filenames: false
always_run: true