-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
128 lines (113 loc) · 3.13 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
127
128
fail_fast: true
default_stages: [commit, push, commit-msg]
repos:
- repo: local
hooks:
- id: isort
name: Sort library imports
entry: poetry run isort --force-single-line-imports scripts things_organizer manage.py
pass_filenames: false
language: system
always_run: true
- repo: local
hooks:
- id: black
name: Black Formatting
entry: poetry run black scripts things_organizer manage.py
pass_filenames: false
language: system
always_run: true
- repo: local
hooks:
- id: flake8
name: Flake8 linting
entry: poetry run flake8 scripts things_organizer manage.py
language: system
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: pylint
name: Pylint linting.
entry: poetry run pylint things_organizer scripts
language: system
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: mypy
name: MyPy type hint check.
entry: poetry run mypy things_organizer
language: system
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: test
name: Executing tests
entry: poetry run pytest --cov-report html --cov-report xml --cov-report term --cov-report annotate --cov=
pass_filenames: false
language: system
always_run: true
- repo: local
hooks:
- id: export
name: Export requirements.txt
language: system
pass_filenames: false
entry: poetry export --without-hashes -o requirements.txt
files: ^(pyproject.toml|poetry.lock)$
always_run: true
- repo: local
hooks:
- id: export-dev
name: Export requeriments-dev.txt
language: system
pass_filenames: false
entry: poetry export --with dev --without-hashes --with-credentials -o requirements-dev.txt
files: ^(pyproject.toml|poetry.lock)$
always_run: true
- repo: local
hooks:
- id: bandit
name: Check for vulnerabilities
entry: poetry run bandit --exclude "./.venv/*,./test/*,./venv/*" -r -ll .
pass_filenames: false
verbose: true
language: system
always_run: true
- repo: local
hooks:
- id: safety
name: Safety
entry: poetry check
pass_filenames: false
language: system
always_run: true
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
always_run: true
- id: check-case-conflict
always_run: true
- id: check-executables-have-shebangs
always_run: true
- id: check-json
always_run: true
- id: check-merge-conflict
always_run: true
- id: check-xml
always_run: true
- id: check-yaml
always_run: true
- id: detect-private-key
always_run: true
- repo: local
hooks:
- id: pull
name: Pull git changes
entry: git pull
language: system
stages:
- post-commit