+
Skip to content

Conversation

ematipico
Copy link
Member

Summary

Addresses the discussion in this issue: #7622

Test Plan

Snapshots updated

Docs

N/A

Copy link

changeset-bot bot commented Oct 3, 2025

🦋 Changeset detected

Latest commit: 426d110

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

@ematipico ematipico requested review from a team October 3, 2025 07:19
@github-actions github-actions bot added the A-CLI Area: CLI label Oct 3, 2025
@ematipico ematipico force-pushed the feat/info-diagnostics-summary branch from 4e9333e to e4cff49 Compare October 3, 2025 07:22
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Added counting and reporting for Information-level diagnostics. DiagnosticsPrinter gained an AtomicU32 infos counter with a new infos() accessor; traverse reads that and populates a new public field pub infos: u32 on TraversalSummary. Terminal reporter output was updated: Search mode prints matches only; non‑Search modes print errors, warnings and infos counts with singular/plural handling. No other public exports were changed.

Possibly related PRs

Suggested labels

A-Project

Suggested reviewers

  • dyc3

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the main feature of printing the info count in the CLI, directly matching the changes that add Information-level diagnostic output.
Description Check ✅ Passed The description references the relevant issue discussion, outlines the feature’s motivation, and notes the test and documentation status, making it clearly related to the implemented changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/info-diagnostics-summary

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f59a76 and 426d110.

📒 Files selected for processing (1)
  • .changeset/social-hornets-wait.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/social-hornets-wait.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: autofix

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

@ematipico ematipico force-pushed the feat/info-diagnostics-summary branch from e4cff49 to 0f59a76 Compare October 3, 2025 07:27
Copy link
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

🧹 Nitpick comments (1)
crates/biome_cli/src/execute/traverse.rs (1)

297-299: Remove commented info count in the Message::Error branch
Information‐severity diagnostics are routed via Message::Diagnostics, so delete the commented-out self.infos.fetch_add lines to avoid confusion.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09445c8 and 0f59a76.

⛔ Files ignored due to path filters (14)
  • crates/biome_cli/tests/snapshots/main_cases_assist/assist_emit_diagnostic_but_doesnt_block.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_vcs_ignored_files/ignore_vcs_ignored_file_via_cli.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/print_json.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/print_json_pretty.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/should_not_disable_recommended_rules_for_a_group.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/print_json.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/print_json_pretty.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/downgrade_severity_info.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/lint_only_rule_with_config.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/lint_only_rule_with_recommended_disabled.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/linter_can_resolve_imported_symbols.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/linter_enables_project_domain_based_on_extended_config.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/should_not_disable_recommended_rules_for_a_group.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/should_report_when_schema_version_mismatch.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (5)
  • .changeset/social-hornets-wait.md (1 hunks)
  • .changeset/warm-insects-dress.md (1 hunks)
  • crates/biome_cli/src/execute/traverse.rs (7 hunks)
  • crates/biome_cli/src/reporter/mod.rs (1 hunks)
  • crates/biome_cli/src/reporter/terminal.rs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_cli/src/reporter/terminal.rs
  • crates/biome_cli/src/reporter/mod.rs
  • crates/biome_cli/src/execute/traverse.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Before committing, format Rust and TOML files (e.g., via just f/just format)

Files:

  • crates/biome_cli/src/reporter/terminal.rs
  • crates/biome_cli/src/reporter/mod.rs
  • crates/biome_cli/src/execute/traverse.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Document rules, assists, and options via inline rustdoc in Rust source

Files:

  • crates/biome_cli/src/reporter/terminal.rs
  • crates/biome_cli/src/reporter/mod.rs
  • crates/biome_cli/src/execute/traverse.rs
.changeset/**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

.changeset/**/*.md: Create changesets using the just new-changeset command; do not author them manually
In changeset markdown, only use headers #### or #####
Changeset descriptions must end every sentence with a full stop (.)
For bug fixes, start the changeset description with a linked issue reference like “Fixed #1234
Prefer past tense for what was done and present tense for current behavior in changesets

Files:

  • .changeset/social-hornets-wait.md
  • .changeset/warm-insects-dress.md
🧬 Code graph analysis (2)
crates/biome_cli/src/reporter/terminal.rs (3)
crates/biome_cli/src/execute/mod.rs (1)
  • fmt (199-208)
crates/biome_cli/src/reporter/summary.rs (5)
  • fmt (281-286)
  • fmt (318-396)
  • fmt (475-479)
  • fmt (506-515)
  • fmt (521-551)
crates/biome_cli/src/execute/traverse.rs (3)
  • errors (219-221)
  • warnings (223-225)
  • infos (227-229)
crates/biome_cli/src/execute/traverse.rs (2)
crates/biome_service/src/diagnostics.rs (5)
  • severity (353-355)
  • severity (395-397)
  • severity (495-497)
  • severity (548-550)
  • severity (638-640)
packages/@biomejs/plugin-api/index.d.ts (1)
  • Severity (1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: autofix
🔇 Additional comments (9)
.changeset/warm-insects-dress.md (1)

1-27: This changeset describes an unrelated feature.

The PR is titled "feat(cli): print info count" and adds Information-level diagnostic counting, but this changeset documents a lineEnding: "auto" feature. Either this changeset was included by mistake, or it belongs to a different PR.

Please verify whether this changeset should be part of this PR. If not, consider removing it or moving it to the appropriate PR.

crates/biome_cli/src/reporter/mod.rs (1)

40-40: LGTM!

The new infos field is correctly positioned and consistent with the existing errors and warnings fields.

crates/biome_cli/src/reporter/terminal.rs (1)

262-300: Clean implementation with proper mode-aware handling.

The conditional rendering correctly distinguishes Search mode (which prints matches) from other modes (which print errors, warnings, and infos). Singular/plural handling is accurate throughout.

crates/biome_cli/src/execute/traverse.rs (6)

104-104: LGTM!

The infos accessor is correctly called and the value is properly propagated into the traversal summary.


120-120: LGTM!

The infos field is correctly included in the TraversalSummary construction, maintaining consistency with errors and warnings.


170-172: LGTM!

The infos field follows the same pattern as errors and warnings, using AtomicU32 for thread-safe access.


191-191: LGTM!

The infos counter is correctly initialised to zero in the constructor.


227-229: LGTM!

The accessor method correctly returns the info count using relaxed ordering, consistent with errors() and warnings().


356-358: LGTM!

Information-level diagnostics are correctly counted in the Message::Diagnostics branch.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@ematipico ematipico merged commit 480909a into next Oct 4, 2025
15 of 20 checks passed
@ematipico ematipico deleted the feat/info-diagnostics-summary branch October 4, 2025 16:48
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.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载