Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint issues #277

Open
mattfarina opened this issue Feb 27, 2023 · 1 comment
Open

Lint issues #277

mattfarina opened this issue Feb 27, 2023 · 1 comment

Comments

@mattfarina
Copy link
Contributor

Running golangci-lint on master is generating the following issues:

pkg/objectset/objectset.go:116:8: Error return value of `o.err` is not checked (errcheck)
		o.err(errors.Wrapf(err, "failed to add %T", obj))
		     ^
pkg/objectset/objectset.go:122:8: Error return value of `o.err` is not checked (errcheck)
		o.err(errors.Wrapf(err, "failed to add %T", obj))
		     ^
pkg/apply/desiredset_process.go:213:8: Error return value of `o.err` is not checked (errcheck)
		o.err(err)
		     ^
pkg/relatedresource/changeset.go:86:15: Error return value is not checked (errcheck)
				runResolve(meta.GetNamespace(), meta.GetName(), ro)
				          ^
pkg/needacert/needacert.go:260:23: Error return value of `h.locker.Unlock` is not checked (errcheck)
	defer h.locker.Unlock(lockKey)
	                     ^
pkg/controller-gen/main.go:32:2: var `t` is unused (unused)
	t = true
	^
pkg/schemas/mappers/enum.go:15:2: field `field` is unused (unused)
	field string
	^
pkg/apply/desiredset_apply.go:92:11: S1012: should use `time.Since` instead of `time.Now().Sub` (gosimple)
		if d := time.Now().Sub(t); d.Seconds() > 1 {
		        ^
pkg/git/git.go:10:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
	"io/ioutil"
	^
pkg/apply/desiredset_compare.go:7:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
	"io/ioutil"
@KevinJoiner
Copy link
Contributor

Do we know how this is getting passed CI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants