Skip to content

Commit

Permalink
Use revive instead of golint
Browse files Browse the repository at this point in the history
Signed-off-by: pigletfly <[email protected]>
  • Loading branch information
pigletfly committed Apr 25, 2022
1 parent a23fffb commit 4f3047c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/components-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
GOOS: ${{ matrix.target_os }}
GOARCH: ${{ matrix.target_arch }}
GOPROXY: https://proxy.golang.org
GOLANGCI_LINT_VER: v1.31
GOLANGCI_LINT_VER: v1.45.2
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
Expand Down
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ linters-settings:
disable:
- shadow
disable-all: false
golint:
revive:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
gofmt:
Expand Down Expand Up @@ -246,3 +246,4 @@ linters:
- exhaustive
- noctx
- gci
- golint
2 changes: 1 addition & 1 deletion bindings/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

// HTTPSource is a binding for an http url endpoint invocation
// nolint:golint
//revive:disable
type HTTPSource struct {
metadata httpMetadata
client *http.Client
Expand Down
4 changes: 2 additions & 2 deletions nameresolution/consul/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func mapAdvancedRegistration(config *AgentServiceRegistration) *consul.AgentServ
return mapped
}

//nolint:golint,stylecheck
//revive:disable,stylecheck
type HttpBasicAuth struct {
Username string
Password string
Expand All @@ -337,7 +337,7 @@ type Config struct {
Address string
Scheme string
Datacenter string
HttpAuth *HttpBasicAuth //nolint:golint,stylecheck
HttpAuth *HttpBasicAuth //revive:disable,stylecheck
WaitTime time.Duration
Token string
TokenFile string
Expand Down
2 changes: 1 addition & 1 deletion pubsub/azure/servicebus/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func NewPubsubMessageFromASBMessage(asbMsg *azservicebus.Message, topic string)
// Always set delivery count.
addToMetadata(pubsubMsg, DeliveryCountMetadataKey, strconv.FormatInt(int64(asbMsg.DeliveryCount), 10))

//nolint:golint,nestif
//revive:disable,nestif
if asbMsg.SystemProperties != nil {
systemProps := asbMsg.SystemProperties
if systemProps.EnqueuedTime != nil {
Expand Down
2 changes: 1 addition & 1 deletion state/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (r *StateStore) Multi(request *state.TransactionalStateRequest) error {

pipe := r.client.TxPipeline()
for _, o := range request.Operations {
//nolint:golint,nestif
//revive:disable,nestif
if o.Operation == state.Upsert {
req := o.Request.(state.SetRequest)
ver, err := r.parseETag(&req)
Expand Down

0 comments on commit 4f3047c

Please sign in to comment.