forked from pedrorrivero/qrand
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
74 lines (70 loc) · 1.73 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
default_stages: [commit, manual]
repos:
# pre-commit
## python
- repo: local
hooks:
- id: isort
name: isort
description: "Sort python imports"
stages: [commit]
entry: isort
require_serial: true
language: python
types: [python]
args: ['--filter-files']
- id: mypy
name: mypy
description: "Static type checker"
stages: [commit]
entry: mypy
language: python
types: [python]
args: ["--ignore-missing-imports", "--scripts-are-modules"]
require_serial: true
additional_dependencies: []
- id: black
name: black
description: "Python code formatter"
stages: [commit]
entry: black
language: python
language_version: python3
require_serial: true
types: [python]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
name: flake8
description: "PyFlakes lint + PyCodeStyle + McCabe cyclomatic complexity"
stages: [commit]
- repo: local
hooks:
- id: pytest
name: pytest
description: "Run tests and produce coverage report"
stages: [commit]
language: system
entry: pytest --cov=qrand --cov-report html tests #--cov-fail-under=100
types: [python]
pass_filenames: false
# commit-msg
- repo: https://github.com/jorisroovers/gitlint
rev: v0.15.1
hooks:
- id: gitlint
name: gitlint
description: "Enforce conventional commits and extra commiting rules"
stages: [commit-msg]
- repo: local
hooks:
- id: commitizen
name: commitizen check
description: "Check whether the commit message follows commiting rules"
stages: [commit-msg]
entry: cz check --commit-msg-file
language: python
language_version: python3
require_serial: true
minimum_pre_commit_version: "0.15.4"