forked from Netflix/consoleme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
90 lines (82 loc) · 2.43 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
81
82
83
84
85
86
87
88
89
90
exclude: "^docs/gitbook/"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- id: check-ast
- id: check-case-conflict
- id: debug-statements
- id: check-yaml
exclude: "^docs/gitbook/|^helm/consoleme|cdk/resources/create_config_lambda/config.yaml"
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
args: ["--exclude", "consoleme/models.py"]
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: "5.6.4" # 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: 20.8b1
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.7.0
hooks:
- id: python-use-type-annotations
- id: python-no-eval
- id: python-no-log-warn
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
hooks:
- id: prettier
exclude: "^helm/consoleme"
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.24.0
hooks:
- id: eslint
args:
[
"--fix",
"--max-warnings",
"0",
"--resolve-plugins-relative-to",
"./ui",
"-c",
"./ui/.eslintrc",
]
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.12
hooks:
- id: terraform-fmt
- id: terraform-validate
- 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
- id: helm-lint
name: helm-lint
entry: helm lint helm/consoleme
language: system
pass_filenames: false