-
Notifications
You must be signed in to change notification settings - Fork 1
/
lefthook.yml
50 lines (50 loc) · 1.17 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:
commands:
pythonrc-check:
tags: test
run: "python pythonrc.py"
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: ruff check {staged_files}
ruff-imports:
tags: style import
glob: "*.py"
run: ruff check --select=I001 --fix {staged_files}
stage_fixed: true
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}
unit-tests:
tags: test
run: "./dev/bin/testall"
commit-msg:
commands:
commitlint:
run: "commitlint --edit={1}"
post-checkout:
commands:
poetry-install:
run: poetry install