-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
150 lines (150 loc) · 5.39 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
144
145
146
147
148
149
150
---
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [pre-commit]
ci:
autofix_prs: false
autoupdate_schedule: weekly
autoupdate_commit_msg: 'chore(pre-commit-deps): pre-commit autoupdate'
skip:
- check-poetry
- pylint
- pyright
- poetry-audit
- markdown-link-check
- renovate-config-validator # TODO: remove this line once https://github.com/renovatebot/pre-commit-hooks/issues/2460 is resolved
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-yaml
args: [--unsafe]
- id: check-toml
- id: check-json
- id: check-xml
- id: file-contents-sorter
files: ^(doc_config/known_words.txt)$
args: [--unique, --ignore-case]
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=3000, --enforce-all]
- id: forbid-submodules
- id: pretty-format-json
args: [--autofix, --indent=4]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: a30f0d816e5062a67d87c8de753cfe499672b959 # frozen: v1.5.5
hooks:
- id: remove-tabs
- id: forbid-tabs
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: de6949cf680ef700d700706d26cd306a57ca4217 # frozen: 39.82.3
hooks:
- id: renovate-config-validator
language_version: 20.18.0 # TODO: remove this line once https://github.com/renovatebot/pre-commit-hooks/issues/2460 is resolved
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: cb3c2be894b151dff143b1baf6acbd55f2b7faed # frozen: 0.30.0
hooks:
- id: check-dependabot
- id: check-github-actions
files: action\.(yml|yaml)
- id: check-github-workflows
args: [--verbose]
files: ^(\.github/workflows/[^/]+|workflows/[^/]+)$
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: 060504a904804d5314d4db5dd12aa8751717ffc7 # frozen: v1.7.4.20
hooks:
- id: actionlint
additional_dependencies: [pyflakes, shellcheck-py]
- repo: https://github.com/commitizen-tools/commitizen
rev: 27499d727f5ceff802bda34bbda314644824ce06 # frozen: v4.1.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/adamchainz/blacken-docs
rev: 78a9dcbecf4f755f65d1f3dec556bc249d723600 # frozen: 1.19.1
hooks:
- id: blacken-docs
files: \.(rst|md|markdown|tex)$
additional_dependencies: [black==24.8.0] # This may need to be updated/removed in the future once ruff supports formatting Python code blocks in markdown
args: [--line-length=100]
- repo: https://github.com/lyz-code/yamlfix
rev: 8072181c0f2eab9f2dd8db2eb3b9556d7cd0bd74 # frozen: 1.17.0
hooks:
- id: yamlfix
- repo: https://github.com/AleksaC/hadolint-py
rev: e70baeefd566058716df2f29eae8fe8ffc213a9f # frozen: v2.12.1b3
hooks:
- id: hadolint
args: [--ignore=DL3008, --ignore=DL3018]
- repo: https://github.com/hukkin/mdformat
rev: e20b1ac5acb8aba0b49d3a9109c6e6b58684ee83 # frozen: 0.7.21
hooks:
- id: mdformat
args: [--number, --end-of-line, keep]
additional_dependencies:
- setuptools # This is required since Python 3.12 no longer installs setuptools by default in virtual environments
- mdformat-admon
- mdformat-beautysh
# - mdformat-config
- mdformat-footnote
- mdformat-frontmatter
- mdformat-gfm
- mdformat-gfm-alerts
- mdformat-mkdocs
- mdformat-shfmt
- mdformat-simple-breaks
- mdformat-tables
- mdformat-toc
- mdformat-web
- mdformat-wikilink
- repo: https://github.com/tcort/markdown-link-check
rev: e736c4f6e88d249f5ed3cbe8fee972c5a1dd20fa # frozen: v3.13.6
hooks:
- id: markdown-link-check
args: [--quiet]
- repo: https://gitlab.com/smop/pre-commit-hooks
rev: df034f88cf92b394e6f00a78fa97a2aa4e270e60 # frozen: v1.0.0
hooks:
- id: check-poetry
- repo: https://github.com/pappasam/toml-sort
rev: 4ec24891e200ae663aa2a7cecd19516080777133 # frozen: v0.24.2
hooks:
- id: toml-sort-fix
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
pass_filenames: true
args: [-sn]
- id: pyright
name: pyright
entry: pyright
language: system
types: [python]
pass_filenames: false
- id: poetry-audit
name: poetry-audit
entry: poetry
language: system
types: [toml]
pass_filenames: false
always_run: true
args: [audit, --json, --ignore-code=CVE-2019-8341]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: f0b5944bef86f50d875305821a0ab0d8c601e465 # frozen: v0.8.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# TODO: Re-enable this once https://github.com/PyCQA/docformatter/issues/293 is resolved
# - repo: https://github.com/PyCQA/docformatter
# rev: dfefe062799848234b4cd60b04aa633c0608025e # frozen: v1.7.5
# hooks:
# - id: docformatter
# additional_dependencies: [tomli]