-
Notifications
You must be signed in to change notification settings - Fork 28
/
.pre-commit-config.yaml
62 lines (62 loc) · 1.89 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
fail_fast: true
repos:
- repo: local
hooks:
- id: format
name: ruff-formatter
language: python
types: [python]
entry: bash -c 'cd src/dashboard && ruff format --config=pyproject.toml --force-exclude .'
files: src/dashboard/
- id: ruff
name: ruff
language: python
types: [python]
entry: bash -c 'cd src/dashboard && ruff check --config=pyproject.toml --force-exclude --fix .'
files: src/dashboard/
- id: mypy
name: mypy
language: python
types: [python]
entry: mypy --config-file=src/dashboard/pyproject.toml
files: src/dashboard/
- id: import-linter
name: import-linter
language: python
types: [python]
entry: bash -c 'cd src/dashboard/apigateway && lint-imports --config=./.importlinter'
files: src/dashboard/
- repo: local
hooks:
- id: black
name: black
language: python
types: [python]
entry: black --config=src/esb/pyproject.toml
files: src/esb/
- id: ruff
name: ruff
language: python
types: [python]
entry: bash -c 'cd src/esb && ruff check --config=pyproject.toml --force-exclude --fix .'
files: ^src/esb/
- id: mypy
name: mypy
language: python
types: [python]
entry: mypy --config-file=src/esb/pyproject.toml
files: src/esb/
- repo: local
hooks:
- id: Name check
name: Check sensitive info
verbose: true
language: system
require_serial: true
entry: bash -c "if [[ -d pre_commit_hooks ]]; then pre_commit_hooks/rtx.sh $@; fi"
- id: IP check
name: Check sensitive info
verbose: true
language: system
require_serial: true
entry: bash -c "if [[ -d pre_commit_hooks ]]; then pre_commit_hooks/ip.sh $@; fi"