Skip to content

Commit 8ddb07e

Browse files
committed
[#56] Perf: improve pre-commit-config
1 parent 20b3b6d commit 8ddb07e

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

.pre-commit-config.yaml

+29-18
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,58 @@ ci:
44
default_language_version:
55
python: python3.12
66
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
827
- repo: https://github.com/pre-commit/pre-commit-hooks
928
rev: v5.0.0
1029
hooks:
1130
- id: end-of-file-fixer
31+
fail_fast: true
1232
# Specific checks and fixes for different file types
1333
- repo: https://github.com/markdownlint/markdownlint
1434
rev: v0.12.0
1535
hooks:
1636
- id: markdownlint
37+
fail_fast: true
1738
args:
1839
- -r
1940
- ~MD013
2041
- repo: https://github.com/pre-commit/pre-commit-hooks
2142
rev: v5.0.0
2243
hooks:
2344
- id: check-toml
45+
fail_fast: true
2446
- repo: https://github.com/adrienverge/yamllint
2547
rev: v1.35.1
2648
hooks:
2749
- id: yamllint
50+
fail_fast: true
2851
args:
2952
- -d
3053
- "{extends: default, rules: {comments: {min-spaces-from-content: 1}, document-start: {present: false}, line-length: disable}}"
3154
- repo: https://github.com/google/yamlfmt
3255
rev: v0.13.0
3356
hooks:
3457
- id: yamlfmt
58+
fail_fast: true
3559
args:
3660
- -formatter
3761
- eof_newline=true
@@ -40,32 +64,19 @@ repos:
4064
rev: v3.18.0
4165
hooks:
4266
- id: pyupgrade
67+
fail_fast: true
4368
- repo: https://github.com/astral-sh/ruff-pre-commit
4469
rev: v0.8.2
4570
hooks:
4671
- id: ruff
72+
fail_fast: true
4773
args:
4874
- --fix
4975
- 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
6777
# Dependency management
6878
- repo: https://github.com/astral-sh/uv-pre-commit
6979
rev: 0.5.6
7080
hooks:
7181
- id: uv-lock
82+
fail_fast: true

0 commit comments

Comments
 (0)