forked from StackStorm/st2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
42 lines (41 loc) · 1.25 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
# pre-commit hook which runs all the various lint checks + black auto formatting on the added
# files.
# This hook relies on development virtual environment being present in virtualenv/.
default_language_version:
python: python3.6
exclude: '(build|dist)'
repos:
- repo: local
hooks:
- id: black
name: black
entry: ./virtualenv/bin/python -m black --config pyproject.toml
language: script
types: [file, python]
- repo: local
hooks:
- id: flake8
name: flake8
entry: ./virtualenv/bin/python -m flake8 --config lint-configs/python/.flake8
language: script
types: [file, python]
- repo: local
hooks:
- id: pylint
name: pylint
entry: ./virtualenv/bin/python -m pylint -E --rcfile=./lint-configs/python/.pylintrc
language: script
types: [file, python]
- repo: local
hooks:
- id: bandit
name: bandit
entry: ./virtualenv/bin/python -m bandit -lll -x build,dist
language: script
types: [file, python]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: trailing-whitespace
exclude: (^conf/|^st2common/st2common/openapi.yaml|^st2client/tests/fixtures|^st2tests/st2tests/fixtures)
- id: check-yaml