-
Notifications
You must be signed in to change notification settings - Fork 19
/
.pre-commit-config.yaml
61 lines (61 loc) · 1.79 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
exclude: ^chart/kubeseal-webgui/templates/
- id: end-of-file-fixer
- id: trailing-whitespace
# - repo: https://github.com/PyCQA/pydocstyle
# rev: 6.1.1
# hooks:
# - id: pydocstyle
# - repo: https://github.com/PyCQA/prospector
#rev: 1.5.1
#hooks:
#- id: prospector
#args: ["--zero-exit"]
- repo: local
hooks:
# - id: mypy
# name: mypy
# entry: bash -c 'cd api && poetry run mypy kubeseal-webgui-api'
# language: system
- id: isort
name: isort (python)
args: ["--profile", "black"]
entry: bash -c 'cd api && poetry run isort'
language: system
types: [python]
files: ^api/
- id: pyupgrade
name: pyupgrade
entry: bash -c 'cd api && poetry run pyupgrade'
language: system
files: ^api/
- id: black
name: black
language: system
entry: bash -c 'cd api && poetry run black .'
types: [python]
files: ^api/
- id: flake8
name: flake8
entry: bash -c 'cd api && poetry run flake8 --max-line-length=88 kubeseal_webgui_api'
language: system
types: [python]
files: ^api/
- id: tests
name: run test suite
entry: bash -c 'cd api && poetry install && poetry run pytest -m "not (container or cluster)"'
language: system
types: [python]
pass_filenames: false
files: ^api/
# stages: [push]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: "v8.25.0" # Use the sha / tag you want to point at
hooks:
- id: eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]