forked from StackStorm/st2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
44 lines (43 loc) · 1.38 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
# 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:
# We don't specify a specific version so it uses either Python 3.6 / Python
# 3.8 depending on what is available locally and on the runner
python: python
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