Skip to content

feat(cli): output files information via biome rage by default - #6886

Merged
ematipico merged 15 commits into
biomejs:nextfrom
christymcgrory:feat/biome-rage-files-output
Jul 23, 2026
Merged

feat(cli): output files information via biome rage by default#6886
ematipico merged 15 commits into
biomejs:nextfrom
christymcgrory:feat/biome-rage-files-output

Conversation

@christymcgrory

@christymcgrory christymcgrory commented Jul 14, 2025

Copy link
Copy Markdown

Summary

This PR enables the ability to view the includes array from the config file, as well as ignoreUnknown. The primary motivation for this was validating the ordering of glob patterns after biome resolves an extends field and merges with another configuration.

Eventually the goal is to be able to print the merged extends configuration and output it to a file for inspection (debugging in a large monorepo can be painful).

Test Plan

  1. cargo build --bin biome
  2. Generate a minimal extends scenario in a monorepo:
# biome.json
{
	"root": true,
	"files":  {
		"includes": ["**"]
	}
}

# packages/test/biome.json
{
	"root": false,
	"files":  {
		"includes": ["!**/_generated_/**"]
	}
}
  1. Run the compiled biome binary against packages/test: biome rage --files
  2. Confirm the output is as expected.

@changeset-bot

changeset-bot Bot commented Jul 14, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cf50b45

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

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

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 A-CLI Area: CLI A-Project Area: project labels Jul 14, 2025
@ematipico

Copy link
Copy Markdown
Member

The --verbose outputs the "handled" files when you run format/lint/check. Isn't that information enough?

I like the proposal, and maybe we can print the information without the --files flag. On the other hand, we also have formatter.includes, etc., and I believe we should print them too.

@christymcgrory

Copy link
Copy Markdown
Author

The --verbose outputs the "handled" files when you run format/lint/check. Isn't that information enough?

I like the proposal, and maybe we can print the information without the --files flag. On the other hand, we also have formatter.includes, etc., and I believe we should print them too.

Thanks for the feedback. Like the idea of it being default without a new flag, I'll make some changes over the weekend.

@ematipico

Copy link
Copy Markdown
Member

@christymcgrory any updates?

@christymcgrory
christymcgrory force-pushed the feat/biome-rage-files-output branch from 0cb4622 to 60d1b39 Compare March 24, 2026 11:23
@christymcgrory
christymcgrory force-pushed the feat/biome-rage-files-output branch from 60d1b39 to 1527f27 Compare March 24, 2026 11:28
@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a Files section to biome rage output for resolved files.ignoreUnknown and files.includes values. Adds Configuration::get_files_configuration, which returns the configured files settings or defaults. Includes a serialised CLI test and a patch changeset documenting the output.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: making biome rage output files configuration by default.
Description check ✅ Passed The description matches the change and explains the motivation, test plan, and files configuration output.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
.changeset/ripe-dryers-tell.md (1)

12-12: Tighten the changeset blurb to user-facing wording.

Line 12 reads like an internal note; a polished sentence will be clearer in release notes.

Suggested wording
-adds new --files flag to the biome rage command to output an array of includes, and the ignoreUnknown option
+Added a `--files` option to `biome rage` to print the resolved `files.includes` globs and `files.ignoreUnknown` setting, making merged config debugging easier in monorepos.

Based on learnings: Changeset descriptions should be concise (1-3 sentences), user-facing, and use past tense for actions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/ripe-dryers-tell.md at line 12, Rewrite the changeset blurb on
line 12 to a concise, user-facing sentence (1–3 sentences) in past tense
describing the change: e.g., state that the "biome rage" command added a new
--files flag to output an array of includes and added an ignoreUnknown option;
replace the internal wording with that polished release-note style sentence.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/ripe-dryers-tell.md:
- Around line 2-9: The changeset currently marks multiple CLI packages with
"minor" but this PR targets main and is non-breaking; update the change type
from "minor" to "patch" for the listed packages (e.g.
"@biomejs/cli-darwin-arm64", "@biomejs/cli-darwin-x64",
"@biomejs/cli-linux-arm64", "@biomejs/cli-linux-arm64-musl",
"@biomejs/cli-linux-x64", "@biomejs/cli-linux-x64-musl",
"@biomejs/cli-win32-arm64", "@biomejs/cli-win32-x64") so the release uses patch
instead of minor.

In `@crates/biome_cli/src/commands/rage.rs`:
- Around line 373-374: The displayed label "Ignore hidden" is incorrect for the
value being shown; update the KeyValuePair that renders
DisplayOption(files_configuration.ignore_unknown) so the label matches the field
(e.g., change "Ignore hidden" to "Ignore unknown" or "Ignore unknown files") in
the KeyValuePair call used in the rage output (the line using KeyValuePair and
DisplayOption with files_configuration.ignore_unknown).
- Around line 363-376: The match arm for BiomeCommand::Rage is omitting the
sixth field (the --files boolean) and not passing it into rage(), so update the
pattern in the match that constructs the Rage variant to destructure all six
fields (including files) and pass that boolean into the call to rage(files, ...)
to match the existing rage(...) signature; then add a test that invokes the Rage
command with the --files flag set (or directly calls rage(...) with files=true)
and capture a snapshot that includes the "Files" section output to validate the
new behavior. Ensure the test uses the same function names (BiomeCommand::Rage,
rage()) and asserts the snapshot contains the Files section shown in the
existing UI formatting.

---

