-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
73 lines (73 loc) · 1.91 KB
/
.pre-commit-config.yaml
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
ci:
skip:
- uv-lock
default_language_version:
python: python3.12
fail_fast: true
repos:
# Specific checks and fixes for Git
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
args:
- -c
- title-match-regex.regex=^\[#\d+\]\s(Build|Bump|Chore|Ci|Docs|Feat|Fix|Perf|Refactor|Revert|Style|Test):\s[a-z].*$
- --ignore=B6
- --msg-filename
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: no-commit-to-branch
args:
- --branch=main
# Generic checks and fixes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
# Specific checks and fixes for different file types
- repo: https://github.com/markdownlint/markdownlint
rev: v0.12.0
hooks:
- id: markdownlint
args:
- -r
- ~MD013
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args:
- -d
- "{extends: default, rules: {comments: {min-spaces-from-content: 1}, document-start: {present: false}, line-length: disable}}"
- repo: https://github.com/google/yamlfmt
rev: v0.13.0
hooks:
- id: yamlfmt
args:
- -formatter
- eof_newline=true
# Specific checks and fixes for Python files
- repo: https://github.com/asottile/pyupgrade
rev: v3.18.0
hooks:
- id: pyupgrade
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
# Dependency management
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.6
hooks:
- id: uv-lock
args:
- --resolution=lowest-direct