Sdlc/Sequel/RubyFilterAfterAll: require a Sequel dataset origin, not a _dataset suffix #1379
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#1379
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
Sdlc/Sequel/RubyFilterAfterAllmatches any call whose name ends_dataset. A method that is not Sequel has no model and nodataset_module, so the prescribed fix cannot apply.Found by the #1325 zero-false-positive audit (docs/plans/class-length-family/sdlc-cop-audit.md).
Observed
fixture_datasetreturns an Array. The cop flagsbig_ones.Reproduce
n/a: run
rubocop --only Sdlc/Sequel/RubyFilterAfterAllon the snippet above.Approach
Fix by shape. Put the change in the cop matcher, never in a config Exclude list.
Required work:
*_datasetassociation readers on a Sequel::Model, orModel.datasetandModel.wherechains. Do not match by name suffix.Acceptance criteria
Reportclass above, when the cop runs, then it reports no offense.Handoff.where(x: 1).all.select { |h| h.ok }, when the cop runs, then it reports an offense.Origin
_datasetname suffix ← DESIGN (plugins/os-sdlc/lib/os_sdlc/cops/ruby_filter_after_all.rb:17-28)VERDICT: CREATE