-
Notifications
You must be signed in to change notification settings - Fork 689
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
Re-enable staticcheck #1044
Re-enable staticcheck #1044
Conversation
Adds back staticcheck to the make check target. Updates: projectcontour#956 Signed-off-by: Rohan Vora <[email protected]>
@@ -76,9 +76,6 @@ func (hn *HoldoffNotifier) OnChange(builder *dag.Builder) { | |||
// counter holds an atomically incrementing counter. | |||
type counter uint64 | |||
|
|||
func (c *counter) get() uint64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this get deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The static check tool was complaining that this function was not being used. And since inc() and reset() themselves return the updated value, get() was not being used in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh ok, sorry for that. I just read the diff and assumed. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
@@ -2,7 +2,7 @@ PROJECT = contour | |||
REGISTRY ?= gcr.io/heptio-images | |||
IMAGE := $(REGISTRY)/$(PROJECT) | |||
SRCDIRS := ./cmd ./internal ./apis | |||
PKGS := $(shell go list -mod=readonly ./cmd/... ./internal/...) | |||
PKGS := $(shell GO111MODULE=on go list -mod=readonly ./cmd/... ./internal/...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed if you're running Go 1.12 or later. What error did this fix?
Adds back staticcheck to make check target.
Updates: #956
Signed-off-by: Rohan Vora [email protected]