-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.pre-commit-config.yaml
144 lines (143 loc) · 3.85 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
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
133
134
135
136
137
138
139
140
141
142
143
repos:
- repo: https://github.com/ambv/black
rev: 24.8.0
hooks:
- id: black
name: "Format: Black"
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: "Format: ISort"
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.10.0-1
hooks:
- id: shfmt
name: "Format: ShFmt"
- repo: local
hooks:
- id: generate-docs
name: "Docs: Generate Rules File"
language: system
entry: pipenv run python newdocs/generate_rules_file.py
pass_filenames: false
- repo: local
hooks:
- id: generate-docs
name: "Docs: Generate Extensions File"
language: system
entry: pipenv run python newdocs/generate_extensions_file.py
pass_filenames: false
- repo: local
hooks:
- id: generate-docs
name: "Docs: Generate API docs"
language: system
entry: pipenv run python utils/correct_pdoc_issues.py
pass_filenames: false
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.18
hooks:
- id: pymarkdown
name: "Scan: PyMarkdown (Old Documentation)"
pass_filenames: false
args:
- --config
- clean.json
- scan
- .
- ./docs
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.18
hooks:
- id: pymarkdown
name: "Scan: PyMarkdown (New Documentation)"
pass_filenames: false
args:
- --config
- newdocs/clean.json
- scan
- ./newdocs/src
- repo: local
hooks:
- id: verify-install-requirements
name: "Scan: Verify Install Requirements Match"
language: system
entry: pipenv run python utils/verify_install_requirements.py
pass_filenames: false
- repo: https://github.com/pycqa/flake8
rev: '7.1.1'
hooks:
- id: flake8
name: "Scan: Flake8"
args: ["-j","4", "--exclude", "dist,build" ]
additional_dependencies: ["flake8-bugbear==24.8.19", "flake8-bandit==4.1.1"]
# - repo: https://github.com/sourcery-ai/sourcery
# rev: v1.27.0
# hooks:
# - id: sourcery
# # The best way to use Sourcery in a pre-commit hook:
# # * review only changed lines:
# # * omit the summary
# args: ["--diff=git diff main","--no-summary"]
# pass_filenames: false
- repo: https://github.com/PyCQA/bandit
rev: 1.8.0
hooks:
- id: bandit
name: "Scan: Bandit"
args: [--configfile,bandit.yaml,-q,-r,"./pymarkdown"]
pass_filenames: false
- repo: local
hooks:
- id: pylint
name: "Scan: PyLint"
entry: pylint
language: system
types: [python]
require_serial: true
args:
[
"-j=1",
"--recursive=y",
"-rn", # Only display messages
"-sn", # Don't display the score
"pymarkdown"
]
pass_filenames: false
- repo: local
hooks:
- id: pylint
name: "Scan: PyLint (test)"
entry: pylint
language: system
types: [python]
require_serial: true
args:
[
"-j=1",
"--ignore",
"test/resources",
"--recursive=y",
"-rn", # Only display messages
"-sn", # Don't display the score
"test"
]
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
name: "Scan: MyPy"
args: [--strict, pymarkdown, stubs]
additional_dependencies: [
"application_properties==0.8.2",
"types-pyyaml"
]
pass_filenames: false
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
name: "Scan: Shellcheck"
args: ["-o","require-variable-braces"]