-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlefthook.yml
50 lines (50 loc) · 1.16 KB
/
lefthook.yml
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
pre-commit:
parallel: true
scripts:
"check-asset-version.py":
runner: python3
commands:
check-module-names:
glob: "*.py"
run: ./dev/bin/check-module-names {staged_files}
markdownlint:
tags: documentation style
files: git diff --name-only --cached --diff-filter=AM
glob: "*.md"
run: markdownlint {files}
poetry-check:
tags: lint
glob: "pyproject.toml"
run: poetry check
ruff:
tags: lint
glob: "*.py"
run: just ruff
ruff-imports:
tags: style import
glob: "*.py"
run: ruff check --select=I001 {staged_files}
toml-taplo-lint:
tags: style
glob: "*.toml"
run: taplo check {staged_files}
toml-taplo-fmt:
tags: style
glob: "*.toml"
run: taplo fmt --check {staged_files}
yaml-prettier:
tags: style
glob: "*.{yml,yaml}"
run: prettier -c {staged_files}
yapf:
tags: style
glob: "*.py"
run: yapf -i -r {staged_files} && git add {staged_files}
test:
run: just test
vulture:
run: just vulture
commit-msg:
commands:
commitlint:
run: commitlint --edit={1}