-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
62 lines (60 loc) · 1.89 KB
/
.pre-commit-config.yaml
File metadata and controls
62 lines (60 loc) · 1.89 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
# to run pre-commit on demand using below configuration:
# pre-commit run --all-files
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-ast
- id: end-of-file-fixer
exclude: ^tests
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: ^tests
- id: check-added-large-files
args: ['--maxkb=1000']
# black
- repo: local
hooks:
- id: black
name: black
exclude: ^tests/|^docs/|gitignore|LICENSE|requirements|pre-commit-config|pylintrc|.*\.png$|README.md|pyproject.toml|poetry.lock|\.github/.*|.readthedocs.yaml
entry: black nornir_salt
language: system
args:
- "--line-length=88"
# flake8
- repo: local
hooks:
- id: flake8
name: flake8
language: system
entry: flake8
exclude: ^tests/|^docs/|gitignore|LICENSE|requirements|pre-commit-config|pylintrc|.*\.png$|README.md|pyproject.toml|poetry.lock|\.github/.*|.readthedocs.yaml
args:
- "--max-line-length=88"
- "--max-complexity=19"
- "--select=B,C,E,F,W,T4,B9"
- "--ignore=F403,E402,E722,E203,W503,C901,E501"
# bandit security checks
- repo: local
hooks:
- id: bandit
name: bandit
language: system
entry: bandit
exclude: ^tests/|^docs/|pyproject.toml|^.github/|LICENSE|.readthedocs.yaml
args:
- "--skip=B101"
# pylint, to run it directly use: python3 -m pylint . --rcfile=pylintrc
# enabled only spelling checks for docstrings
- repo: local
hooks:
- id: pylint
name: pylint
language: system
entry: pylint .
args:
- "--rcfile=pylintrc"
exclude: ^tests/|gitignore|LICENSE|requirements|pre-commit-config|pylintrc|.*\.png$|.readthedocs.yaml