Skip to content

fix(core): file size diagnostic severity#9980

Merged
ematipico merged 1 commit intomainfrom
fix/file-size-diagnostic
Apr 14, 2026
Merged

fix(core): file size diagnostic severity#9980
ematipico merged 1 commit intomainfrom
fix/file-size-diagnostic

Conversation

@ematipico
Copy link
Copy Markdown
Member

Summary

Closes #9941

Test Plan

Added a new test

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 14, 2026

🦋 Changeset detected

Latest commit: 2647031

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

@ematipico ematipico requested review from a team April 14, 2026 09:08
@github-actions github-actions Bot added A-CLI Area: CLI A-Project Area: project labels Apr 14, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

Walkthrough

This change addresses issue #9941 by elevating the FileTooLarge diagnostic from information level to warning level. The modification enables the --error-on-warnings flag to properly exit with a non-zero status when files exceed the configured files.maxSize limit. Changes include a changeset entry, an updated diagnostic severity in the service layer, and a new CLI integration test validating the behaviour.

Suggested labels

A-Diagnostic, A-CLI

Suggested reviewers

  • dyc3
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adjusting the file size diagnostic severity from information to warning level.
Description check ✅ Passed The description references the linked issue #9941 and mentions a new test was added, relating to the changeset.
Linked Issues check ✅ Passed The PR addresses issue #9941 by changing the FileTooLarge diagnostic severity from information to warning, enabling --error-on-warnings to properly catch file size violations and exit with non-zero code.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the file size diagnostic severity issue: the changeset entry, diagnostic severity change, and integration test are all in scope.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/file-size-diagnostic

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

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 @.changeset/every-poets-throw.md:
- Line 5: Update the changeset sentence to correct the grammar: replace "file
exceed the `files.maxSize` limit" with "file exceeds the `files.maxSize` limit"
so the user-facing line reads "Biome now emits a `warning` diagnostic when a
file exceeds the `files.maxSize` limit."; ensure the rest of the changeset text
and tense follow the project's guideline for concise, clear descriptions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c56bb05f-8536-4dba-8aa7-52628dc20ee9

📥 Commits

Reviewing files that changed from the base of the PR and between 3f89810 and 2647031.

⛔ Files ignored due to path filters (15)
  • crates/biome_cli/tests/snapshots/main_cases_overrides_max_file_size/overrides_files_max_size_too_large_limit_check.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_overrides_max_file_size/overrides_files_max_size_too_large_limit_format.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/file_too_large.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/file_too_large_cli_limit.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/file_too_large_config_limit.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/file_too_large_error_on_warnings.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_ci/file_too_large.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_ci/file_too_large_cli_limit.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_ci/file_too_large_config_limit.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/file_too_large.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/file_too_large_cli_limit.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/file_too_large_config_limit.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/file_too_large.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/file_too_large_cli_limit.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/file_too_large_config_limit.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (3)
  • .changeset/every-poets-throw.md
  • crates/biome_cli/tests/commands/check.rs
  • crates/biome_service/src/diagnostics.rs

Comment thread .changeset/every-poets-throw.md
Copy link
Copy Markdown
Member

@chansuke chansuke left a comment

Choose a reason for hiding this comment

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

lgtm

@ematipico ematipico merged commit 098f1ff into main Apr 14, 2026
26 checks passed
@ematipico ematipico deleted the fix/file-size-diagnostic branch April 14, 2026 11:23
@github-actions github-actions Bot mentioned this pull request Apr 14, 2026
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.

🐛 biome returns 0 when file exceeds maxSize even if --error-on-warnings is enabled

3 participants