-
Notifications
You must be signed in to change notification settings - Fork 6
/
.golangci.yml
77 lines (71 loc) · 1.96 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
issues:
# Do not limit the number of issues per linter.
max-issues-per-linter: 0
# Do not limit the number of times a same issue is reported.
max-same-issues: 0
exclude-rules:
# Exclude some linters from running on tests files.
- path: '(.+)_test\.go'
linters:
- errcheck
- text: "appendAssign"
linters: gocritic
linters:
disable-all: true
enable:
- bodyclose
- depguard
- errcheck
- errorlint
- exportloopref
- gofmt
- govet
- ineffassign
- misspell
- revive
- staticcheck
- tenv
- unconvert
- unparam
- unused
linters-settings:
depguard:
include-go-root: true
packages-with-error-message:
- sync/atomic: "Use go.uber.org/atomic instead"
rules:
main:
files:
- $all
allow:
- $gostd
- github.com/open-telemetry/opentelemetry-collector-contrib
- github.com/DataDog/datadog-agent
- github.com/DataDog/datadog-api-client-go
- github.com/DataDog/gohai
- github.com/DataDog/opentelemetry-mapping-go
- github.com/DataDog/sketches-go
- github.com/dustin/go-humanize
- github.com/golang
- github.com/lightstep/go-expohisto
- github.com/patrickmn/go-cache
- github.com/stretchr/testify
- google.golang.org/protobuf/proto
- golang.org/x/exp
- gopkg.in/yaml.v3
- go.uber.org
staticcheck:
go: "1.20"
checks: ["all",
"-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", # These ones are disabled by default on staticcheck
"-ST1013", # Use HTTP code enums instead of integers
"-SA1019", "-SA4011", "-SA4031" # Disabling these to re-enable golanci-lint default tests
]
gofmt:
simplify: true
govet:
check-shadowing: true
revive:
rules:
- name: package-comments
disabled: true