Skip to content

Conversation

@garrettdimon
Copy link
Owner

Summary

  • Adds --format argument with three modes: streaming (default), summary, and json
  • Introduces Report::Formatter class for structured summary output with checkmarks, timing, and extracted details (test counts, file counts)
  • Centralizes output mode logic with Arguments#streaming? method

Changes

  • Arguments: New --format flag and streaming? predicate
  • Report::Formatter: Formats results with ✓/✗ marks, tool timings, and summary
  • Batch/Runner: Strategy selection based on output format
  • Tests: Coverage for new arguments, formatter output, and truncation behavior

Usage

# Default streaming output
rvw

# Summary format with checkmarks
rvw --format summary

# JSON output (existing, now also via --format json)
rvw --json
rvw --format json

Test plan

  • All 227 tests pass
  • RuboCop clean
  • Manual testing of all three output formats

Adds --format argument with streaming (default), summary, and json options.
The json? helper now checks both --json flag and --format=json for consistency.
Provides formatted console output with checkmarks, tool timings,
and extracted details (test counts, file counts) when available.
Ensures output is buffered when using summary or json format modes
so the formatter can process results after all tools complete.
Routes --format=summary to Report::Formatter for formatted output
with checkmarks and tool details instead of raw streaming output.
- Add Arguments#streaming? to centralize the format check
- Remove duplicate streaming_output? methods from Runner and Captured
- Simplify Batch#strategy to use streaming? instead of checking formats
- Add tests for streaming? method
- Add test for Formatter output truncation
- Fix test stubs to include streaming? method
- Consolidate formatter tests to stay within ClassLength limit
- Fix layout offenses from auto-formatter
@garrettdimon garrettdimon merged commit 35220bd into main Dec 23, 2025
5 checks passed
@garrettdimon garrettdimon deleted the feat/summary-format branch December 23, 2025 21:25
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.

1 participant