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

Re-enable staticcheck #1044

Merged
merged 1 commit into from
Apr 25, 2019
Merged

Conversation

rohandvora
Copy link

Adds back staticcheck to make check target.

Updates: #956
Signed-off-by: Rohan Vora [email protected]

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 {
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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!

Copy link
Member

@stevesloka stevesloka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@stevesloka stevesloka merged commit bb84a11 into projectcontour:master Apr 25, 2019
@rohandvora rohandvora deleted the staticcheck branch April 25, 2019 20:09
Copy link
Contributor

@davecheney davecheney left a 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/...)
Copy link
Contributor

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?

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

Successfully merging this pull request may close these issues.

3 participants