lint: resolve all revive findings #584
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#584
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
revive reports 29 findings under the configured ruleset. Most are shadowed
builtins.
What
redefines-builtin-id(most findings): locals and params namedmin,max,cap,copy,real,any. These are all builtins in current Go. Rename atevery site, callers included.
internal/opspec/cli.goexports(min, max int)in a public signature, so the renames are caller-visible; use an LSP rename
and check the callsites. Other sites:
internal/service/adr/adr.go,internal/service/git/worktree.go,internal/config/version.go(
cap Capability),internal/format/format.go(Truncate(s, max)),internal/gitea/client.go(copy := *c, three times),internal/cmd/file/file.go(any := false, also a clarity bug),internal/parity/layering.go, plus the test mirrorsinternal/opspec/cli_test.goandinternal/service/orchestrate/reconcile_test.go.early-returnx4: invert the if/else ininternal/cmd/org/hooks.go,internal/cmd/setup/setup.go,internal/gitea/resolve.go,internal/mcp/tools_orchestrate.go.var-declarationx3: drop the redundant explicit function types ininternal/util/input.goandinternal/cmd/setup/web.go(two sites). Checkthat the web.go pair are not test-substitution seams. If they are, keep the
type and explain why in this issue.
error-stringsx3: reword the test sentinel errors. Verify no test assertson the exact string first.
context-as-argumentx2: reorder the params in theinternal/mcp/completions_test.gohelpers.Acceptance
go test ./...stays green.