Skip to content

Prevent --report from discarding the -v states report - #806

Open
ydah wants to merge 1 commit into
masterfrom
fix/report-options
Open

Prevent --report from discarding the -v states report#806
ydah wants to merge 1 commit into
masterfrom
fix/report-options

Conversation

@ydah

@ydah ydah commented Sep 5, 2026

Copy link
Copy Markdown
Member

--report replaced the accumulated report list while -v appended to it. As a result, -v --report=rules dropped the states report even though the reverse argument order
retained it.

Report validation also accepted all and none only when used alone, rejecting combinations such as all,cex and none,states.

Accumulate -r, --report, and -v values in argument order, and process all and none as list operations. Correct the -v help text to refer to --report=states.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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/--report values instead of replacing prior selections; keep -v as an ordered append.
  • Treat all and none as list operations during report validation (allowing combinations like all,cex and none,states).
  • Correct -v help text to reference --report=states and 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.

Comment thread lib/lrama/option_parser.rb
@ydah
ydah force-pushed the fix/report-options branch from 47ea531 to 4fc1bc2 Compare September 6, 2026 00:37
@ydah ydah changed the title Combine report options Prevent --report from discarding the -v states report Sep 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

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.

2 participants