Skip to content

Conversation

@garrettdimon
Copy link
Owner

Summary

  • Add -j/--json flag for machine-readable JSON output
  • New Runner::Result Data class for individual tool results
  • New Report class for collecting results with to_json method
  • Suppress CLI output (progress indicators, summaries) in JSON mode
  • Force captured strategy in JSON mode to collect stdout/stderr

JSON Output Structure

{
  "success": false,
  "summary": {
    "total": 3,
    "passed": 2,
    "failed": 1,
    "duration": 12.5
  },
  "tools": [
    {
      "tool": "rubocop",
      "name": "Rubocop",
      "command_type": "review",
      "command": "bundle exec rubocop --parallel",
      "success": true,
      "exit_status": 0,
      "duration": 5.8,
      "stdout": "...",
      "stderr": ""
    }
  ]
}

Additional Changes

  • Improve tool tags in .reviewer.yml (add security, dev, slow tags)
  • Disable license_finder by default (slow, run manually with rvw license_finder)

Test Plan

  • All 209 tests pass
  • RuboCop passes with no offenses
  • Manual testing of rvw --json and rvw --json rubocop

Add support for machine-readable JSON output via -j/--json flag.

New classes:
- Runner::Result: Data class for individual tool results
- Report: Collection class with to_h and to_json methods

Changes:
- Batch now returns Report instead of hash
- Runner#to_result builds Result from execution state
- Suppress CLI output in JSON mode (progress, summaries)
- Force captured strategy in JSON mode for output collection

JSON structure includes success status, summary counts,
duration, and per-tool details with stdout/stderr.
- Add security tag to bundle_audit
- Add dev tag to rubocop for consistency
- Add slow tag to license_finder
- Disable license_finder (run manually: rvw license_finder)
@garrettdimon garrettdimon merged commit 108cd28 into main Dec 22, 2025
5 checks passed
@garrettdimon garrettdimon deleted the feat/json-output branch December 22, 2025 23:06
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