golangci-lint: revive: enable empty-lines

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-11-20 17:44:39 +01:00
parent 8e9aec6904
commit 9c0c49a5f2
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
12 changed files with 8 additions and 12 deletions

View File

@ -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

View File

@ -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)

View File

@ -265,7 +265,6 @@ size: 0B
assert.Equal(t, out.String(), tc.expected)
}
})
}
}

View File

@ -166,7 +166,6 @@ func imageFormatTaggedAndDigest(ctx ImageContext, img image.Summary) []*imageCon
for _, dgst := range digests {
addImage(repo, tag, dgst)
}
}
}

View File

@ -39,7 +39,6 @@ func TestNetworkConnectErrors(t *testing.T) {
cmd.SetArgs(tc.args)
cmd.SetOut(io.Discard)
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
}
}

View File

@ -139,7 +139,6 @@ func TestNetworkCreateErrors(t *testing.T) {
}
cmd.SetOut(io.Discard)
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
}
}

View File

@ -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")
}
})
}

View File

@ -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
}

View File

@ -76,7 +76,6 @@ func runScale(dockerCli command.Cli, options *scaleOptions, args []string) error
} else {
serviceIDs = append(serviceIDs, serviceID)
}
}
if len(serviceIDs) > 0 {

View File

@ -131,7 +131,6 @@ func TestIPNetBadQuoting(t *testing.T) {
}
for i, test := range tests {
var cidrs []net.IPNet
f := setUpIPNetFlagSet(&cidrs)

View File

@ -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)

View File

@ -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{