-
Notifications
You must be signed in to change notification settings - Fork 370
/
.golangci.yml
67 lines (63 loc) · 1.83 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
# See https://golangci-lint.run/usage/configuration/ for available options.
# Also https://github.com/cilium/cilium/blob/master/.golangci.yaml as a reference.
run:
timeout: 10m
output:
formats:
- format: tab
unique-by-line: false
sort-results: true
linters:
disable-all: true
enable:
- err113
- goheader
- goimports
- govet
- ineffassign
- misspell
- revive
- staticcheck
- unused
- gosimple
- makezero
- dupword
- gomodguard
linters-settings:
goheader:
values:
regexp:
PROJECT: 'Tetragon|Cilium|Hubble'
template: |-
SPDX-License-Identifier: Apache-2.0
Copyright Authors of {{ PROJECT }}
dupword:
keywords: ["the", "and", "a", "for", "to", "as", "in", "of", "with", "by", "on", "at", "from"]
gomodguard:
blocked:
modules:
- golang.org/x/exp/maps:
recommendations:
- iter
- maps
- slices
reason: "Go 1.23+ supports iterating over maps and slices, see https://go.dev/doc/go1.23#iterators"
- golang.org/x/exp/slices:
recommendations:
- slices
reason: "Go 1.21+ provides many common operations for slices using generic functions, see https://go.dev/doc/go1.21#slices"
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
# Disallows any kind of `fmt.Errorf("%s is too high", bar)`, too opinionated.
- linters: [err113]
text: "do not define dynamic errors, use wrapped static errors instead"
# Most exported consts are self-descriptive.
- linters: [revive]
text: "exported const"
- linters: [revive]
text: "var-naming"
# The file gets prefixed with "Code generated by cmd/cgo; DO NOT EDIT."
- linters: [goheader]
path: pkg/sensors/tracing/genericuprobe_cgo.go