-
Notifications
You must be signed in to change notification settings - Fork 563
Expand file tree
/
Copy path.golangci.yml
More file actions
127 lines (127 loc) · 2.72 KB
/
Copy path.golangci.yml
File metadata and controls
127 lines (127 loc) · 2.72 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: "2"
output:
formats:
tab:
path: stdout
linters:
default: none
enable:
- dupword
- err113
- errname
- errorlint
- exptostd
- goheader
- gomodguard_v2
- govet
- ineffassign
- intrange
- loggercheck
- makezero
- misspell
- mirror
- modernize
- perfsprint
- revive
- sloglint
- staticcheck
- testifylint
- unused
settings:
dupword:
keywords:
- the
- and
- a
- for
- to
- as
- in
- of
- with
- by
- "on"
- at
- from
sloglint:
no-mixed-args: true
kv-only: true
no-global: "default"
forbidden-keys:
- time
- level
- msg
- source
goheader:
values:
regexp:
PROJECT: Tetragon|Cilium|Hubble
template: |-
SPDX-License-Identifier: Apache-2.0
Copyright Authors of {{ PROJECT }}
gomodguard:
blocked:
modules:
- github.com/cilium/cilium:
recommendations:
- github.com/cilium/tetragon
reason: cilium/cilium package might be overkilled, consider other alternatives
- go.uber.org/atomic:
recommendations:
- sync/atomic
reason: Go 1.19+ supports atomic types, see https://go.dev/doc/go1.19#atomic_types
- gopkg.in/yaml.v2:
recommendations:
- "sigs.k8s.io/yaml"
reason: This project is unmaintained.
- gopkg.in/yaml.v3:
recommendations:
- "sigs.k8s.io/yaml"
reason: This project is unmaintained.
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- err113
text: do not define dynamic errors, use wrapped static errors instead
- linters:
- revive
text: exported const
- linters:
- revive
text: var-naming
- linters:
- goheader
path: pkg/sensors/tracing/genericuprobe_cgo.go
# Modernize also checks for this but more gently
- linters:
- perfsprint
text: "concat-loop: string concatenation in a loop"
paths:
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
uniq-by-line: false
formatters:
enable:
- goimports
settings:
goimports:
local-prefixes:
- github.com/cilium/tetragon
- github.com/cilium/tetragon/api
- github.com/cilium/tetragon/pkg/k8s
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$