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

bump golang-ci-lint #4090

Merged
merged 10 commits into from
Feb 12, 2025
Merged

bump golang-ci-lint #4090

merged 10 commits into from
Feb 12, 2025

Conversation

stevekuznetsov
Copy link
Contributor

@stevekuznetsov stevekuznetsov commented Feb 7, 2025

Makefile: bump golangci-lint

Signed-off-by: Steve Kuznetsov [email protected]


test/e2e: fixup bad Ginkgo assertions

ginkgo-linter: wrong error assertion. Consider using Eventually(func(ctx context.Context) error { return project.VerifyProjectIsReady(ctx) }).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed()) instead (ginkgolinter)

Signed-off-by: Steve Kuznetsov [email protected]


pkg/api: remove unnecessary nil checks

S1009: should omit nil check; len() for []string is defined as zero (gosimple)

Signed-off-by: Steve Kuznetsov [email protected]


pkg/util: fix ineffectual compiler directive

SA9009: ineffectual compiler directive due to extraneous space:
"// go:generate mockgen -destination=../mocks/$GOPACKAGE/client.go
github.com/Azure/msi-dataplane/pkg/dataplane Client" (staticcheck)

Signed-off-by: Steve Kuznetsov [email protected]


*: fix non-constant format strings

printf: non-constant format string in call to (*github.com/sirupsen/logrus.Entry).Warnf (govet)

Signed-off-by: Steve Kuznetsov [email protected]


cmd/migrate: add a program to refactor NewCloudError

Signed-off-by: Steve Kuznetsov [email protected]


*: run the program to refactor NewCloudError

Signed-off-by: Steve Kuznetsov [email protected]


pkg/api: refactor NewCloudError to take a static message

Signed-off-by: Steve Kuznetsov [email protected]


Revert "cmd/migrate: add a program to refactor NewCloudError"

This reverts commit 8aa74d1f5d1f006d840e025bf025ce728cced0c4.

Signed-off-by: Steve Kuznetsov [email protected]


pkg/api/error.go Outdated Show resolved Hide resolved
@stevekuznetsov stevekuznetsov force-pushed the skuznets/bump-golang-ci-lint branch from 18cf165 to ed4e5f6 Compare February 7, 2025 16:58
tsatam
tsatam previously approved these changes Feb 7, 2025
Copy link
Collaborator

@tsatam tsatam left a comment

Choose a reason for hiding this comment

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

LGTM, merge on green CI

weinong
weinong previously approved these changes Feb 7, 2025
Copy link
Contributor

@weinong weinong left a comment

Choose a reason for hiding this comment

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

LGTM

@stevekuznetsov stevekuznetsov dismissed stale reviews from weinong and tsatam via 728d436 February 7, 2025 18:32
@stevekuznetsov stevekuznetsov force-pushed the skuznets/bump-golang-ci-lint branch from ed4e5f6 to 728d436 Compare February 7, 2025 18:32
@stevekuznetsov
Copy link
Contributor Author

We need to write a Go AST-based refactoring tool to actually change the call-sites for NewCloudError - I'll do this next week.

Signed-off-by: Steve Kuznetsov <[email protected]>
ginkgo-linter: wrong error assertion. Consider using `Eventually(func(ctx context.Context) error {
	return project.VerifyProjectIsReady(ctx)
}).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed())` instead (ginkgolinter)

Signed-off-by: Steve Kuznetsov <[email protected]>
S1009: should omit nil check; len() for []string is defined as zero (gosimple)

Signed-off-by: Steve Kuznetsov <[email protected]>
SA9009: ineffectual compiler directive due to extraneous space:
"//  go:generate mockgen -destination=../mocks/$GOPACKAGE/client.go
github.com/Azure/msi-dataplane/pkg/dataplane Client" (staticcheck)

Signed-off-by: Steve Kuznetsov <[email protected]>
printf: non-constant format string in call to (*github.com/sirupsen/logrus.Entry).Warnf (govet)

Signed-off-by: Steve Kuznetsov <[email protected]>
This reverts commit 8aa74d1f5d1f006d840e025bf025ce728cced0c4.

Signed-off-by: Steve Kuznetsov <[email protected]>
@stevekuznetsov stevekuznetsov force-pushed the skuznets/bump-golang-ci-lint branch from 728d436 to 933b342 Compare February 12, 2025 18:02
tsatam
tsatam previously approved these changes Feb 12, 2025
Copy link
Collaborator

@tsatam tsatam left a comment

Choose a reason for hiding this comment

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

LGTM, though I'll be waiting on green checks to fully confirm.

@tsatam tsatam merged commit 9d59d46 into master Feb 12, 2025
22 checks passed
@tsatam tsatam deleted the skuznets/bump-golang-ci-lint branch February 12, 2025 21:40
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