Prevent --report from discarding the -v states report - #806
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new report list-operation semantics can leave the effective report set empty while still triggering report generation based on the raw @report array.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes how -r/--report and -v/--verbose combine by accumulating report selections in argument order, and updates report validation so all/none can be composed with other report items.
Changes:
- Accumulate
-r/--reportvalues instead of replacing prior selections; keep-vas an ordered append. - Treat
allandnoneas list operations during report validation (allowing combinations likeall,cexandnone,states). - Correct
-vhelp text to reference--report=statesand add specs for the new composition behavior.
File summaries
| File | Description |
|---|---|
| spec/lrama/option_parser_spec.rb | Updates help text expectation and adds coverage for report option composition and argument ordering. |
| lib/lrama/option_parser.rb | Changes report option accumulation and updates validate_report to support all/none list operations. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
47ea531 to
4fc1bc2
Compare
--report from discarding the -v states report
4fc1bc2 to
121fb7c
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The behavior change is small, consistent with the PR description, and is backed by targeted specs covering the previously broken cases and new semantics.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
--reportreplaced the accumulated report list while-vappended to it. As a result,-v --report=rulesdropped thestatesreport even though the reverse argument orderretained it.
Report validation also accepted
allandnoneonly when used alone, rejecting combinations such asall,cexandnone,states.Accumulate
-r,--report, and-vvalues in argument order, and processallandnoneas list operations. Correct the-vhelp text to refer to--report=states.