Skip to content

Commit 4f3047c

Browse files
committed
Use revive instead of golint
Signed-off-by: pigletfly <[email protected]>
1 parent a23fffb commit 4f3047c

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

.github/workflows/components-contrib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
GOOS: ${{ matrix.target_os }}
3434
GOARCH: ${{ matrix.target_arch }}
3535
GOPROXY: https://proxy.golang.org
36-
GOLANGCI_LINT_VER: v1.31
36+
GOLANGCI_LINT_VER: v1.45.2
3737
strategy:
3838
matrix:
3939
os: [ubuntu-latest, windows-latest, macOS-latest]

.golangci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ linters-settings:
8888
disable:
8989
- shadow
9090
disable-all: false
91-
golint:
91+
revive:
9292
# minimal confidence for issues, default is 0.8
9393
min-confidence: 0.8
9494
gofmt:
@@ -246,3 +246,4 @@ linters:
246246
- exhaustive
247247
- noctx
248248
- gci
249+
- golint

bindings/http/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
)
3333

3434
// HTTPSource is a binding for an http url endpoint invocation
35-
// nolint:golint
35+
//revive:disable
3636
type HTTPSource struct {
3737
metadata httpMetadata
3838
client *http.Client

nameresolution/consul/configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func mapAdvancedRegistration(config *AgentServiceRegistration) *consul.AgentServ
327327
return mapped
328328
}
329329

330-
//nolint:golint,stylecheck
330+
//revive:disable,stylecheck
331331
type HttpBasicAuth struct {
332332
Username string
333333
Password string
@@ -337,7 +337,7 @@ type Config struct {
337337
Address string
338338
Scheme string
339339
Datacenter string
340-
HttpAuth *HttpBasicAuth //nolint:golint,stylecheck
340+
HttpAuth *HttpBasicAuth //revive:disable,stylecheck
341341
WaitTime time.Duration
342342
Token string
343343
TokenFile string

pubsub/azure/servicebus/message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func NewPubsubMessageFromASBMessage(asbMsg *azservicebus.Message, topic string)
114114
// Always set delivery count.
115115
addToMetadata(pubsubMsg, DeliveryCountMetadataKey, strconv.FormatInt(int64(asbMsg.DeliveryCount), 10))
116116

117-
//nolint:golint,nestif
117+
//revive:disable,nestif
118118
if asbMsg.SystemProperties != nil {
119119
systemProps := asbMsg.SystemProperties
120120
if systemProps.EnqueuedTime != nil {

state/redis/redis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ func (r *StateStore) Multi(request *state.TransactionalStateRequest) error {
403403

404404
pipe := r.client.TxPipeline()
405405
for _, o := range request.Operations {
406-
//nolint:golint,nestif
406+
//revive:disable,nestif
407407
if o.Operation == state.Upsert {
408408
req := o.Request.(state.SetRequest)
409409
ver, err := r.parseETag(&req)

0 commit comments

Comments
 (0)