chore(lint): enable full staticcheck (drop SA/S scope pin)#239
Merged
Conversation
Now that the ST/QF findings are resolved, remove the temporary staticcheck check-set pin (SA + S) introduced during the golangci-lint v2 migration, so stylecheck and quickfix run by default again. - api/v1alpha1: annotate the kubebuilder-scaffolded scheme.Builder with //nolint:staticcheck (SA1019) — it is the upstream v4 scaffold and the generated per-type init()s register against it; migrating away would change the registration pattern across all api types. - drop the dead `golint` name from //nolint directives (removed in golangci-lint v2; `revive` is its replacement) to silence the "unknown linters" warning. golangci-lint reports 0 issues with no warnings; unit + envtest pass. Signed-off-by: Gaál György <gb12335@gmail.com>
Contributor
Author
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.
What
Follow-up to the golangci-lint v2 migration. Now that the ST/QF findings are fixed in the tree, remove the temporary
staticcheck.checks: [SA, S]scope pin sostylecheck(ST) andquickfix(QF) run by default again — the tree lints clean under the full default check set.api/v1alpha1/groupversion_info.go: annotate the kubebuilder-scaffoldedscheme.Builderwith//nolint:staticcheck(SA1019). It is the upstream kubebuilder v4 scaffold and the generated per-typeinit()s register against itsRegister(objects…)method; migrating toruntime.NewSchemeBuilderwould change the registration pattern across all API types and diverge from the scaffold.golintname from the//nolintdirectives (golint was removed in golangci-lint v2;reviveis its replacement) to silence theunknown linterswarning.Proof
Unit + envtest suites pass (
make test). No behavioural change — config + comment-only edits.