Bump golangci-lint to v2#791
Merged
andypitcher merged 5 commits intoApr 14, 2025
Merged
Conversation
…ieldValue *Added empty slice check *pkg/condition/condition.go:246:29: G602: slice index out of range (gosec) field := v.FieldByName(name[0])
…s no support for setting timeouts
…or less *pkg/crds/crd.go:40:9: G306: Expect WriteFile permissions to be 0600 or less (gosec) err = os.WriteFile(filename, yamlBytes, 0o644)
…eOldClusterScanReports *pkg/securityscan/jobHandler.go:72:5: G104: Errors unhandled (gosec) c.rescheduleScan(scan) *pkg/securityscan/jobHandler.go:73:5: G104: Errors unhandled (gosec) c.purgeOldClusterScanReports(scan)
40d7659 to
d1da33d
Compare
2 tasks
vardhaman22
reviewed
Apr 2, 2025
pjbgf
reviewed
Apr 2, 2025
pjbgf
approved these changes
Apr 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolved renovate PR:
Description:
The golanci-lint v1 is getting deprecated and golangci-lint advises to go to v2. Thus, we need to update the configuration format.
As of v2, we can use
golangci-lint migrateto migrate the.golangci.yamlconfiguration fromv1tov2.Related error:
Major changes:
golangci-linttov2.0.2and migrate golangci conf from json to yaml and v2 formatgoseclinter and fixes several issues. One of them has been whitelisted for the time being, will be worked on through another PR.unusedandrevivewere omitted since they were returning several errors. They will be handled through another PR.