forked from raiden-network/raiden
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
80 lines (72 loc) · 2.53 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
# How to use this:
# 1) Install https://pre-commit.com/ `pip install --user pre-commit`
# 2) Execute `pre-commit install` inside the checkout root
# 2a) Optional: run `pre-commit run` to test if everything works.
# 3) Every commit now goes through linting, mypy, etc.
# 4) If you ever need to commit without passing checks, run `git commit --no-verify`
#
# Note: The first run will be very slow since pre-commit generates virtualenvs for the
# various hooks.
# Additionally the pylint and mypy hooks need to install all Raiden dependencies into their
# virtualenvs on first run. See tools/pre-commit/pre-commit-wrapper.py for details.
default_language_version:
python: python3.7
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.2
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: .bumpversion_client.cfg
- id: fix-encoding-pragma
args: ['--remove']
- id: flake8
args: ["--config=setup.cfg"]
additional_dependencies: ["flake8-bugbear==18.8.0", "flake8-tuple", "readme-renderer",]
- id: mixed-line-ending
- id: no-commit-to-branch
args: ['--branch', 'master', '--branch', 'develop']
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.4.1
hooks:
- id: python-no-eval
- id: python-no-log-warn
- id: rst-backticks
- repo: git://github.com/pre-commit/mirrors-isort
rev: v4.3.20
hooks:
- id: isort
args: ["--ignore-whitespace", "--settings-path", "./", "--recursive"]
- repo: https://github.com/python/black
rev: 19.3b0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.720
hooks:
- id: mypy
entry: tools/pre-commit/pre-commit-wrapper.py mypy
additional_dependencies: ["pip-tools>=5.1.2"]
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.3.1
hooks:
- id: pylint
entry: tools/pre-commit/pre-commit-wrapper.py pylint
additional_dependencies: ["pip-tools>=5.1.2"]
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.5
hooks:
- id: shellcheck