forked from Netflix/consoleme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
57 lines (50 loc) · 1.55 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- id: check-ast
- id: check-case-conflict
- id: check-yaml
- id: flake8
args: ["--exclude", "consoleme/models.py"]
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: "" # Use the revision sha / tag you want to point at
hooks:
- id: isort # Run `isort -rc <filepath>` to autofix
pass_filenames: true
args: ["--profile", "black"]
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pre-commit/pygrep-hooks
rev: master
hooks:
- id: python-use-type-annotations
- id: python-no-eval
- repo: https://github.com/prettier/prettier
rev: master
hooks:
- id: prettier
- repo: local
hooks:
- id: pytest
name: pytest
entry: pytest tests
language: system
pass_filenames: false
# alternatively you could `types: [python]` so it only runs when python files change
# though tests might be invalidated if you were to say change a data file
always_run: true
- id: python-bandit-vulnerability-check
name: bandit
entry: bandit
args: ["--ini", "tox.ini", "-r", "consoleme"]
language: system
pass_filenames: false