/
.golangci.yaml
83 lines (79 loc) · 1.93 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
74
75
76
77
78
79
80
81
82
83
linters:
disable-all: true
enable:
- dogsled
- errcheck
- gocognit
- goconst
- gocritic
- gocyclo
- gofmt
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- staticcheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
- nilerr
- exhaustive
- depguard
- ginkgolinter
skip-dirs:
- vendor
linters-settings:
staticcheck:
checks:
- all
- '-SA1019' # https://staticcheck.io/docs/checks#SA1019
govet:
enable-all: true
disable:
- fieldalignment
depguard:
rules:
log_rules:
deny:
- pkg: "github.com/rs/zerolog/log"
desc: not allowed, use slog
- pkg: "github.com/sirupsen/logrus"
desc: not allowed, use slog
- pkg: "github.com/pingcap/log"
desc: not allowed, use slog
- pkg: "cloud.google.com/go/logging"
desc: not allowed, use slog
- pkg: "github.com/go-kit/log"
desc: not allowed, use slog
- pkg: "github.com/docker/docker/daemon/logger"
desc: not allowed, use slog
- pkg: "go.uber.org/zap"
desc: not allowed, use slog
- pkg: "istio.io/pkg/log"
desc: not allowed, use slog
error_rules:
deny:
- pkg: "github.com/go-errors/errors"
desc: use stdlib errors package instead
- pkg: "github.com/pkg/errors"
desc: 'use stdlib errors package instead, wrap errors with fmt.Errorf("your message: %w", err)'
misc_rules:
deny:
- pkg: "go.opencensus.io"
desc: use go.opentelemetry.io instead
run:
timeout: 3m
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- goconst
- unparam
service:
golangci-lint-version: v1.55.2