Browse code

builder: fix empty-lines (revive)

builder/remotecontext/detect_test.go:64:66: empty-lines: extra empty line at the end of a block (revive)
builder/remotecontext/detect_test.go:78:46: empty-lines: extra empty line at the end of a block (revive)
builder/remotecontext/detect_test.go:91:51: empty-lines: extra empty line at the end of a block (revive)
builder/dockerfile/internals_test.go:95:38: empty-lines: extra empty line at the end of a block (revive)
builder/dockerfile/copy.go:86:112: empty-lines: extra empty line at the end of a block (revive)
builder/dockerfile/dispatchers_test.go:286:39: empty-lines: extra empty line at the start of a block (revive)
builder/dockerfile/builder.go:280:38: empty-lines: extra empty line at the end of a block (revive)
builder/dockerfile/dispatchers.go:66:85: empty-lines: extra empty line at the start of a block (revive)
builder/dockerfile/dispatchers.go:559:85: empty-lines: extra empty line at the start of a block (revive)
builder/builder-next/adapters/localinlinecache/inlinecache.go:26:183: empty-lines: extra empty line at the start of a block (revive)
builder/builder-next/adapters/containerimage/pull.go:441:9: empty-lines: extra empty line at the start of a block (revive)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2022/09/24 05:23:17
Showing 8 changed files
... ...
@@ -177,7 +177,7 @@ func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session
177 177
 	p := &puller{
178 178
 		src: imageIdentifier,
179 179
 		is:  is,
180
-		//resolver: is.getResolver(is.RegistryHosts, imageIdentifier.Reference.String(), sm, g),
180
+		// resolver: is.getResolver(is.RegistryHosts, imageIdentifier.Reference.String(), sm, g),
181 181
 		platform: platform,
182 182
 		sm:       sm,
183 183
 	}
... ...
@@ -439,7 +439,6 @@ func (p *puller) Snapshot(ctx context.Context, g session.Group) (cache.Immutable
439 439
 		// TODO: Optimize to do dispatch and integrate pulling with download manager,
440 440
 		// leverage existing blob mapping and layer storage
441 441
 	} else {
442
-
443 442
 		// TODO: need a wrapper snapshot interface that combines content
444 443
 		// and snapshots as 1) buildkit shouldn't have a dependency on contentstore
445 444
 		// or 2) cachemanager should manage the contentstore
... ...
@@ -24,7 +24,6 @@ import (
24 24
 
25 25
 // ResolveCacheImporterFunc returns a resolver function for local inline cache
26 26
 func ResolveCacheImporterFunc(sm *session.Manager, resolverFunc docker.RegistryHosts, cs content.Store, rs reference.Store, is imagestore.Store) remotecache.ResolveCacheImporterFunc {
27
-
28 27
 	upstream := registryremotecache.ResolveCacheImporterFunc(sm, cs, resolverFunc)
29 28
 
30 29
 	return func(ctx context.Context, group session.Group, attrs map[string]string) (remotecache.Importer, specs.Descriptor, error) {
... ...
@@ -295,7 +295,6 @@ func (b *Builder) dispatchDockerfileWithCancellation(parseResult []instructions.
295 295
 			}
296 296
 			dispatchRequest.state.updateRunConfig()
297 297
 			fmt.Fprintf(b.Stdout, " ---> %s\n", stringid.TruncateID(dispatchRequest.state.imageID))
298
-
299 298
 		}
300 299
 		if err := emitImageID(b.Aux, dispatchRequest.state); err != nil {
301 300
 			return nil, err
... ...
@@ -104,7 +104,6 @@ func copierFromDispatchRequest(req dispatchRequest, download sourceDownloader, i
104 104
 		imageSource: imageSource,
105 105
 		platform:    platform,
106 106
 	}
107
-
108 107
 }
109 108
 
110 109
 func (o *copier) createCopyInstruction(sourcesAndDest instructions.SourcesAndDest, cmdName string) (copyInstruction, error) {
... ...
@@ -64,7 +64,6 @@ func dispatchEnv(d dispatchRequest, c *instructions.EnvCommand) error {
64 64
 //
65 65
 // Sets the maintainer metadata.
66 66
 func dispatchMaintainer(d dispatchRequest, c *instructions.MaintainerCommand) error {
67
-
68 67
 	d.state.maintainer = c.Maintainer
69 68
 	return d.builder.commit(d.state, "MAINTAINER "+c.Maintainer)
70 69
 }
... ...
@@ -557,7 +556,6 @@ func dispatchVolume(d dispatchRequest, c *instructions.VolumeCommand) error {
557 557
 //
558 558
 // Set the signal that will be used to kill the container.
559 559
 func dispatchStopSignal(d dispatchRequest, c *instructions.StopSignalCommand) error {
560
-
561 560
 	_, err := signal.ParseSignal(c.Signal)
562 561
 	if err != nil {
563 562
 		return errdefs.InvalidParameter(err)
... ...
@@ -284,7 +284,6 @@ func TestHealthcheckNone(t *testing.T) {
284 284
 }
285 285
 
286 286
 func TestHealthcheckCmd(t *testing.T) {
287
-
288 287
 	b := newBuilderWithMockBackend()
289 288
 	sb := newDispatchRequest(b, '`', nil, NewBuildArgs(make(map[string]*string)), newStagesBuildResults())
290 289
 	expectedTest := []string{"CMD-SHELL", "curl -f http://localhost/ || exit 1"}
... ...
@@ -139,7 +139,6 @@ func TestCopyRunConfig(t *testing.T) {
139 139
 		// Assert the original was not modified
140 140
 		assert.Check(t, runConfig != runConfigCopy, testcase.doc)
141 141
 	}
142
-
143 142
 }
144 143
 
145 144
 func fullMutableRunConfig() *container.Config {
... ...
@@ -72,7 +72,6 @@ func TestProcessShouldRemoveDockerfileDockerignore(t *testing.T) {
72 72
 	executeProcess(t, contextDir)
73 73
 
74 74
 	checkDirectory(t, contextDir, []string{shouldStayFilename})
75
-
76 75
 }
77 76
 
78 77
 func TestProcessNoDockerignore(t *testing.T) {
... ...
@@ -85,7 +84,6 @@ func TestProcessNoDockerignore(t *testing.T) {
85 85
 	executeProcess(t, contextDir)
86 86
 
87 87
 	checkDirectory(t, contextDir, []string{shouldStayFilename, builder.DefaultDockerfileName})
88
-
89 88
 }
90 89
 
91 90
 func TestProcessShouldLeaveAllFiles(t *testing.T) {
... ...
@@ -99,7 +97,6 @@ func TestProcessShouldLeaveAllFiles(t *testing.T) {
99 99
 	executeProcess(t, contextDir)
100 100
 
101 101
 	checkDirectory(t, contextDir, []string{shouldStayFilename, builder.DefaultDockerfileName, dockerignoreFilename})
102
-
103 102
 }
104 103
 
105 104
 // TODO: remove after moving to a separate pkg