forked from cilium/hubble
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
84 lines (81 loc) · 1.95 KB
/
.golangci.yml
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
# See https://golangci-lint.run/usage/configuration/ for available options.
# Also https://github.com/cilium/cilium/blob/master/.golangci.yaml as a
# reference.
run:
go: '1.19'
timeout: 3m # default is 1m
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- contextcheck
- decorder
- dupword
- durationcheck
- errchkjson
- errname
- gocritic
- goerr113
- gofmt
- goheader
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- importas
- ineffassign
- interfacebloat
- makezero
- misspell
- nakedret
- nilerr
- noctx
- nosprintfhostport
- predeclared
- reassign
- revive
- staticcheck
- tenv
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
linters-settings:
goheader:
values:
regexp:
PROJECT: 'Cilium|Hubble'
template: |-
SPDX-License-Identifier: Apache-2.0
Copyright Authors of {{ PROJECT }}
govet:
enable-all: true
disable:
- fieldalignment
- shadow
issues:
# Default rules exclude Go doc comments check, which is rather unfortunate.
# In order to enable Go doc checks, defaults rules have to be disabled.
# See https://github.com/golangci/golangci-lint/issues/456 for details.
exclude-use-default: false
exclude:
- (G104|G307) # EXC0008 gosec: Duplicated errcheck checks
exclude-rules:
- linters: [staticcheck]
text: "SA1019" # deprecated methods
- linters: [goerr113]
text: "do not define dynamic errors, use wrapped static errors instead"
- linters: [gosec]
text: "G402" # TLS InsecureSkipVerify may be true
- linters: [revive]
text: "should have a package comment"
- linters: [dupword]
path: cmd/list/node_test.go # tripping on command output
- linters: [dupword]
path: pkg/printer/printer_test.go # tripping on command output