Sdlc/Structural/ParameterThreadedThroughPrivateMethods: require real threading, not a shared parameter name #1365
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1365
Loading…
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?
Problem
The cop
Sdlc/Structural/ParameterThreadedThroughPrivateMethodscounts the same parameter name in 3+ private defs of one class.It does not check that one method passes the parameter to another, so parallel dispatch targets match.
The prescribed fix (a
<Name>Holder) is also the weaker fix when the parameter receives one message.Found by the #1325 zero-false-positive audit (docs/plans/class-length-family/sdlc-cop-audit.md).
Observed
Counterexample:
plugins/os-adr/lib/adr/record/command_line.rb:31-35.amend,delete, andchallengeeach takeidfrom onesend(command, id). No method passesidto another. 76 hits overall.Reproduce
n/a: the cop matcher is at
plugins/os-sdlc/lib/os_sdlc/cops/parameter_threaded_through_private_methods.rb:38-44; run the cop onplugins/os-adr/lib/adr/record/command_line.rb.Approach
Carve-outs go in the cop matcher, never in a config Exclude list or a test-path exclusion.
Count a def only when it passes the parameter as an argument to another def in the chain.
Choose the fix text from the use at the end of the chain: one message means "move the job to the parameter", otherwise the holder.
Required work:
passinplugins/os-sdlc/lib/os_sdlc/cops/parameter_threaded_through_private_methods/*.rbAcceptance criteria
idand none passes it on, when the cop runs, then it reports no offense.idto the next, when the cop runs, then it reports an offense.Origin
VERDICT: CREATE