-
Notifications
You must be signed in to change notification settings - Fork 546
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
Fixes CI: makes golangci-lint use Go version from go.mod
#2935
Fixes CI: makes golangci-lint use Go version from go.mod
#2935
Conversation
Skipping CI for Draft Pull Request. |
93fb352
to
08b0092
Compare
Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
08b0092
to
a16dbc4
Compare
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.
Looks good, I was about to do the same...
// | ||
// affinity: | ||
// nodeAffinity: {} | ||
// podAffinity: {} | ||
// podAntiAffinity: {} | ||
// |
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 is just a whitespace change, what caused it?
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.
gofmt
was not happy about this comment.
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.
Oi!
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.
There were some changes in Go 1.19 related to gofmt and doc comments: https://tip.golang.org/doc/go1.19
I don’t know why v2 action with Go 1.19 did not complain about it. My guess is that v2 action was shipping own version of gofmt which was older.
/lgtm |
/approve |
1 similar comment
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kevinrizza, m1kola, oceanc80, tmshort The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description of the change:
.github/workflows/sanity.yaml
use go version fromgo.mod
for runing lintergolangci-lint
to the version which supports Go 1.19.Note that I did not update
golangci-lint
to the latest version as it adds more issues which need extra attention/configuration and not necessary to makeing CI work again (e.g.loopclosure: loop variable tt captured by func literal
for tests like this one).Motivation for the change:
Currently the sanity workflow fails due to Go 1.20 being used. This PR makes sure that we use go version specified in
go.mod
to rungolangci-lint
.Current failure example:
Architectural changes:
Testing remarks:
sanity
should use go version fromgo.mod
(1.19 at the moment) and should not fail.Reviewer Checklist
/doc
[FLAKE]
are truly flaky and have an issue