forked from acornak/poc-gpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
46 lines (43 loc) · 1.18 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: '^.*swagger\.json$'
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
files: ^go-server/.*\.go$
types: [file]
- id: go-imports
files: ^go-server/.*\.go$
types: [file]
- id: no-go-testing
files: ^(?!.*_test\.go$)go-server/.*\.go$
types: [file]
- repo: local
hooks:
- id: custom-golangci-lint
name: golangci-lint
entry: sh -c 'cd go-server && golangci-lint run'
language: system
files: ^go-server/.*\.go$
types: [file]
- id: custom-go-unit-tests
name: go-unit-tests
entry: sh -c 'cd go-server && go test ./...'
language: system
files: ^go-server/.*\.go$
types: [file]
- repo: https://github.com/muya/swaggo-hooks
rev: v1.1.1
hooks:
- id: swag-init
files: ^go-server/
args:
- --generalInfo=go-server/cmd/main.go
- --output=go-server/docs