This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 9c9305e53c9ad6911f279c1fccede9d9c09c1547
Author: nferraro <ni.ferr...@gmail.com>
AuthorDate: Fri Jan 11 11:48:27 2019 +0100

    Fix #312: make linter happy
---
 cmd/util/publisher/publisher.go             | 4 ++--
 pkg/controller/integration/build_context.go | 3 +++
 pkg/platform/images/images_test.go          | 8 +++++---
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/cmd/util/publisher/publisher.go b/cmd/util/publisher/publisher.go
index e4dc8c3..0ce0462 100644
--- a/cmd/util/publisher/publisher.go
+++ b/cmd/util/publisher/publisher.go
@@ -50,9 +50,8 @@ type PublisherOptions struct {
 
 // Publishes predefined images for all Camel components
 func main() {
+       options := PublisherOptions{}
 
-       options := PublisherOptions{
-       }
        var cmd = cobra.Command{
                Use:   "publisher",
                Short: "Publisher allows to publish base images before a 
release",
@@ -162,6 +161,7 @@ func (options *PublisherOptions) build(component string, 
camelVersion string) er
        }
 
        archiveDir, archiveName := filepath.Split(ctx.Archive)
+       // nolint: gosec
        dockerfile := `
                FROM fabric8/s2i-java:2.3
                ADD ` + archiveName + ` /deployments/
diff --git a/pkg/controller/integration/build_context.go 
b/pkg/controller/integration/build_context.go
index 3bbb4a9..eb1ee6a 100644
--- a/pkg/controller/integration/build_context.go
+++ b/pkg/controller/integration/build_context.go
@@ -65,6 +65,9 @@ func (action *buildContextAction) Handle(ctx context.Context, 
integration *v1alp
                }
                if pl.Spec.Build.PredefinedImages {
                        ictx, err = ImportPredefinedContextIfPresent(ctx, 
action.client, integration)
+                       if err != nil {
+                               return err
+                       }
                }
        }
 
diff --git a/pkg/platform/images/images_test.go 
b/pkg/platform/images/images_test.go
index 53441e1..027bf39 100644
--- a/pkg/platform/images/images_test.go
+++ b/pkg/platform/images/images_test.go
@@ -18,10 +18,11 @@ limitations under the License.
 package images
 
 import (
-       "github.com/apache/camel-k/version"
-       "github.com/stretchr/testify/assert"
        "strconv"
        "testing"
+
+       "github.com/apache/camel-k/version"
+       "github.com/stretchr/testify/assert"
 )
 
 func TestImageLookup(t *testing.T) {
@@ -60,8 +61,9 @@ func TestImageLookup(t *testing.T) {
        }
 
        for i, tc := range cases {
+               testcase := tc
                t.Run("case-"+strconv.Itoa(i), func(t *testing.T) {
-                       assert.Equal(t, tc.image, 
LookupPredefinedImage(tc.dependencies))
+                       assert.Equal(t, testcase.image, 
LookupPredefinedImage(testcase.dependencies))
                })
        }
 

Reply via email to