-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
What would you like to be added:
Applies code formatting changes to resolve linting violations reported by the upgraded golangci-lint v2.
Ref: https://github.com/karmada-io/karmada/actions/runs/14120914184/job/39560873286?pr=6237
Why is this needed:
The following issues stem from new checks introduced in v2, which were temporarily disabled for incremental resolution.
Fix #6237
staticcheck:
- QF1008: could remove embedded field "xxx" from selector (staticcheck). (Decided not to fix, but add comment) Add comment for disabling QF1008 #6295
- ST1019: package "xxx" is being imported more than once (staticcheck). Fix lint issue ST1019 #6289
- ST1005: error strings should not be capitalized (staticcheck). Fix lint issue ST1005 #6290
- QF1004: could use strings.ReplaceAll instead (staticcheck). Fix lint issue QF1004 #6291
- ST1011: var periodSeconds is of type time.Duration; don't use unit-specific suffix "Seconds" (staticcheck). Fix lint issue ST1011 #6296
- QF1003: could use tagged switch on operationResult (staticcheck) Fix lint issue QF1003 #6292
- QF1001: could apply De Morgan's law (staticcheck) Fix lint issue QF1001 #6297
- ST1000: at least one file in a package should have a package comment (staticcheck) Add comment for disabling ST1000 and package-comments #6299
revive
- package-comments: should have a package comment (revive) Add comment for disabling ST1000 and package-comments #6299
zhzhuang-zju, RainbowMango and XiShanYongYe-Chang
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Type
Projects
Status
No status