-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
125 lines (125 loc) · 3.4 KB
/
.pre-commit-config.yaml
File metadata and controls
125 lines (125 loc) · 3.4 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
repos:
- repo: local
hooks:
- id: pyupgrade
name: "Upgrade Python Syntax (pyupgrade)"
entry: poetry run pyupgrade
language: system
types: [ python ]
require_serial: true
args: [ --py312-plus ]
- repo: local
hooks:
- id: autoflake
name: "Remove Unused Imports and Variables (autoflake)"
entry: poetry run autoflake
language: system
types: [ python ]
require_serial: true
args: [ --remove-all-unused-imports, --remove-unused-variables, --in-place]
- repo: local
hooks:
- id: isort
name: "Import Sorting (isort)"
entry: poetry run isort
language: system
types: [ python ]
require_serial: true
- repo: local
hooks:
- id: pydocstringformatter
name: "Docstring Formatter (pydocstringformatter)"
entry: poetry run pydocstringformatter
language: system
types: [ python ]
require_serial: true
args: [ --write ]
- repo: local
hooks:
- id: black
name: "Code Formatter 1/2 (black)"
entry: poetry run black
language: system
types: [ python ]
require_serial: true
- repo: local
hooks:
- id: ruff
name: "Code Formatter 2/2 (ruff)"
entry: poetry run ruff format
language: system
types: [ python ]
require_serial: true
- repo: local
hooks:
- id: pylint
name: "Static Code Analysis 1/2 (pylint)"
entry: poetry run pylint
language: system
types: [ python ]
require_serial: true
- repo: local
hooks:
- id: ruff
name: "Static Code Analysis 2/2 (ruff)"
entry: poetry run ruff check
language: system
types: [ python ]
require_serial: true
# - repo: local
# hooks:
# - id: mypy
# name: "Static Type Checker (mypy)"
# entry: mypy ./src
# language: system
# types: [ python ]
# require_serial: true
# pass_filenames: false
- repo: local
hooks:
- id: bandit
name: "Security Linter (bandit)"
entry: poetry run bandit
language: system
types: [ python ]
require_serial: true
args: ["--ini", ".bandit"]
# - repo: local
# hooks:
# - id: xenon
# name: "Code Complexity Checker (xenon)"
# entry: xenon
# language: system
# types: [ python ]
# require_serial: true
# args: [-bD, -mD, -aD, ./src]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
name: "YAML file Checker"
- id: end-of-file-fixer
name: "End-of-File Fixer"
- id: trailing-whitespace
name: "Trailing Whitespace Checker"
- repo: local
hooks:
- id: pytest
name: "Unit Tests Fail/Pass (pytest)"
entry: poetry run pytest tests
language: system
types: [ python ]
require_serial: true
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: pytest-cov
name: "Unit Tests Coverage (pytest-cov)"
entry: poetry run pytest tests
language: system
types: [ python ]
require_serial: true
always_run: true
pass_filenames: false
args: [ --cov=src, --cov-report=xml, --cov-report=term, --cov-report=html, --cov-fail-under=5]