Skip to content

Commit

Permalink
Merge pull request #1572 from camilamacedo86/up-lint-fix
Browse files Browse the repository at this point in the history
upgrade lint version and perform fixes
  • Loading branch information
k8s-ci-robot committed Jun 25, 2020
2 parents b98c08f + d617752 commit 8c19293
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ script: ./test.sh
jobs:
include:
- stage: linting
before_script: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.3
before_script: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
script: make lint
after_success: echo "Linting check succeeded"
after_failure: echo "Linting check failed. Run make lint to check it locally"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/plugins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var _ = Describe("resolvePluginsByKey", func() {
_, err = resolvePluginsByKey(plugins, "foo.example.com/v2")
Expect(err).To(MatchError(errAmbiguousPlugin{
key: "foo.example.com/v2",
msg: fmt.Sprintf(`no versions match, possible plugins: ["foo.example.com/v1"]`),
msg: `no versions match, possible plugins: ["foo.example.com/v1"]`,
}))

By("resolving foo/v3")
Expand Down
3 changes: 2 additions & 1 deletion pkg/plugin/v2/scaffolds/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func (s *editScaffolder) Scaffold() error {
return err
}
}

// false positive
// nolint:gosec
return ioutil.WriteFile(filename, []byte(str), 0644)
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/plugin/v3/scaffolds/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func (s *editScaffolder) Scaffold() error {
return err
}
}

// false positive
// nolint:gosec
return ioutil.WriteFile(filename, []byte(str), 0644)
}

Expand Down
5 changes: 4 additions & 1 deletion test/e2e/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func InsertCode(filename, target, code string) error {
}
idx := strings.Index(string(contents), target)
out := string(contents[:idx+len(target)]) + code + string(contents[idx+len(target):])
// false positive
// nolint:gosec
return ioutil.WriteFile(filename, []byte(out), 0644)
}

Expand Down Expand Up @@ -100,6 +102,7 @@ func UncommentCode(filename, target, prefix string) error {
if err != nil {
return err
}

// false positive
// nolint:gosec
return ioutil.WriteFile(filename, out.Bytes(), 0644)
}
3 changes: 2 additions & 1 deletion test/e2e/v2/e2e_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ func implementWebhooks(filename string) error {
if err != nil {
return err
}

// false positive
// nolint:gosec
return ioutil.WriteFile(filename, []byte(str), 0644)
}

Expand Down
3 changes: 2 additions & 1 deletion test/e2e/v3/e2e_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ func implementWebhooks(filename string) error {
if err != nil {
return err
}

// false positive
// nolint:gosec
return ioutil.WriteFile(filename, []byte(str), 0644)
}

Expand Down

0 comments on commit 8c19293

Please sign in to comment.