Skip to content

ci: bump golangci-lint to v2.1 #4747

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged

Conversation

kolyshkin
Copy link
Contributor

(The current v2.1 release is v2.1.5 as of today).

@@ -40,7 +40,7 @@ jobs:
sudo apt -qy install libseccomp-dev
- uses: golangci/golangci-lint-action@v7
with:
version: v2.0
version: v2.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about deleting this version definition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that if the version is not set, the latest one will be used, I don't think it's a good idea, because this will mean that over time our CI will break on its own (as newer golangci-lint will update or add more linters which may result in linter warnings).

By pinning the version, we avoid that breakage. When we update the version, we check that everything works fine, or fix the new issues found. In the meantime, the CI works.

It's basically the same argument as in commit b24fc9d

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note though that I don't specify the patch version, meaning the latest patch version will be used (for example, when I specify v2.1, it will use v2.1.5 as of today). This is because I hope that the patch version bump won't introduce any breakage (while the minor version bump, such as switching from v2.2 to v2.3, might).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, thanks your explanation.

(The current v2.1 release is v2.1.5 as of today).

Signed-off-by: Kir Kolyshkin <[email protected]>
@cyphar cyphar merged commit 0e57cc5 into opencontainers:main Apr 28, 2025
34 checks passed
@kolyshkin kolyshkin added the backport/1.3-done A PR in main branch which has been backported to release-1.3 label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.3-done A PR in main branch which has been backported to release-1.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants