forked from harvester/harvester
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yaml
More file actions
56 lines (56 loc) · 1.53 KB
/
.golangci.yaml
File metadata and controls
56 lines (56 loc) · 1.53 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
version: 2
linters:
disable-all: true
enable:
- errcheck
- govet
- gosec
- ineffassign
- staticcheck
- unused
- misspell
- prealloc
formatters:
enable:
- gofmt
settings:
gosec:
# https://github.com/securego/gosec#available-rules
excludes:
- G101 # Look for hard coded credentials
- G108 # Profiling endpoint is automatically exposed on /debug/pprof
- G401 # Use of weak cryptographic primitive
- G402 # TLS InsecureSkipVerify set true
- G505 # Blocklisted import crypto/md5: weak cryptographic primitive
config:
G306: "0644" # Poor file permissions used when writing to a new file
exclude-files:
- /zz_generated_
- _generated
exclude-dirs:
- generated
exclusions:
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- staticcheck
text: "QF1003:" # could use tagged switch on errCode (staticcheck)
- linters:
- staticcheck
text: "QF1007:" # could merge conditional assignment into variable declaration (staticcheck)
- linters:
- staticcheck
text: "QF1008:" # could remove embedded field from selector (staticcheck)
- linters:
- staticcheck
text: "SA1019:" # function is deprecated (staticcheck)
- linters:
- staticcheck
text: "QF1012:" # Use fmt.Fprint(...) instead of Write([]byte(fmt.Sprint(...)))
run:
timeout: 5m
tests: true