Repository navigation
lint: enable the expanded shared rubocop-go cop catalog - #4564
Merged
Merged
Conversation
Assisted-By: cagent Signed-off-by: David Gageot <david.gageot@docker.com>
Turn on the remaining shared rubocop-go checks (context handling, maps/slices/wait-group modernizations, etc.) across the codebase, add reasoned suppressions for the lifecycle contexts and public constructors that legitimately need them, and update the registration tests and contributing docs to match. Assisted-By: cagent
trungutt
approved these changes
Oct 9, 2026
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.
We bumped
github.com/dgageot/rubocop-goto pick up a batch of newshared opt-in cops, then turned them on for this repo. The goal is to
close the gap between what the shared catalog offers and what we
actually enforce, so new code gets the same scrutiny across projects
that use the catalog.
This enables 11 additional cops, bringing us to 34 of the 36 available
cops.
ContextFirstParameterandNoContextFieldstay disabled fornow: turning them on here would mean adding new suppressions or doing
an unrelated refactor, which is out of scope for a lint-catalog bump.
Application code is unchanged — no new
nolintdirectives wereneeded anywhere in the codebase. The lint package itself gained
registration, scope, test-package, build-tag, and version-gating
fixtures to cover the newly enabled cops, and the contributing docs
were updated to reflect the current enablement count and link.
Verified with
task build,task test, andtask lint(golangci-lint2.14.0). Nothing here changes runtime behavior.