-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
106 lines (97 loc) · 2.83 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
# install:
# pip3 install pre-commit
# run:
# pre-commit run -a
# update deps:
# pre-commit autoupdate
repos:
- repo: https://github.com/henryykt/pre-commit-perl
rev: v0.0.5
hooks:
# - id: perlcritic
- id: perltidy
# - id: perlimports
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
# - id: detect-aws-credentials
- id: detect-private-key
# conflict with black below
# - id: double-quote-string-fixer
- id: end-of-file-fixer
- id: file-contents-sorter
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: ["--remove"]
- id: forbid-new-submodules
# - id: forbid-submodules
# args: ['--fix=lf']
- id: mixed-line-ending
- id: name-tests-test
# - id: no-commit-to-branch
# args: [--branch, staging]
# not, since it decodes utf-8
# - id: pretty-format-json
# args: ["--autofix"]
- id: requirements-txt-fixer
# - id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.7.4"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
# not, since '# type: ignore' is ok for me
# - id: python-check-blanket-type-ignore
- id: python-check-mock-methods
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
# # mypy: only for projects where type hints have been added
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.8.0
# hooks:
# - id: mypy
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
args: ["--disable", "MD013"]
# code spell check via cspell
# - repo: https://github.com/streetsidesoftware/cspell-cli
# rev: v8.7.0
# hooks:
# - id: cspell
# CRLF -> LF
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-crlf
default_language_version:
python: python3.12