Skip to content

Commit a269c47

Browse files
committed
Use revive instead of golint
Signed-off-by: pigletfly <[email protected]>
1 parent 77de543 commit a269c47

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
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: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ run:
2828
# won't be reported. Default value is empty list, but there is
2929
# no need to include all autogenerated files, we confidently recognize
3030
# autogenerated files. If it's not please let us know.
31-
skip-files:
31+
# skip-files:
3232
# - ".*\\.my\\.go$"
3333
# - lib/bad.go
3434

@@ -62,7 +62,7 @@ linters-settings:
6262

6363
# path to a file containing a list of functions to exclude from checking
6464
# see https://github.com/kisielk/errcheck#excluding-functions for details
65-
exclude:
65+
# exclude:
6666

6767
funlen:
6868
lines: 60
@@ -88,9 +88,9 @@ linters-settings:
8888
disable:
8989
- shadow
9090
disable-all: false
91-
golint:
91+
revive:
9292
# minimal confidence for issues, default is 0.8
93-
min-confidence: 0.8
93+
confidence: 0.8
9494
gofmt:
9595
# simplify code: gofmt with `-s` option, true by default
9696
simplify: true
@@ -127,7 +127,7 @@ linters-settings:
127127
# Correct spellings using locale preferences for US or UK.
128128
# Default is to use a neutral variety of English.
129129
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
130-
locale: default
130+
locale: US
131131
ignore-words:
132132
- someword
133133
lll:
@@ -165,7 +165,7 @@ linters-settings:
165165
# See https://go-critic.github.io/overview#checks-overview
166166
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
167167
# By default list of stable checks is used.
168-
enabled-checks:
168+
# enabled-checks:
169169

170170
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
171171
disabled-checks:
@@ -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
@@ -33,7 +33,7 @@ import (
3333
)
3434

3535
// HTTPSource is a binding for an http url endpoint invocation
36-
// nolint:golint
36+
//revive:disable-next-line
3737
type HTTPSource struct {
3838
metadata httpMetadata
3939
client *http.Client

nameresolution/consul/configuration.go

Lines changed: 7 additions & 6 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-next-line
331331
type HttpBasicAuth struct {
332332
Username string
333333
Password string
@@ -337,11 +337,12 @@ type Config struct {
337337
Address string
338338
Scheme string
339339
Datacenter string
340-
HttpAuth *HttpBasicAuth //nolint:golint,stylecheck
341-
WaitTime time.Duration
342-
Token string
343-
TokenFile string
344-
TLSConfig TLSConfig
340+
//revive:disable-next-line
341+
HttpAuth *HttpBasicAuth
342+
WaitTime time.Duration
343+
Token string
344+
TokenFile string
345+
TLSConfig TLSConfig
345346
}
346347

347348
type TLSConfig struct {

pubsub/azure/servicebus/message.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ 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
118117
if asbMsg.SystemProperties != nil {
119118
systemProps := asbMsg.SystemProperties
120119
if systemProps.EnqueuedTime != nil {

state/redis/redis.go

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

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

0 commit comments

Comments
 (0)