This repository has been archived by the owner on Jul 9, 2022. It is now read-only.
forked from kumahq/kuma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
101 lines (98 loc) · 4.1 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
linters:
enable:
- bodyclose
- contextcheck
- gci
- gocritic
- gofmt
- gomodguard
- importas
- misspell
- unconvert
- unparam
- whitespace
run:
skip-files:
- app/kumactl/pkg/k8s/kubectl_proxy.go # excluded to keep as close to original file from K8S repository
- pkg/xds/server/server.go # excluded to keep as close to original file from Envoy repository
- pkg/xds/server/server_test.go # excluded to keep as close to original file from Envoy repository
modules-download-mode: readonly
skip-dirs-use-default: false # The default skip omits "builtin" directories, which we have.
skip-dirs:
- pkg/transparentproxy/istio/tools
- (^|/)vendored($|/)
linters-settings:
gocritic:
disabled-checks:
- singleCaseSwitch
gci:
local-prefixes: github.com/kumahq/kuma
importas:
alias:
- pkg: github.com/kumahq/kuma/pkg/core/resources/apis/mesh
alias: core_mesh
- pkg: github.com/kumahq/kuma/api/mesh/v1alpha1
alias: mesh_proto
- pkg: github.com/kumahq/kuma/api/system/v1alpha1
alias: system_proto
- pkg: github.com/kumahq/kuma/pkg/util/proto
alias: util_proto
- pkg: github.com/kumahq/kuma/pkg/util/rsa
alias: util_rsa
- pkg: github.com/kumahq/kuma/pkg/cmd
alias: kuma_cmd
- pkg: github.com/kumahq/kuma/pkg/plugins/bootstrap/k8s
alias: bootstrap_k8s
- pkg: github.com/kumahq/kuma/pkg/config/core
alias: config_core
gomodguard:
blocked:
modules:
- github.com/go-errors/errors:
recommendations:
- github.com/pkg/errors
misspell:
locale: US
ignore-words:
- cancelled # US English should be "canceled", but this is in the Retry API, so we can't change it.
gofmt:
simplify: true
issues:
fix: true
exclude-rules:
- linters:
- staticcheck
text: "SA1019: package github.com/golang/protobuf/proto is deprecated" # TODO ignore deprecation of proto library. We don't want to migrate yet because go-control-plane is not ready
- linters:
- staticcheck
text: "SA1019: package github.com/golang/protobuf/jsonpb" # TODO ignore deprecation of proto library. We don't want to migrate yet because go-control-plane is not ready
- linters:
- staticcheck
text: "SA1019: proto.MessageName is deprecated" # TODO ignore deprecation of proto library. We don't want to migrate yet because go-control-plane is not ready
- linters:
- staticcheck
text: "SA1019: proto.MessageType is deprecated" # TODO ignore deprecation of proto library. We don't want to migrate yet because go-control-plane is not ready
- linters:
- staticcheck
text: "SA1019: l.UseOriginalDst is deprecated: Do not use." # TODO What is the up-to-date alternative ?
- linters:
- staticcheck
text: "IsIngress is deprecated: use ZoneIngress" # It's deprecated but Kuma still needs to support it for backwards compatibility.
- linters:
- gocritic
text: "appendAssign: append result not assigned to the same slice" # None of the instances of this in Kuma were bugs.
- linters:
- staticcheck
text: "SA1019: package sigs.k8s.io/controller-runtime/pkg/client/fake is deprecated" # https://github.com/kumahq/kuma/issues/2460
- linters:
- staticcheck
text: "SA1019: l.ReusePort is deprecated"
- linters: # AdminPort is deprecated, but it's used to support backwards compatibility
- staticcheck
text: "SA1019: cfg.Runtime.Kubernetes.Injector.SidecarContainer.AdminPort is deprecated: Use KUMA_BOOTSTRAP_SERVER_PARAMS_ADMIN_PORT instead."
- linters: # AdminPort is deprecated, but it's used to support backwards compatibility
- staticcheck
text: "SA1019: kumaCPConfig.Runtime.Kubernetes.Injector.SidecarContainer.AdminPort is deprecated: Use KUMA_BOOTSTRAP_SERVER_PARAMS_ADMIN_PORT instead."
- linters: # AdminPort is deprecated, but it's used to support backwards compatibility
- staticcheck
text: "SA1019: c.Runtime.Kubernetes.Injector.SidecarContainer.AdminPort is deprecated: Use KUMA_BOOTSTRAP_SERVER_PARAMS_ADMIN_PORT instead."