forked from open-telemetry/opentelemetry-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
72 lines (67 loc) · 1.76 KB
/
.golangci.yaml
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
run:
concurrency: 4
timeout: 5m
issues-exit-code: 1
tests: true
# all available settings of specific linters
linters-settings:
goheader:
template-path: header.txt
goimports:
local-prefixes: github.com/open-telemetry/opentelemetry-operator
maligned:
suggest-new: true
misspell:
locale: US
ignore-words:
- cancelled
- metre
- meter
- metres
- kilometre
- kilometres
govet:
# report about shadowed variables
check-shadowing: true
# settings per analyzer
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
enable-all: true
# TODO: Enable this and fix the alignment issues.
disable:
- fieldalignment
gofmt:
simplify: true
revive:
min-confidence: 0.8
depguard:
list-type: denylist
include-go-root: true
packages-with-error-message:
# See https://github.com/open-telemetry/opentelemetry-collector/issues/5200 for rationale
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"
- github.com/pkg/errors: "Use 'errors' or 'fmt' instead of github.com/pkg/errors"
linters:
enable:
- goheader
- goimports
- misspell
- gosec
- govet
- exhaustive
- godot
- unparam
- gosimple
- unused
- staticcheck
- ineffassign
- typecheck
- unparam
- depguard
- errcheck
- errorlint