-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
75 lines (67 loc) · 2.16 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
exclude: 'build|node_modules|.git|.tox|staticfiles|static_files|media_files|((?:[^/]*/)*)(.svg)|((?:[^/]*/)*)(.xml)'
exclude: 'build|docs|node_modules|.git/|.tox|staticfiles|static_files|media_files|((?:[^/]*/)*)(.svg)|((?:[^/]*/)*)(.xml)'
default_stages: [commit]
fail_fast: true
default_language_version:
python: python3 # force all unspecified python hooks to run python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: check-added-large-files
args: ['--maxkb=10240']
- id: check-yaml
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: trailing-whitespace
- repo: https://gitlab.com/bmares/check-json5
rev: v1.0.0
hooks:
- id: check-json5
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
args: ['--line-length', '120']
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.1
hooks:
- id: flake8
args: ['--config=setup.cfg']
language_version: python3
- repo: https://github.com/timothycrosley/isort
rev: 5.0.9
hooks:
- id: isort
require_serial: true
- repo: https://github.com/windpioneers/pre-commit-hooks
rev: 0.0.5
hooks:
- id: check-branch-name
args:
- '^main$'
- '^devops/([a-z][a-z0-9]*)(-[a-z0-9]+)*$'
- '^doc/([a-z][a-z0-9]*)(-[a-z0-9]+)*$'
- '^feature/([a-z][a-z0-9]*)(-[a-z0-9]+)*$'
- '^fix/([a-z][a-z0-9]*)(-[a-z0-9]+)*$'
- '^refactor/([a-z][a-z0-9]*)(-[a-z0-9]+)*$'
- '^review/([a-z][a-z0-9]*)(-[a-z0-9]+)*$'
- repo: https://github.com/pre-commit/mirrors-prettier
rev: 'v2.2.1'
hooks:
- id: prettier
- repo: https://github.com/octue/pre-commit-hooks
rev: 0.5.0
hooks:
- id: check-commit-message-is-conventional
stages: [commit-msg]
- repo: https://github.com/thclark/pre-commit-sphinx
rev: 0.0.1
hooks:
- id: build-docs
language_version: python3
additional_dependencies:
- 'Sphinx>=2,<3'
- 'sphinx-rtd-theme==0.5.0'
- 'sphinx-tabs==1.2.1'
- 'sphinx-charts==0.0.4'