Skip to content

fix(cli): json reporter file#9223

Merged
ematipico merged 1 commit intomainfrom
fix/json-reporter-stdout
Feb 24, 2026
Merged

fix(cli): json reporter file#9223
ematipico merged 1 commit intomainfrom
fix/json-reporter-stdout

Conversation

@ematipico
Copy link
Member

Summary

Biome wasn't writing anything on file when the JSON reporter was specified.

Used AI for this. It was a simple change.

Test Plan

Added a test

Docs

@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

🦋 Changeset detected

Latest commit: 7d6aab8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the A-CLI Area: CLI label Feb 24, 2026
@ematipico ematipico requested review from a team February 24, 2026 11:07
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4612133 and 7d6aab8.

⛔ Files ignored due to path filters (1)
  • crates/biome_cli/tests/snapshots/main_cases_reporter_json/reports_diagnostics_json_check_command_file.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (2)
  • .changeset/fix-json-reporter-file-output.md
  • crates/biome_cli/src/runner/impls/finalizers/default.rs

Walkthrough

This pull request introduces a fix for the JSON reporter to respect the --reporter-file flag. Previously, JSON output was always written to stdout regardless of the reporter destination setting. A changeset file documents the patch, and the implementation in default.rs has been updated to dynamically select the output writer based on whether the reporter targets a file or the console.

Suggested labels

A-CLI, A-Diagnostic

Suggested reviewers

  • Netail
  • siketyan
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(cli): json reporter file' directly addresses the main change: fixing JSON reporter output to files instead of stdout.
Description check ✅ Passed The description clearly relates to the changeset, explaining the problem (JSON reporter not writing to file) and confirming a test was added.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/json-reporter-stdout

Comment @coderabbitai help to get the list of available commands and usage tips.

@ematipico
Copy link
Member Author

Tests are passing. Going to merge this. I need it for the ecosystem CI ASAP

@ematipico ematipico merged commit 5b9da81 into main Feb 24, 2026
13 checks passed
@ematipico ematipico deleted the fix/json-reporter-stdout branch February 24, 2026 11:11
@github-actions github-actions bot mentioned this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant