-
Notifications
You must be signed in to change notification settings - Fork 63
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
Misc nitpicks #206
Misc nitpicks #206
Conversation
kolyshkin
commented
Aug 29, 2023
- Fix Makefile.
- Add TODO to remove min/max.
- Add codespell to CI.
So one can run e.g. "make GO=go1.21.0 test". Signed-off-by: Kir Kolyshkin <[email protected]>
Go 1.21 has built-in min and max, so there is no need to define our own (OTOH it's not a problem to have it). I tried to move min/max to a separate file having "//go:build !go1.21" build constraint, but go1.21.0 complains: > max requires go1.21 or later (-lang was set to go1.19; check go.mod) > min requires go1.21 or later (-lang was set to go1.19; check go.mod) I have no idea how to work around that; so let's just add a TODO item to remove min/max when it's time. Signed-off-by: Kir Kolyshkin <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
@@ -25,7 +25,7 @@ build-cross: | |||
|
|||
.PHONY: test | |||
test: | |||
go test -timeout 3m ${TESTFLAGS} -v ./... | |||
$(GO) test -timeout 3m ${TESTFLAGS} -v ./... |
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'm not sure if overriding versions still work with their recent changes to automatically install versions and downgrade language versions based on go.mod 🤔
codespell: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install deps | ||
# Version of codespell bundled with Ubuntu is way old, so use pip. | ||
run: pip install codespell | ||
- name: run codespell | ||
run: codespell | ||
|
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.
Oh! I wanted to check if there was an action for this; and then I stumbled on a PR that was adding it; so: yes, there's an action for this; https://github.com/codespell-project/actions-codespell so we may as well use that?
LGTM |