Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1cab8ed

Browse files
committed
replace golint with revive, as it's deprecated
WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 65e1adc commit 1cab8ed

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

daemon/network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ func (daemon *Daemon) createNetwork(create types.NetworkCreateRequest, id string
365365
n, err := c.NewNetwork(driver, create.Name, id, nwOptions...)
366366
if err != nil {
367367
if _, ok := err.(libnetwork.ErrDataStoreNotInitialized); ok {
368-
//nolint: golint
368+
//nolint: revive
369369
return nil, errors.New("This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again.")
370370
}
371371
return nil, err

hack/validate/golangci-lint.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ linters:
33
- deadcode
44
- depguard
55
- goimports
6-
- golint
76
- gosec
87
- gosimple
98
- govet
109
- ineffassign
1110
- misspell
11+
- revive
1212
- staticcheck
1313
- structcheck
1414
- typecheck
@@ -55,10 +55,6 @@ issues:
5555
- text: "Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*print(f|ln)?|os\\.(Un)?Setenv). is not checked"
5656
linters:
5757
- errcheck
58-
# EXC0003
59-
- text: "func name will be used as test\\.Test.* by other packages, and that stutters; consider calling this"
60-
linters:
61-
- golint
6258
# EXC0006
6359
- text: "Use of unsafe calls should be audited"
6460
linters:
@@ -102,7 +98,7 @@ issues:
10298
- text: "type name will be used as (container|volume)\\.(Container|Volume).* by other packages, and that stutters; consider calling this"
10399
path: "api/types/(volume|container)/"
104100
linters:
105-
- golint
101+
- revive
106102
# FIXME temporarily suppress these. See #39924
107103
- text: "SA1019: .*\\.Xattrs has been deprecated since Go 1.10: Use PAXRecords instead"
108104
linters:

integration/internal/network/network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func Create(ctx context.Context, client client.APIClient, name string, ops ...fu
2626
}
2727

2828
// CreateNoError creates a network with the specified options and verifies there were no errors
29-
func CreateNoError(ctx context.Context, t *testing.T, client client.APIClient, name string, ops ...func(*types.NetworkCreate)) string { //nolint: golint
29+
func CreateNoError(ctx context.Context, t *testing.T, client client.APIClient, name string, ops ...func(*types.NetworkCreate)) string {
3030
t.Helper()
3131

3232
name, err := createNetwork(ctx, client, name, ops...)

0 commit comments

Comments
 (0)