-
Notifications
You must be signed in to change notification settings - Fork 23
/
.pre-commit-config.yaml
94 lines (94 loc) · 2.91 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.11.0
hooks:
- id: helm-docs-built
name: 'Helm Docs for Turing Chart'
files: '^infra/charts/turing/'
args:
- --chart-search-root=infra/charts/turing
- --template-files=./README.md.gotmpl
- id: helm-docs-built
name: 'Helm Docs for Turing Init Chart'
files: '^infra/charts/turing-init/'
args:
- --chart-search-root=infra/charts/turing-init
- --template-files=./README.md.gotmpl
- repo: local
hooks:
- id: golangci-lint
name: 'Linter for API'
alias: golangci-lint-api
files: '^api/'
types: [go]
language: system
entry: bash -c 'cd api make lint'
- id: golangci-lint
name: 'Linter for the Router Engine'
alias: golangci-lint-router
files: '^engines/router/'
types: [go]
language: system
entry: bash -c 'cd engines/router make lint'
- id: golangci-lint
name: 'Linter for the Experiment Engine'
alias: golangci-lint-experiment
files: '^engines/experiment/'
types: [go]
language: system
entry: bash -c 'cd engines/experiment make lint'
- repo: local
hooks:
- id: goimports
name: 'Run goimports'
alias: goimports
files: '^[api/|engines/router/|engines/experiment/]'
exclude: "pb.go"
types: [go]
language: system
entry: goimports -w -local github.com/caraml-dev/turing
- repo: local
hooks:
- id: prettier
name: 'Prettier for UI'
files: '^ui/'
types_or: [javascript, css]
language: system
entry: bash -c 'cd ui && yarn lint'
- repo: local
hooks:
- id: openapi-bundle
name: 'OpenAPI Swagger Dist'
files: '^api/api/specs/'
language: system
entry: bash -c 'cd api/api && make all'
- repo: local
hooks:
- id: openapi-gen
name: 'OpenAPI Python client'
files: '^api/api/specs/'
language: system
entry: bash -c 'cd sdk && make gen-client'
- repo: local
hooks:
- id: black
name: 'Black formatter for the SDK'
alias: black-sdk
files: '^sdk/'
types: [python]
language: system
entry: bash -c 'cd sdk && make lint'
- id: black
name: 'Black formatter for Pyfunc Ensembler Job Engine'
alias: black-ensembler-job
files: '^engines/pyfunc-ensembler-job/'
types: [python]
language: system
entry: bash -c 'cd engines/pyfunc-ensembler-job && make lint'
- id: black
name: 'Black formatter for Pyfunc Ensembler Service Engine'
alias: black-ensembler-service
files: '^engines/pyfunc-ensembler-service/'
types: [python]
language: system
entry: bash -c 'cd engines/pyfunc-ensembler-service && make lint'