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

Misc nitpicks #206

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Misc nitpicks #206

merged 3 commits into from
Sep 8, 2023

Conversation

kolyshkin
Copy link
Collaborator

  1. Fix Makefile.
  2. Add TODO to remove min/max.
  3. 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 ./...
Copy link
Member

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 🤔

See https://tip.golang.org/doc/toolchain

Comment on lines +42 to +51
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

Copy link
Member

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?

@rhatdan
Copy link
Collaborator

rhatdan commented Sep 8, 2023

LGTM

@rhatdan rhatdan merged commit 40a1afe into opencontainers:main Sep 8, 2023
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