Skip to content

chore(lint): raise default max-param-count from 5 to 6#39

Merged
ben-miru merged 1 commit into
mainfrom
claude/backend-linter-differences-xrxynp
Jul 3, 2026
Merged

chore(lint): raise default max-param-count from 5 to 6#39
ben-miru merged 1 commit into
mainfrom
claude/backend-linter-differences-xrxynp

Conversation

@miru-agents

@miru-agents miru-agents commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Raises the paramcount rule's default limit (excluding context.Context) from 5 to 6.

The limit is defined once as the --max-param-count flag default in internal/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 default 56.
  • internal/commands/commands_test.go — the two intDefaults flag-assertion maps updated 56 to match.

Rationale

At limit 5, backend had 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-existing covratchet *_WriteError tests, 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


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@ben-miru
ben-miru merged commit fe7bac1 into main Jul 3, 2026
3 checks passed
@ben-miru
ben-miru deleted the claude/backend-linter-differences-xrxynp branch July 3, 2026 22:09
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 -->
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.

3 participants