/
.pre-commit-config.yaml
85 lines (84 loc) · 2.64 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
# SPDX-FileCopyrightText: © 2023 Romain Brault <mail@romainbrault.com>
#
# SPDX-License-Identifier: MIT
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
entry: check-yaml --unsafe
exclude: ^(template)
- id: check-json
- id: check-toml
exclude: ^(template)
- id: detect-private-key
- id: end-of-file-fixer
exclude: ^(DEPENDENCIES.md) # automatically generated
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.6
hooks:
- id: prettier
exclude: ^(DEPENDENCIES.md|template)
- repo: local
hooks:
- id: reuse
name: reuse
entry: reuse
args: ["lint"]
pass_filenames: false
description: "Lint the project directory for compliance with the REUSE Specification"
language: system
types: [python]
- id: black
name: black
description: "[Fix] Reformat the code"
entry: black --config=pyproject.toml
language: system
types: [python]
exclude: ^(template)
- id: ruff
name: ruff
description: "[Fix] Lint issues"
entry: ruff --fix-only --config=pyproject.toml
language: system
types: [python]
require_serial: true
exclude: ^(gen_ref_pages.py|noxfile.py|template)
- id: pylint
name: pylint
description: "[Check] Lint issues"
entry: pylint --output-format=colorized --rcfile=pyproject.toml --disable=fixme
language: system
types: [python]
require_serial: true
exclude: ^(gen_ref_pages.py|noxfile.py|template)
- id: mypy
name: mypy
description: "[Check] Types"
entry: mypy --config-file=pyproject.toml
language: system
types_or: [python, pyi]
require_serial: true
exclude: ^(gen_ref_pages.py|noxfile.py|template)
- id: bandit
name: bandit
description: "[Check] Security issues"
entry: bandit --recursive --configfile=pyproject.toml
language: system
types: [python]
- id: xenon
name: xenon
description: "[Check] Code maintainability"
entry: xenon --max-average=A --max-modules=A --max-absolute=A --ignore
docs/,noxfile.py
language: system
types: [python]