-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
140 lines (136 loc) · 3.66 KB
/
.pre-commit-config.yaml
File metadata and controls
140 lines (136 loc) · 3.66 KB
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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: ^doc/static/|\.patch$
- id: end-of-file-fixer
exclude: ^doc/static/
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
- id: isort
name: Sort import
entry: isort
language: system
types: [file, python]
exclude: ^doc/_ext/sphinxcontrib_asciinema
- id: black
name: Black (auto-format)
entry: black
language: system
types: [file, python]
exclude: ^doc/_ext/sphinxcontrib_asciinema
- id: pylint
name: pylint
entry: pylint
language: system
types: [file, python]
# - id: flake8
# name: flake8
# entry: flake8
# language: system
# files: ^dfetch/
# types: [file, python]
- id: mypy
name: mypy
entry: mypy
language: system
files: ^dfetch/
types: [file, python]
- id: doc8
name: doc8
entry: doc8
language: system
files: ^doc/
types: [file]
- id: pydocstyle
name: pydocstyle
entry: pydocstyle
language: system
files: ^dfetch/
types: [file, python]
- id: bandit (security)
name: bandit
entry: bandit
language: system
files: ^dfetch/
types: [file, python]
- id: vulture (dead code)
name: vulture
language: python
entry: vulture
args: ["--min-confidence=80"]
types: [python]
files: ^dfetch/
require_serial: true
- id: pyroma (package friendliness)
name: Pyroma
entry: pyroma
language: python
args: ["-d", "--min=10", "."]
pass_filenames: false
always_run: true
- id: radon (maintenance index)
name: radon (maintenance index)
entry: radon
language: system
files: ^dfetch/
args: [mi, -nb]
types: [file, python]
- id: radon (cyclomatic complexity)
name: radon (cyclomatic complexity)
entry: radon
language: system
files: ^dfetch/
args: [cc, -nb]
types: [file, python]
- id: xenon
name: xenon
entry: xenon
language: system
files: ^dfetch/
args: [-b, B, -m, A, -a, A]
types: [file, python]
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell
language: python
exclude: ^doc/_ext/sphinxcontrib_asciinema/_static/asciinema-player_3.12.1.js
types: [text]
- id: ruff
name: ruff
description: Lint using ruff
entry: ruff
language: python
args: [check]
types: [file, python]
- id: pyright
name: pyright
description: Lint using pyright
entry: pyright
language: python
types: [file, python]
- id: pyupgrade
name: pyupgrade
description: Modernize python
entry: pyupgrade
language: python
files: ^dfetch/
args: [--py310-plus]
types: [file, python]
- id: import-linter
name: import-linter
description: Enforce C4 architecture import constraints
entry: lint-imports
language: python
pass_filenames: false
always_run: true
- repo: https://github.com/gitleaks/gitleaks
rev: v8.28.0
hooks:
- id: gitleaks