-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update CI workflow and drop slices for compatibility #135
Conversation
# gci is confused by "slices" and suggests to move it to the end of the import list | ||
- path: tools/protovalidate-conformance/internal/results/result.go | ||
linters: | ||
- gci |
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.
Without ignoring it, running golangci-lint with --fix
would update this file's import list to
"cmp"
"github.com/bufbuild/protovalidate/tools/internal/gen/buf/validate"
"github.com/bufbuild/protovalidate/tools/internal/gen/buf/validate/conformance/harness"
"slices"
All-else-equal, my preference would be to be consistent across all our repos. Right now our template repo and connect-go do not use the golangci-lint-action anymore (preferring instead to simply run Would doing it this way here impact CI times at all? (if so, how much)? If no or insignificant impact, can we make this consistent with the other repos? |
Using running Here's a past run with make lint, where it needs to download dependencies to build the linter, the lint steps took 44s. In another, this step took 19s. A run on this PR with the lint action, where the lint step took 24s. In another, it took 22s. I think the difference is small, 20s in the worst case, and will update the PR. |
This PR
tools/go.mod
andgo.work
to 1.21. This is OK becausetools
is not a public library..golangci.yml
to excludegci
forresults.go
, because it has trouble recognizingslices
as a standard library (even with Go 1.21)make lint-go
and use it in ci.yaml, also add targetmake lint-go-fix
.