Nitpick comments:
In @.changeset/ripe-dryers-tell.md:
- Line 12: Rewrite the changeset blurb on line 12 to a concise, user-facing
sentence (1–3 sentences) in past tense describing the change: e.g., state that
the "biome rage" command added a new --files flag to output an array of includes
and added an ignoreUnknown option; replace the internal wording with that
polished release-note style sentence.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1ebcfef7-88ca-40ba-9e66-a5d89f0a97bd

📥 Commits

Reviewing files that changed from the base of the PR and between e168494 and 60d1b39.

⛔ Files ignored due to path filters (1)
  • crates/biome_cli/tests/snapshots/main_commands_rage/rage_help.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (5)
  • .changeset/ripe-dryers-tell.md
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/commands/rage.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_configuration/src/lib.rs

Comment thread .changeset/chatty-meals-train.md Outdated
Comment thread crates/biome_cli/src/commands/rage.rs Outdated
Comment thread crates/biome_cli/src/commands/rage.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/biome_cli/src/commands/mod.rs`:
- Around line 80-82: The BiomeCommand::Rage variant gained a new bool field
named files but the destructuring in the match arm for BiomeCommand::Rage (in
lib.rs at the match around line 68) still expects five fields; update that
pattern to include the new files identifier and ensure it is forwarded to the
Rage handling code where the other fields are passed. Specifically, adjust the
match arm that matches BiomeCommand::Rage(...) to destructure six items
including files and add the files variable into the call/site that constructs or
processes the Rage command so arity matches the updated enum variant.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9ff07d46-7584-4a57-b0e3-e86078b56002

📥 Commits

Reviewing files that changed from the base of the PR and between 60d1b39 and 1527f27.

📒 Files selected for processing (3)
  • .changeset/ripe-dryers-tell.md
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/commands/rage.rs
✅ Files skipped from review due to trivial changes (1)
  • .changeset/ripe-dryers-tell.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/biome_cli/src/commands/rage.rs

Comment thread crates/biome_cli/src/commands/mod.rs Outdated
@christymcgrory

Copy link
Copy Markdown
Author

Hey @ematipico, I think this is ready for a review proper now -- apologies for the massive delay on responding to you!

@christymcgrory christymcgrory changed the title feat(cli): add new --files option to biome rage to output includes feat(cli): output files information via biome rage by default Mar 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
crates/biome_cli/src/commands/rage.rs (1)

367-378: ⚠️ Potential issue | 🟠 Major

Please add a CLI snapshot test for the new “Files” section output.

This change alters biome rage output, but there’s no accompanying test update in the submitted changes. A snapshot covering Ignore Unknown + merged Includes would lock behaviour and prevent regressions.

As per coding guidelines: “All code changes MUST include appropriate tests … and bug fixes require tests that reproduce and validate the fix.”


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8122370b-67bd-4870-bcab-aafa164df6f9

📥 Commits

Reviewing files that changed from the base of the PR and between 9db63b6 and 9864fcb.

⛔ Files ignored due to path filters (5)
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_formatter_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_jsonc_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_linter_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_malformed_configuration.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (2)
  • .changeset/chatty-meals-train.md
  • crates/biome_cli/src/commands/rage.rs
✅ Files skipped from review due to trivial changes (1)
  • .changeset/chatty-meals-train.md

@ematipico

Copy link
Copy Markdown
Member

Hey @ematipico, I think this is ready for a review proper now -- apologies for the massive delay on responding to you!

I don't think it's ready yet, though.

The aren't any tests that show any files? There's only some snapshots that show "unset", but the objective of the PR is to show proper data if the configuration has them.

Also review the changeset. Our contribution guidelines should help

@christymcgrory

Copy link
Copy Markdown
Author

@ematipico thanks for the feedback.

I've made the changes suggested.

@ematipico ematipico left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Almost there. The PR should be sent to next. This is a new feature

Comment thread .changeset/chatty-meals-train.md Outdated
@@ -0,0 +1,5 @@
---
"@biomejs/biome": patch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It should be a minor

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated this to minor, thanks

@christymcgrory
christymcgrory changed the base branch from main to next July 17, 2026 09:01

@ematipico ematipico left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@codspeed-hq

codspeed-hq Bot commented Jul 17, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 54.63%

❌ 1 regressed benchmark
⏩ 255 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
deserialize_from_json_str[biome.json] 386.7 µs 852.3 µs -54.63%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing christymcgrory:feat/biome-rage-files-output (cf50b45) with next (2c6ad76)2

Open in CodSpeed

Footnotes

  1. 255 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on next (dc7f199) during the generation of this report, so 2c6ad76 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@ematipico

Copy link
Copy Markdown
Member

@christymcgrory please fix the tests

@christymcgrory

Copy link
Copy Markdown
Author

@christymcgrory please fix the tests

Yeah I have updated those now, my branch was 800 odd commits behind next 😬

@christymcgrory

Copy link
Copy Markdown
Author

@ematipico are you able to kick off the workflow runs please?

@christymcgrory

christymcgrory commented Jul 23, 2026

Copy link
Copy Markdown
Author

Hey @ematipico,

Thanks for your help with this PR so far. Just looking in the CodSpeed GUI and it says:

No successful run was found on next ( dc7f199) during the generation of this report, so 2c6ad76 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

does that mean the regression a red herring or am I missing something?

@ematipico
ematipico merged commit 3479d15 into biomejs:next Jul 23, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Project Area: project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants