-
Notifications
You must be signed in to change notification settings - Fork 55
/
.pre-commit-config.yaml
59 lines (59 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
repos:
- repo: local
hooks:
- id: generate
name: Generate
language: node
entry: bash -c "./generate.sh"
files: '^(\.generator/.*|\.pre-commit-config\.yaml|Makefile|\tests/scenarios/features/.*|api/.*)'
pass_filenames: false
- id: lint
name: Lint
language: golang
entry: goimports -w api examples
stages: [manual]
# files: '^api/.*\.go'
# types: ["file", "go"]
pass_filenames: false
additional_dependencies:
- golang.org/x/tools/cmd/goimports@latest
- id: generate-doc
name: Doc generation
stages: [manual]
language: golang
entry: md-to-godoc
files: 'README.md'
pass_filenames: false
additional_dependencies:
- github.com/therve/md-to-godoc@452c0541b9500da3750489330b5a8f7a820a590c
- id: docs
name: Format documentation
stages: [manual]
language: node
language_version: 20.5.0
entry: prettier --write --list-different --ignore-unknown
# "types": [text]
files: 'README.md'
pass_filenames: true
additional_dependencies:
# When updating the version of prettier, make sure to check the pre-commit file
# And keep the `entry` here up to date https://github.com/pre-commit/mirrors-prettier/blob/master/.pre-commit-hooks.yaml
- id: generator
name: generator
language: python
entry: bash -c "cd .generator && poetry install && poetry run python -m generator ./schemas/v1/openapi.yaml ./schemas/v2/openapi.yaml -o ../api/"
files: "^.generator/(config|schemas/v1|src|poetry.lock|pyproject.toml)"
stages: [manual]
pass_filenames: false
additional_dependencies:
- "poetry"
- id: examples
name: examples
language: python
entry: bash -c "cd .generator && poetry install && poetry run pytest"
files: "^.generator/"
stages: [manual]
pass_filenames: false
additional_dependencies:
- "poetry"