-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
82 lines (73 loc) · 2.15 KB
/
.pre-commit-config.yaml
File metadata and controls
82 lines (73 loc) · 2.15 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
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-merge-conflict
- id: check-yaml
- id: check-json
- id: pretty-format-json
args:
- "--autofix"
- "--indent=4"
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0
hooks:
- id: yamllint
args: [-s, .]
types: [yaml]
files: \.(yaml|yml)$
- repo: local
hooks:
- id: gofmt
name: gofmt
description: Formats Go code using 'go fmt'
entry: make gofmt
language: system
types: [go]
pass_filenames: false
always_run: true
- id: gosec
name: gosec
description: Inspects source code for security problems by scanning the Go AST
entry: make gosec
language: system
types: [go]
pass_filenames: false
- id: go-vet
name: go-vet
description: Reports suspicious constructs in Go code that may indicate bugs
entry: make govet
language: system
types: [go]
pass_filenames: false
- id: goerrcheck
name: goerrcheck
description: Finds unchecked errors in Go code that could lead to error handling bugs
entry: make goerrcheck
language: system
types: [go]
pass_filenames: false
- id: golangci
name: golangci
description: Run all linters and formatters configured in .golangci.yaml
entry: make golangci
language: system
types: [go]
pass_filenames: false
- repo: https://github.com/hadolint/hadolint
rev: v2.13.1-beta
hooks:
- id: hadolint-docker
name: hadolint
args: [--failure-threshold=error]
- repo: local
hooks:
- id: trufflehog
name: TruffleHog
description: Detect secrets in your data.
entry: bash -c 'trufflehog git file://. --since-commit HEAD --no-update --results=verified,unknown --fail'
language: system
stages: ["pre-commit", "pre-push"]