mirror of https://github.com/status-im/consul.git
Sync .golangci.yml from ENT (#17180)
This commit is contained in:
parent
eded58b62a
commit
1037bf7f69
|
@ -23,29 +23,14 @@ issues:
|
||||||
# Temp Ignore SA9004: only the first constant in this group has an explicit type
|
# Temp Ignore SA9004: only the first constant in this group has an explicit type
|
||||||
# https://staticcheck.io/docs/checks#SA9004
|
# https://staticcheck.io/docs/checks#SA9004
|
||||||
- linters: [staticcheck]
|
- linters: [staticcheck]
|
||||||
text: 'SA9004:'
|
text: "SA9004:"
|
||||||
|
|
||||||
- linters: [staticcheck]
|
|
||||||
text: 'SA1019: "github.com/golang/protobuf/jsonpb" is deprecated: Use the "google.golang.org/protobuf/encoding/protojson" package instead.'
|
|
||||||
|
|
||||||
- linters: [staticcheck]
|
|
||||||
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
|
|
||||||
|
|
||||||
- linters: [staticcheck]
|
|
||||||
text: 'SA1019: ptypes.MarshalAny is deprecated'
|
|
||||||
|
|
||||||
- linters: [staticcheck]
|
|
||||||
text: 'SA1019: ptypes.UnmarshalAny is deprecated'
|
|
||||||
|
|
||||||
- linters: [staticcheck]
|
|
||||||
text: 'SA1019: "github.com/golang/protobuf/ptypes" is deprecated: Well-known types have specialized functionality directly injected into the generated packages for each message type. See the deprecation notice for each function for the suggested alternative.'
|
|
||||||
|
|
||||||
- linters: [staticcheck]
|
- linters: [staticcheck]
|
||||||
text: 'SA1019: "io/ioutil" has been deprecated since Go 1.16'
|
text: 'SA1019: "io/ioutil" has been deprecated since Go 1.16'
|
||||||
|
|
||||||
# An argument that always receives the same value is often not a problem.
|
# An argument that always receives the same value is often not a problem.
|
||||||
- linters: [unparam]
|
- linters: [unparam]
|
||||||
text: 'always receives'
|
text: "always receives"
|
||||||
|
|
||||||
# Often functions will implement an interface that returns an error without
|
# Often functions will implement an interface that returns an error without
|
||||||
# needing to return an error. Sometimes the error return value is unnecessary
|
# needing to return an error. Sometimes the error return value is unnecessary
|
||||||
|
@ -59,18 +44,18 @@ issues:
|
||||||
# self-documentation than a single underscore by itself. Underscore arguments
|
# self-documentation than a single underscore by itself. Underscore arguments
|
||||||
# should generally only be used when a function is implementing an interface.
|
# should generally only be used when a function is implementing an interface.
|
||||||
- linters: [unparam]
|
- linters: [unparam]
|
||||||
text: '`_[^`]*` is unused'
|
text: "`_[^`]*` is unused"
|
||||||
|
|
||||||
# Temp ignore some common unused parameters so that unparam can be added
|
# Temp ignore some common unused parameters so that unparam can be added
|
||||||
# incrementally.
|
# incrementally.
|
||||||
- linters: [unparam]
|
- linters: [unparam]
|
||||||
text: '`(t|resp|req|entMeta)` is unused'
|
text: "`(t|resp|req|entMeta)` is unused"
|
||||||
|
|
||||||
# Temp ignore everything in _oss(_test).go and _ent(_test).go. Many of these
|
# Temp ignore everything in _oss(_test).go and _ent(_test).go. Many of these
|
||||||
# could use underscore to ignore the unused arguments, but the "always returns"
|
# could use underscore to ignore the unused arguments, but the "always returns"
|
||||||
# issue will likely remain in oss, and will need to be excluded.
|
# issue will likely remain in oss, and will need to be excluded.
|
||||||
- linters: [unparam]
|
- linters: [unparam]
|
||||||
path: '(_oss.go|_oss_test.go|_ent.go|_ent_test.go)'
|
path: "(_oss.go|_oss_test.go|_ent.go|_ent_test.go)"
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
govet:
|
govet:
|
||||||
|
@ -115,7 +100,7 @@ linters-settings:
|
||||||
# Specify an error message to output when a denied package is used.
|
# Specify an error message to output when a denied package is used.
|
||||||
# Default: []
|
# Default: []
|
||||||
packages-with-error-message:
|
packages-with-error-message:
|
||||||
- net/rpc: 'only use forked copy in github.com/hashicorp/consul-net-rpc/net/rpc'
|
- net/rpc: "only use forked copy in github.com/hashicorp/consul-net-rpc/net/rpc"
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 10m
|
timeout: 10m
|
||||||
|
|
|
@ -9,10 +9,10 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
"github.com/oklog/ulid/v2"
|
"github.com/oklog/ulid/v2"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
"google.golang.org/protobuf/types/known/anypb"
|
"google.golang.org/protobuf/types/known/anypb"
|
||||||
|
|
||||||
"github.com/hashicorp/consul/acl"
|
"github.com/hashicorp/consul/acl"
|
||||||
|
|
Loading…
Reference in New Issue