1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-07-02 21:51:37 +02:00
parent 65e1adc219
commit 1cab8eda24
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
3 changed files with 4 additions and 8 deletions

View file

@ -365,7 +365,7 @@ func (daemon *Daemon) createNetwork(create types.NetworkCreateRequest, id string
n, err := c.NewNetwork(driver, create.Name, id, nwOptions...) n, err := c.NewNetwork(driver, create.Name, id, nwOptions...)
if err != nil { if err != nil {
if _, ok := err.(libnetwork.ErrDataStoreNotInitialized); ok { if _, ok := err.(libnetwork.ErrDataStoreNotInitialized); ok {
//nolint: golint //nolint: revive
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.") 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.")
} }
return nil, err return nil, err

View file

@ -3,12 +3,12 @@ linters:
- deadcode - deadcode
- depguard - depguard
- goimports - goimports
- golint
- gosec - gosec
- gosimple - gosimple
- govet - govet
- ineffassign - ineffassign
- misspell - misspell
- revive
- staticcheck - staticcheck
- structcheck - structcheck
- typecheck - typecheck
@ -55,10 +55,6 @@ issues:
- text: "Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*print(f|ln)?|os\\.(Un)?Setenv). is not checked" - text: "Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*print(f|ln)?|os\\.(Un)?Setenv). is not checked"
linters: linters:
- errcheck - errcheck
# EXC0003
- text: "func name will be used as test\\.Test.* by other packages, and that stutters; consider calling this"
linters:
- golint
# EXC0006 # EXC0006
- text: "Use of unsafe calls should be audited" - text: "Use of unsafe calls should be audited"
linters: linters:
@ -102,7 +98,7 @@ issues:
- text: "type name will be used as (container|volume)\\.(Container|Volume).* by other packages, and that stutters; consider calling this" - text: "type name will be used as (container|volume)\\.(Container|Volume).* by other packages, and that stutters; consider calling this"
path: "api/types/(volume|container)/" path: "api/types/(volume|container)/"
linters: linters:
- golint - revive
# FIXME temporarily suppress these. See #39924 # FIXME temporarily suppress these. See #39924
- text: "SA1019: .*\\.Xattrs has been deprecated since Go 1.10: Use PAXRecords instead" - text: "SA1019: .*\\.Xattrs has been deprecated since Go 1.10: Use PAXRecords instead"
linters: linters:

View file

@ -26,7 +26,7 @@ func Create(ctx context.Context, client client.APIClient, name string, ops ...fu
} }
// CreateNoError creates a network with the specified options and verifies there were no errors // CreateNoError creates a network with the specified options and verifies there were no errors
func CreateNoError(ctx context.Context, t *testing.T, client client.APIClient, name string, ops ...func(*types.NetworkCreate)) string { //nolint: golint func CreateNoError(ctx context.Context, t *testing.T, client client.APIClient, name string, ops ...func(*types.NetworkCreate)) string {
t.Helper() t.Helper()
name, err := createNetwork(ctx, client, name, ops...) name, err := createNetwork(ctx, client, name, ops...)