-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
43 lines (39 loc) · 1.14 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
43 lines (39 loc) · 1.14 KB
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: detect-private-key
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-vet-mod
- id: go-imports
- id: go-cyclo
args: [-over=15]
- id: go-mod-tidy
- id: go-unit-tests
- id: golangci-lint
- repo: https://github.com/securecodewarrior/github-action-gosec
rev: v2.0.0
hooks:
- id: gosec
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: package.lock.json
- repo: local
hooks:
- id: go-test-coverage
name: go test coverage
entry: bash -c 'go test -coverprofile=coverage.out ./... && go tool cover -func=coverage.out | grep total | awk "{if (\$3+0 < 60) exit 1}"'
language: system
pass_filenames: false