-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add more lint coverage #10049
Add more lint coverage #10049
Conversation
@@ -102,8 +102,8 @@ ENV GOPATH="/go" \ | |||
RUN go install github.com/google/[email protected] | |||
|
|||
# Install meta-linter. | |||
RUN (curl -L https://github.com/golangci/golangci-lint/releases/download/v1.38.0/golangci-lint-1.38.0-$(go env GOOS)-$(go env GOARCH).tar.gz | tar -xz && \ | |||
cp golangci-lint-1.38.0-$(go env GOOS)-$(go env GOARCH)/golangci-lint /bin/ && \ | |||
RUN (curl -L https://github.com/golangci/golangci-lint/releases/download/v1.44.0/golangci-lint-1.44.0-$(go env GOOS)-$(go env GOARCH).tar.gz | tar -xz && \ |
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.
We will have to re-spin the buildbox, or update the linter script, in order for this update to make it onto CI.
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.
Yeah I figured there would be more involved than this. But I was constantly getting errors that aren't picked up by CI and believe it is due to the older version.
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.
I have PR #10179 that will remove some of the manual buildbox image management for GCB
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.
nit: I think the comment here is out of date. If I had to guess, at some point we switched from go-metalinter
to golangci-lint
and left the old install comment.
e77024b
to
c0d4c9f
Compare
golanglint-ci doesn't pick up subdirectories with their own go.mod which left certain directories unlinted. To get around this we can run golanglint-ci directly against those submodules.
6cd6379
to
4ece427
Compare
golangci-lint
doesn't lint any subdirectories with their owngo.mod
(golangci/golangci-lint#828) which left a few directories unlinted. To get around this we canrun
golangci-lint
directly against those submodules.This also provides fixes for new lint errors detected by running
golangci-lint
in these directories.