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

Update golangci-lint to v1.60.1 #384

Merged
merged 4 commits into from
Aug 22, 2024
Merged

Conversation

cfergeau
Copy link
Collaborator

This also fixes a lint error which shows in CI.

@cfergeau cfergeau force-pushed the linter branch 2 times, most recently from 11cc971 to 922f619 Compare August 21, 2024 08:08
While golangci/golangci-lint-action is convenient to use, it has the
side-effect of always using the latest golangci-lint release, which can
introduce new failures at any time.
If we use `make lint`, the golangci-lint version we tested with will be
used, and we can control when to updated to newer golangci-lint version,
and address the new warnings.
For example, golangci-lint v1.60.2 introduces new checks for int
overflows, which I'd rather address at a later time.

Signed-off-by: Christophe Fergeau <[email protected]>
There's a v1.60.2 release, but it triggers multiple warnings about
integer overflows which I prefer to address at a later time.

Signed-off-by: Christophe Fergeau <[email protected]>
This fixes
cmd/gvproxy/main.go:106:12: printf: non-constant format string in call to github.com/sirupsen/logrus.Infof (govet)
	log.Infof(version.String())
	          ^
make: *** [Makefile:49: lint] Error 1

Signed-off-by: Christophe Fergeau <[email protected]>
test/basic_test.go has some DNS resolution tests for various types of
DNS records. These tests use wikipedia.org or google.com, which means
they have to be updated once in a while when the admins of these sites
decide to change these records.
Lately this has happened a few times with wikipedia SRV and MX record.
This commit switches to crc.dev for these tests, as it's a domain we
control, and thus we have more control over DNS record changes.

Signed-off-by: Christophe Fergeau <[email protected]>
@cfergeau cfergeau changed the title Update golangci-lint to latest version Update golangci-lint to v1.60.1 Aug 22, 2024
@praveenkumar
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Aug 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau, praveenkumar

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 182e344 into containers:main Aug 22, 2024
22 checks passed
@@ -1,192 +1,190 @@
module github.com/containers/gvisor-tap-vsock/tools

go 1.20
go 1.22.1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For what it's worth, this can be problematic on systems still using go 1.21 as make cross needs the makefat binary, which is built through tools/go.mod.
golangci-lint v1.59.1 is the last golangci-lint version supporting go 1.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants