Enable staticcheck style checks - #3416
Open
tbavelier wants to merge 1 commit into
Open
Conversation
3 tasks
🛑 Gate Violations
ℹ️ Info🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 49421ec | Docs | View more details | Give us feedback! |
tbavelier
force-pushed
the
tbavelier/enable-staticcheck-style
branch
from
September 2, 2026 14:53
677e306 to
49421ec
Compare
tbavelier
marked this pull request as ready for review
September 3, 2026 08:37
tbavelier
requested review from
RemiMoustamsikdd
and removed request for
a team
September 3, 2026 08:37
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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 does this PR do?
Enables and fixes the actionable Staticcheck style analyzers on top of #3415:
ST1003: conventional initialism naming for non-versioned API codeST1005: idiomatic error strings, preserving proper nouns with documented exceptionsST1006: unnamed unused receiversST1020andST1021: exported declaration commentsCompatibility aliases are retained for the renamed
EntityKubeApiServer,GetApiVersions, andSetApiExtensionClientAPIs. Generated CRD and OpenAPI artifacts are updated for API documentation changes.Motivation
This follows the correctness and quick-fix rollout in #3415 with a separately reviewable, stylistic cleanup.
Additional Notes
Depends on #3415 and targets its branch so this PR contains only the Staticcheck style changes.
ST1000remains excluded because it reports 409 missing package comments across 130 packages. EighteenST1003findings in versioned API definitions are narrowly excluded because renaming those exported fields and constants would be breaking.Next linters and analyzer groups to evaluate:
errcheck(50+ existing findings)gosec(50+ findings)contextcheck(62 findings)forcetypeassert(24 findings)exhaustive(19 findings)SA1019controller-runtime deprecationsST1000package documentation as a dedicated cleanup, if desiredMinimum Agent Versions
No minimum Datadog Agent or Cluster Agent version is required.
Describe your test plan
make generate && make manifestsgo test ./...make fmtmake lintgolangci-lint config verifyChecklist
enhancementv1.31.0and labelqa/skip-qa