-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprecommit.toml
56 lines (46 loc) · 1.18 KB
/
precommit.toml
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
[[pre_commit]]
name = "NoForbiddenStrings"
cmd = ["iprecommit-no-forbidden-strings", "--paths"]
[[pre_commit]]
name = "NewlineAtEndOfFile"
cmd = ["iprecommit-newline-at-eof"]
autofix = true
fail_fast = true
[[pre_commit]]
name = "CommitMessageTypos"
cmd = ["iprecommit-typos", "--paths"]
[[pre_commit]]
name = "PythonFormat"
cmd = ["black", "--check"]
filters = ["*.py"]
fix_cmd = ["black"]
autofix = true
fail_fast = true
# TODO: should consider deleted files
[[pre_commit]]
name = "PythonTypes"
cmd = [".venv/bin/mypy", "iprecommit"]
pass_files = false
filters = ["*.py"]
[[pre_commit]]
name = "PythonLint"
cmd = [".venv/bin/flake8", "iprecommit"]
pass_files = false
filters = ["*.py"]
# TODO: should consider deleted files
[[pre_commit]]
name = "ProjectTests"
cmd = [".venv/bin/pytest", "--tb=short"]
pass_files = false
filters = ["*.py"]
[[commit_msg]]
name = "CommitMessageFormat"
cmd = ["iprecommit-commit-msg-format"]
[[commit_msg]]
name = "CommitMessageTypos"
cmd = ["iprecommit-typos", "--paths"]
[[commit_msg]]
name = "NoForbiddenStrings"
cmd = ["iprecommit-no-forbidden-strings", "--paths"]
[[pre_push]]
cmd = ["iprecommit-no-forbidden-strings", "--strings", "DO NOT PUSH", "--commits"]