Repository navigation
Expand file tree
/
Copy pathprek.toml
More file actions
132 lines (120 loc) · 5.55 KB
/
Copy pathprek.toml
File metadata and controls
132 lines (120 loc) · 5.55 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#:schema https://www.schemastore.org/prek.json
default_install_hook_types = ["pre-commit", "pre-push"]
default_stages = ["pre-commit"]
fail_fast = false
# Hooks with matching priorities run concurrently. Keep file-mutating stages
# separate when their inputs or outputs can overlap.
[priorities]
checks = 7
end_of_file = 2
independent_formatters = 4
line_endings = 0
lockfile = 3
python_format = 6
source_fix = 5
trailing_whitespace = 1
[[repos]]
hooks = [
{ id = "check-case-conflict", name = "🛠️ prek · Check for case conflicts", priority = "checks" },
{ id = "check-merge-conflict", name = "🛠️ prek · Check for merge conflicts", priority = "checks" },
{ id = "check-yaml", name = "🛠️ prek · Check YAML files", priority = "checks" },
{ id = "end-of-file-fixer", name = "🛠️ prek · Fix end of file", priority = "end_of_file" },
{ id = "mixed-line-ending", name = "🛠️ prek · Check mixed line endings", priority = "line_endings" },
{ id = "trailing-whitespace", name = "🛠️ prek · Check trailing whitespace", priority = "trailing_whitespace" },
{ id = "check-json", name = "🛠️ prek · Check JSON files", priority = "checks" },
{ id = "check-added-large-files", name = "🛠️ prek · Check for large files", args = [
"--maxkb=2000",
], priority = "checks" },
{ id = "check-xml", name = "🛠️ prek · Check XML files", priority = "checks" },
{ id = "check-toml", name = "🛠️ prek · Check TOML files", priority = "checks" },
{ id = "pretty-format-json", name = "🛠️ prek · Check and fix JSON files", args = [
"--autofix",
"--indent=4",
"--no-sort-keys",
], priority = "independent_formatters" },
]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "v6.0.0"
[[repos]]
hooks = [
{ id = "gitleaks", name = "🔒 security · Detect hardcoded secrets", priority = "checks" },
]
repo = "https://github.com/gitleaks/gitleaks"
rev = "v8.30.0"
[[repos]]
hooks = [
{ id = "validate-pyproject", name = "🐍 validate-pyproject · Validate pyproject.toml", additional_dependencies = [
"validate-pyproject-schema-store[all]",
], priority = "checks" },
]
repo = "https://github.com/abravalheri/validate-pyproject"
rev = "0.26"
[[repos]]
hooks = [
{ id = "ruff-check", name = "🐍 ruff · Check Python code", args = [
"--fix",
"--config",
"./ruff.toml",
], files = '\.(py|pyi)$', priority = "source_fix" },
{ id = "ruff-format", name = "🐍 ruff · Format Python code", args = [
"--config",
"./ruff.toml",
], priority = "python_format" },
]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "v0.17.0"
[[repos]]
hooks = [
{ id = "rumdl-fmt", name = "📝 rumdl · Format Markdown files", types = [
"text",
], files = '\.md$', additional_dependencies = [
"ruff>=0.17.0",
], priority = "source_fix" },
]
repo = "https://github.com/rvben/rumdl-pre-commit"
rev = "v0.2.75"
[[repos]]
hooks = [
{ id = "taplo-format", name = "⚙️ taplo · Format TOML files", priority = "independent_formatters" },
]
repo = "https://github.com/ComPWA/taplo-pre-commit"
rev = "v0.9.3"
[[repos]]
hooks = [
{ id = "typos", name = "🔤 typos · Check for typos", priority = "checks" },
]
repo = "https://github.com/crate-ci/typos"
rev = "v1.51.1"
[[repos]]
hooks = [
{ id = "prettier", name = "🎨 prettier · Format YAML files", types = [
"yaml",
], priority = "independent_formatters" },
{ id = "prettier", name = "🎨 prettier · Format CSS files", alias = "prettier-css", types = [
"css",
], priority = "independent_formatters" },
]
repo = "https://github.com/pre-commit/mirrors-prettier"
rev = "v3.1.0"
[[repos]]
hooks = [
{ id = "pyrefly", name = "🐍 pyrefly · Type check Python code", entry = "uv run pyrefly check", language = "system", pass_filenames = false, files = '(\.(py|pyi)$|(^|/)(pyproject\.toml|uv\.lock|pyrefly\.toml)$)', priority = "checks", stages = [
"pre-push",
] },
{ id = "pyrefly-coverage", name = "🐍 pyrefly · Type coverage and completeness check", entry = "uv run pyrefly coverage check src --fail-under 100 --strict", language = "system", pass_filenames = false, files = '(\.(py|pyi)$|(^|/)(pyproject\.toml|uv\.lock|pyrefly\.toml)$)', priority = "checks", stages = [
"pre-push",
] },
{ id = "complexipy", name = "🧮 complexipy · Cognitive complexity check", entry = "uv run complexipy src tests", language = "system", pass_filenames = false, files = '(\.(py|pyi)$|(^|/)complexipy\.toml$)', priority = "checks", stages = [
"pre-push",
] },
{ id = "tach", name = "📐 tach · Architecture boundaries check", entry = "uv run tach check", language = "system", pass_filenames = false, files = '(\.(py|pyi)$|(^|/)(pyproject\.toml|uv\.lock|tach\.toml)$)', priority = "checks", stages = [
"pre-push",
] },
]
repo = "local"
[[repos]]
hooks = [
{ id = "uv-lock", name = "🐍 uv · Lock dependencies", priority = "lockfile" },
]
repo = "https://github.com/astral-sh/uv-pre-commit"
rev = "0.12.7"