4
4
default_language_version :
5
5
python : python3.12
6
6
repos :
7
- # Generic file checks and fixes
7
+ # Specific checks and fixes for Git
8
+ - repo : https://github.com/pre-commit/pre-commit-hooks
9
+ rev : v5.0.0
10
+ hooks :
11
+ - id : no-commit-to-branch
12
+ fail_fast : true
13
+ args :
14
+ - --branch
15
+ - main
16
+ - repo : https://github.com/jorisroovers/gitlint
17
+ rev : v0.19.1
18
+ hooks :
19
+ - id : gitlint
20
+ fail_fast : true
21
+ args :
22
+ - -c
23
+ - title-match-regex.regex=^\[#\d+\]\s(Build|Bump|Chore|Ci|Docs|Feat|Fix|Perf|Refactor|Revert|Style|Test):\s[a-z].*$
24
+ - --ignore=B6
25
+ - --msg-filename
26
+ # Generic checks and fixes
8
27
- repo : https://github.com/pre-commit/pre-commit-hooks
9
28
rev : v5.0.0
10
29
hooks :
11
30
- id : end-of-file-fixer
31
+ fail_fast : true
12
32
# Specific checks and fixes for different file types
13
33
- repo : https://github.com/markdownlint/markdownlint
14
34
rev : v0.12.0
15
35
hooks :
16
36
- id : markdownlint
37
+ fail_fast : true
17
38
args :
18
39
- -r
19
40
- ~MD013
20
41
- repo : https://github.com/pre-commit/pre-commit-hooks
21
42
rev : v5.0.0
22
43
hooks :
23
44
- id : check-toml
45
+ fail_fast : true
24
46
- repo : https://github.com/adrienverge/yamllint
25
47
rev : v1.35.1
26
48
hooks :
27
49
- id : yamllint
50
+ fail_fast : true
28
51
args :
29
52
- -d
30
53
- " {extends: default, rules: {comments: {min-spaces-from-content: 1}, document-start: {present: false}, line-length: disable}}"
31
54
- repo : https://github.com/google/yamlfmt
32
55
rev : v0.13.0
33
56
hooks :
34
57
- id : yamlfmt
58
+ fail_fast : true
35
59
args :
36
60
- -formatter
37
61
- eof_newline=true
@@ -40,32 +64,19 @@ repos:
40
64
rev : v3.18.0
41
65
hooks :
42
66
- id : pyupgrade
67
+ fail_fast : true
43
68
- repo : https://github.com/astral-sh/ruff-pre-commit
44
69
rev : v0.8.2
45
70
hooks :
46
71
- id : ruff
72
+ fail_fast : true
47
73
args :
48
74
- --fix
49
75
- id : ruff-format
50
- # Specific checks and fixes for Git
51
- - repo : https://github.com/jorisroovers/gitlint
52
- rev : v0.19.1
53
- hooks :
54
- - id : gitlint
55
- args :
56
- - -c
57
- - title-match-regex.regex=^\[#\d+\]\s(Build|Bump|Chore|Ci|Docs|Feat|Fix|Perf|Refactor|Revert|Style|Test):\s[a-z].*$
58
- - --ignore=B6
59
- - --msg-filename
60
- - repo : https://github.com/pre-commit/pre-commit-hooks
61
- rev : v5.0.0
62
- hooks :
63
- - id : no-commit-to-branch
64
- args :
65
- - --branch
66
- - main
76
+ fail_fast : true
67
77
# Dependency management
68
78
- repo : https://github.com/astral-sh/uv-pre-commit
69
79
rev : 0.5.6
70
80
hooks :
71
81
- id : uv-lock
82
+ fail_fast : true
0 commit comments