-
Notifications
You must be signed in to change notification settings - Fork 459
/
.golangci.yaml
73 lines (68 loc) · 1.68 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
73
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:
rules:
main:
deny:
- pkg: sync/atomic
desc: "Use go.uber.org/atomic instead of sync/atomic"
- pkg: github.com/pkg/errors
desc: "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