-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
43 lines (43 loc) · 1.6 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
- id: isort
name: isort-docker-compose
description: "ライブラリの並べ替え"
entry: docker-compose -f api/docker/docker-compose.yaml exec -T app ./run.sh isort
files: api/src/
types: [python]
language: python
- id: pflake8
name: pflake8-docker-compose
description: "pepに対応するためのlinter"
entry: docker-compose -f api/docker/docker-compose.yaml exec -T app ./run.sh pflake8
files: api/src/
types: [python]
language: python
- id: pytest
name: pytest-docker-compose
description: "pytestの実行"
entry: docker-compose -f api/docker/docker-compose.yaml exec -T app poetry run pytest
files: "api/src/"
types: [python]
pass_filenames: false
language: python
- id: swagger
name: generate-openapi-file
description: "openAPIが生成されているかの確認"
entry: docker-compose -f api/docker/docker-compose.yaml exec -T app sh -c "poetry run fastapi_to_openapi -i src/main" && mv api/openapi.yaml rest_client/openapi.yaml
files: "api/src/"
types: [python]
pass_filenames: false
language: python