Skip to content

Commit 9c0c49a

Browse files
committed
golangci-lint: revive: enable empty-lines
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 8e9aec6 commit 9c0c49a

12 files changed

Lines changed: 8 additions & 12 deletions

File tree

.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ linters-settings:
6161
- name: import-shadowing
6262
severity: warning
6363
disabled: false
64+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
65+
- name: empty-block
66+
severity: warning
67+
disabled: false
68+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
69+
- name: empty-lines
70+
severity: warning
71+
disabled: false
6472

6573
issues:
6674
# The default exclusion rules are a bit too permissive, so copying the relevant ones below

cli/command/container/cp.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ func copyFromContainer(ctx context.Context, dockerCli command.Cli, copyConfig cp
246246
linkTarget, rebaseName = archive.GetRebaseName(srcPath, linkTarget)
247247
srcPath = linkTarget
248248
}
249-
250249
}
251250

252251
ctx, cancel := signal.NotifyContext(ctx, os.Interrupt)

cli/command/formatter/container_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ size: 0B
265265
assert.Equal(t, out.String(), tc.expected)
266266
}
267267
})
268-
269268
}
270269
}
271270

cli/command/formatter/image.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ func imageFormatTaggedAndDigest(ctx ImageContext, img image.Summary) []*imageCon
166166
for _, dgst := range digests {
167167
addImage(repo, tag, dgst)
168168
}
169-
170169
}
171170
}
172171

cli/command/network/connect_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ func TestNetworkConnectErrors(t *testing.T) {
3939
cmd.SetArgs(tc.args)
4040
cmd.SetOut(io.Discard)
4141
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
42-
4342
}
4443
}
4544

cli/command/network/create_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ func TestNetworkCreateErrors(t *testing.T) {
139139
}
140140
cmd.SetOut(io.Discard)
141141
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
142-
143142
}
144143
}
145144

cli/command/network/remove_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ func TestNetworkRemoveForce(t *testing.T) {
9090
} else {
9191
assert.Check(t, is.Contains(fakeCli.ErrBuffer().String(), tc.expectedErr))
9292
assert.ErrorContains(t, err, "Code: 1")
93-
9493
}
9594
})
9695
}

cli/command/service/progress/progress.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ func (u *globalProgressUpdater) tasksByNode(tasks []swarm.Task) map[string]swarm
493493
numberedStates[existingTask.Status.State] <= numberedStates[task.Status.State] {
494494
continue
495495
}
496-
497496
}
498497
tasksByNode[task.NodeID] = task
499498
}

cli/command/service/scale.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ func runScale(dockerCli command.Cli, options *scaleOptions, args []string) error
7676
} else {
7777
serviceIDs = append(serviceIDs, serviceID)
7878
}
79-
8079
}
8180

8281
if len(serviceIDs) > 0 {

cli/command/swarm/ipnet_slice_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ func TestIPNetBadQuoting(t *testing.T) {
131131
}
132132

133133
for i, test := range tests {
134-
135134
var cidrs []net.IPNet
136135
f := setUpIPNetFlagSet(&cidrs)
137136

0 commit comments

Comments
 (0)