chore(lint): raise default max-param-count from 5 to 6#39
Merged
Conversation
Bump the paramcount rule's default limit (excluding context.Context) from 5 to 6. The limit is inherited by every consumer (backend, core, cli-private) that does not override --max-param-count, so this raises the ceiling uniformly and preserves cross-repo parity. Update the flag-default assertions in commands_test.go to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016s3gh5XjM6sHU2kM2wpDUd
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ben-miru
added a commit
that referenced
this pull request
Jul 3, 2026
## What Reverts the covgate **build-cache pre-warm** feature in its entirety. covgate no longer pre-warms the Go build cache before its parallel coverage runs. Reverts, in order (newest first): - #36 `perf(covgate): instrument the build-cache pre-warm` (`794e725`) - #35 `feat(covgate): report build-cache pre-warm duration` (`6a0cc47`) - #34 `perf(covgate): pre-warm build cache before parallel coverage runs` (`0c3c0af`) ## Why We no longer want covgate to pre-warm the build cache. The pre-warm compiled an extra artifact set that inflated the CI `gobuild-test` cache and pushed the backend repo back over the 10 GB Actions cache quota (the very regression #36 tried to walk back). Rather than keep iterating on the pre-warm, we're removing it. ## How Three `git revert` commits, preserving history/attribution. The reverted `internal/services/covgate/` and `internal/services/gocover/` files are **byte-identical** to their pre-feature state, and the feature's design doc (`plans/completed/20260624-covgate-prewarm-build-cache.md`) is removed. ## Validation - No lingering `prewarm` / `PrewarmBuild` references anywhere in `internal/`, `cmd/`, or `scripts/`. - Full `scripts/preflight.sh` passes clean: covgate coverage 94.3% across all 30 packages, gocover 92.6% (≥ 92.1% required), custom lint + gofumpt + golangci-lint + deadcode + surface-lint all green. - Clean revert with no conflicts against current `main`; unrelated later commits (#37 CI, #38 dep bumps, #39 max-param-count) required no adjustment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/mirurobotics/codesmith/gotools/pr/40"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with Codesmith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1785713638&installation_id=142588636&pr_number=40&repository=mirurobotics%2Fgotools&return_to=https%3A%2F%2Fgithub.com%2Fmirurobotics%2Fgotools%2Fpull%2F40&signature=00cc206a36c548207ac3606f293163ba579f08070387cbe5cc6ca77ed2f8cb48"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with Codesmith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>/codesmith</code> with what you need. Autofix is disabled.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer -->
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.
Summary
Raises the
paramcountrule's default limit (excludingcontext.Context) from 5 to 6.The limit is defined once as the
--max-param-countflag default ininternal/commands/lint.go. Every consumer — backend, core, cli-private — uses this default without overriding it, so bumping it here raises the ceiling uniformly across all Go repos, preserving cross-repo parity rather than diverging one repo.Changes
internal/commands/lint.go— flag default5→6.internal/commands/commands_test.go— the twointDefaultsflag-assertion maps updated5→6to match.Rationale
At limit 5,
backendhad 87 paramcount violations; the large majority are 6-parameter functions that are only marginally over. A limit of 6 keeps the rule meaningful for genuinely long signatures (7+ params, where an options struct clearly pays off) while not forcing churny refactors on borderline 6-param helpers. Applying it at the gotools default level keeps backend/core/cli-private on a single shared limit.Verification
./scripts/lint.sh— clean (custom linter, gofumpt, golangci-lint, deadcode).go test ./...— all lint/linter/command packages pass, including the updated flag-default assertions. (The only failures are the pre-existingcovratchet*_WriteErrortests, which require a non-root filesystem to trigger the simulated write error and are unrelated to this change.)🤖 Generated with Claude Code
Generated by Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.