Skip to content

chore(lint): enable full staticcheck (drop SA/S scope pin)#239

Merged
aa1ex merged 1 commit into
kaasops:mainfrom
gecube:chore/enable-full-staticcheck
Jul 3, 2026
Merged

chore(lint): enable full staticcheck (drop SA/S scope pin)#239
aa1ex merged 1 commit into
kaasops:mainfrom
gecube:chore/enable-full-staticcheck

Conversation

@gecube

@gecube gecube commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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 so stylecheck (ST) and quickfix (QF) run by default again — the tree lints clean under the full default check set.

  • api/v1alpha1/groupversion_info.go: annotate the kubebuilder-scaffolded scheme.Builder with //nolint:staticcheck (SA1019). It is the upstream kubebuilder v4 scaffold and the generated per-type init()s register against its Register(objects…) method; migrating to runtime.NewSchemeBuilder would change the registration pattern across all API types and diverge from the scaffold.
  • Drop the dead golint name from the //nolint directives (golint was removed in golangci-lint v2; revive is its replacement) to silence the unknown linters warning.

Proof

$ make lint
golangci-lint run
0 issues.          # no warnings either

Unit + envtest suites pass (make test). No behavioural change — config + comment-only edits.

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>
@gecube

gecube commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up to the now-merged #235 (dep bump / golangci-lint v2 migration) and #236 (ST/QF cleanup). This drops the temporary staticcheck [SA, S] scope pin so the full default check set runs again on the (now clean) tree.

@aa1ex aa1ex left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@aa1ex
aa1ex merged commit c4e6f18 into kaasops:main Jul 3, 2026
5 checks passed
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.

2 participants