generated from HIRO-MicroDataCenters-BV/template-web-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
77 lines (68 loc) · 1.88 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
default_language_version:
python: python3.12
default_stages: [commit, push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
exclude: client/.*|.*\.md
- id: end-of-file-fixer
exclude: client/.*|.*\.md
- id: check-yaml
exclude: charts/
- id: check-added-large-files
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
hooks:
- id: shellcheck
- repo: local
hooks:
- id: mypy
name: mypy
files: ^server/
entry: poetry --directory server run mypy
language: system
types: [python]
- repo: local
hooks:
- id: isort
name: isort
files: ^server/
entry: poetry --directory server run isort
language: system
types: [python]
- repo: local
hooks:
- id: flake8
name: flake8
files: ^server/
entry: poetry --directory server run flake8 --config ./server/.flake8
language: system
types: [python]
- repo: local
hooks:
- id: black
name: black
files: ^server/
entry: poetry --directory server run black
language: system
types: [python]
- repo: local
hooks:
- id: openapi
name: openapi
entry: poetry --directory server run python ./tools/extract_openapi.py app.main:app --app-dir ./server --out ./api/openapi.yaml --app_version_file ./VERSION
language: system
types: [python]
pass_filenames: false
always_run: true
- repo: local
hooks:
- id: generate_client
name: generate client
entry: poetry --directory server run python ./tools/client_generator/generate.py --file ./api/openapi.yaml
language: system
types: [python]
pass_filenames: false
always_run: true