-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
126 lines (115 loc) · 2.89 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
---
# .pre-commit-config.yaml
# ========================
#
# pre-commit clean
# pre-commit install
# pre-commit install-hooks
#
# precommit hooks installation
#
# - pre-commit autoupdate
#
# - pre-commit run black
#
# continuous integration
# ======================
#
# - pre-commit run --all-files
#
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: check-merge-conflict
- id: sort-simple-yaml
- id: fix-encoding-pragma
args: ["--remove"]
- id: forbid-new-submodules
- id: mixed-line-ending
args: ["--fix=lf"]
description: Forces to replace line ending by the UNIX 'lf' character.
- id: check-added-large-files
args: ["--maxkb=500"]
- id: no-commit-to-branch
args: [--branch, master]
- id: check-yaml
- id: check-json
files: ^tests/app/
- id: pretty-format-json
args: ["--no-sort-keys", "--autofix"]
files: ^tests/app/
- repo: meta
hooks:
- id: check-useless-excludes
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
exclude: tests
- repo: https://github.com/ambv/black
rev: 24.10.0
hooks:
- id: black
args:
- --line-length=119
- repo: https://github.com/PyCQA/bandit
rev: 1.8.0
hooks:
- id: bandit
description: Security oriented static analyser for python code
exclude: tests/|scripts/|lib/helpers
args:
- -s
- B101,B311,B105
- repo: https://github.com/jendrikseipp/vulture
rev: v2.14
hooks:
- id: vulture
description: Find dead Python code
args:
[
"--min-confidence",
"90",
"--exclude",
"tests,env,lib/schemas/fields.py",
"--ignore-names",
"einfo,task_id,retval,logger,log_method,exc,args",
".",
]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell -L som
language: python
types: [text]
additional_dependencies:
- tomli
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--settings-path", "pyproject.toml", "."]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint-fix
args: ["--disable", "line-length"]