mirror of https://github.com/docker/cli.git
golangci-lint: revive: enable empty-lines
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8e9aec6904
commit
9c0c49a5f2
|
@ -61,6 +61,14 @@ linters-settings:
|
|||
- name: import-shadowing
|
||||
severity: warning
|
||||
disabled: false
|
||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
|
||||
- name: empty-block
|
||||
severity: warning
|
||||
disabled: false
|
||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
|
||||
- name: empty-lines
|
||||
severity: warning
|
||||
disabled: false
|
||||
|
||||
issues:
|
||||
# The default exclusion rules are a bit too permissive, so copying the relevant ones below
|
||||
|
|
|
@ -246,7 +246,6 @@ func copyFromContainer(ctx context.Context, dockerCli command.Cli, copyConfig cp
|
|||
linkTarget, rebaseName = archive.GetRebaseName(srcPath, linkTarget)
|
||||
srcPath = linkTarget
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ctx, cancel := signal.NotifyContext(ctx, os.Interrupt)
|
||||
|
|
|
@ -265,7 +265,6 @@ size: 0B
|
|||
assert.Equal(t, out.String(), tc.expected)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,6 @@ func imageFormatTaggedAndDigest(ctx ImageContext, img image.Summary) []*imageCon
|
|||
for _, dgst := range digests {
|
||||
addImage(repo, tag, dgst)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ func TestNetworkConnectErrors(t *testing.T) {
|
|||
cmd.SetArgs(tc.args)
|
||||
cmd.SetOut(io.Discard)
|
||||
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,6 @@ func TestNetworkCreateErrors(t *testing.T) {
|
|||
}
|
||||
cmd.SetOut(io.Discard)
|
||||
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ func TestNetworkRemoveForce(t *testing.T) {
|
|||
} else {
|
||||
assert.Check(t, is.Contains(fakeCli.ErrBuffer().String(), tc.expectedErr))
|
||||
assert.ErrorContains(t, err, "Code: 1")
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -493,7 +493,6 @@ func (u *globalProgressUpdater) tasksByNode(tasks []swarm.Task) map[string]swarm
|
|||
numberedStates[existingTask.Status.State] <= numberedStates[task.Status.State] {
|
||||
continue
|
||||
}
|
||||
|
||||
}
|
||||
tasksByNode[task.NodeID] = task
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ func runScale(dockerCli command.Cli, options *scaleOptions, args []string) error
|
|||
} else {
|
||||
serviceIDs = append(serviceIDs, serviceID)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(serviceIDs) > 0 {
|
||||
|
|
|
@ -131,7 +131,6 @@ func TestIPNetBadQuoting(t *testing.T) {
|
|||
}
|
||||
|
||||
for i, test := range tests {
|
||||
|
||||
var cidrs []net.IPNet
|
||||
f := setUpIPNetFlagSet(&cidrs)
|
||||
|
||||
|
|
|
@ -340,7 +340,6 @@ func convertServiceConfigObjs(
|
|||
ConfigName: name,
|
||||
Runtime: &swarm.ConfigReferenceRuntimeTarget{},
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
confs, err := servicecli.ParseConfigs(apiClient, refs)
|
||||
|
@ -441,7 +440,6 @@ func convertHealthcheck(healthcheck *composetypes.HealthCheckConfig) (*container
|
|||
return &container.HealthConfig{
|
||||
Test: []string{"NONE"},
|
||||
}, nil
|
||||
|
||||
}
|
||||
if healthcheck.Timeout != nil {
|
||||
timeout = time.Duration(*healthcheck.Timeout)
|
||||
|
|
|
@ -98,7 +98,6 @@ func (ep *Endpoint) ClientOpts() ([]client.Opt, error) {
|
|||
withHTTPClient(tlsConfig),
|
||||
client.WithHost(ep.Host),
|
||||
)
|
||||
|
||||
} else {
|
||||
result = append(result,
|
||||
client.WithHTTPClient(&http.Client{
|
||||
|
|
Loading…
Reference in New Issue