refactor(core): actions and pull diagnostics#8082
Conversation
|
7ad939d to
1cd8b85
Compare
CodSpeed Performance ReportMerging #8082 will not alter performanceComparing Summary
Footnotes
|
WalkthroughAdds Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (2)crates/biome_service/src/workspace/server.rs (5)
crates/biome_service/src/file_handlers/javascript.rs (2)
⏰ 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). (25)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
Cargo.lockis excluded by!**/*.lockand included by**crates/biome_service/src/workspace/snapshots/biome_service__workspace__server__tests__pull_diagnostics_and_actions_for_js_file.snapis excluded by!**/*.snapand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**
📒 Files selected for processing (17)
Cargo.toml(1 hunks)crates/biome_service/Cargo.toml(1 hunks)crates/biome_service/src/file_handlers/astro.rs(1 hunks)crates/biome_service/src/file_handlers/css.rs(6 hunks)crates/biome_service/src/file_handlers/graphql.rs(6 hunks)crates/biome_service/src/file_handlers/grit.rs(1 hunks)crates/biome_service/src/file_handlers/html.rs(5 hunks)crates/biome_service/src/file_handlers/javascript.rs(6 hunks)crates/biome_service/src/file_handlers/json.rs(6 hunks)crates/biome_service/src/file_handlers/mod.rs(6 hunks)crates/biome_service/src/file_handlers/svelte.rs(1 hunks)crates/biome_service/src/file_handlers/vue.rs(1 hunks)crates/biome_service/src/workspace.rs(6 hunks)crates/biome_service/src/workspace/client.rs(4 hunks)crates/biome_service/src/workspace/server.rs(2 hunks)crates/biome_service/src/workspace/server.tests.rs(1 hunks)crates/biome_service/src/workspace_types.rs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
crates/biome_service/src/workspace/server.rs
📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)
WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode
Files:
crates/biome_service/src/workspace/server.rs
crates/biome_service/src/workspace.rs
📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)
Implement and expose the Workspace trait in src/workspace.rs
Files:
crates/biome_service/src/workspace.rs
crates/biome_service/src/workspace/client.rs
📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)
WorkspaceClient is for creating connections to the daemon and communicating with WorkspaceServer
Files:
crates/biome_service/src/workspace/client.rs
🧠 Learnings (33)
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
Applied to files:
crates/biome_service/src/workspace/server.tests.rscrates/biome_service/src/workspace_types.rscrates/biome_service/src/workspace/server.rscrates/biome_service/src/file_handlers/json.rscrates/biome_service/src/workspace.rscrates/biome_service/Cargo.tomlcrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/workspace/client.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs
Applied to files:
crates/biome_service/src/workspace/server.tests.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/workspace/server.rscrates/biome_service/src/workspace.rscrates/biome_service/Cargo.tomlcrates/biome_service/src/workspace/client.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
Applied to files:
crates/biome_service/src/workspace/server.tests.rscrates/biome_service/src/workspace_types.rscrates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/workspace/server.rscrates/biome_service/src/file_handlers/json.rscrates/biome_service/src/workspace.rscrates/biome_service/Cargo.tomlcrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/workspace/client.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/** : Create a tests directory containing a specs subfolder and the files spec_test.rs, spec_tests.rs, and language.rs
Applied to files:
crates/biome_service/src/workspace/server.tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown
Applied to files:
crates/biome_service/src/workspace/server.tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`
Applied to files:
crates/biome_service/src/workspace/server.tests.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)
Applied to files:
crates/biome_service/src/workspace/server.tests.rscrates/biome_service/src/workspace/server.rscrates/biome_service/src/workspace.rscrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/workspace/client.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.
Applied to files:
crates/biome_service/src/workspace/server.tests.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode
Applied to files:
crates/biome_service/src/workspace_types.rscrates/biome_service/src/workspace/server.rscrates/biome_service/src/file_handlers/json.rscrates/biome_service/src/workspace.rscrates/biome_service/Cargo.tomlcrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/workspace/client.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/client.rs : WorkspaceClient is for creating connections to the daemon and communicating with WorkspaceServer
Applied to files:
crates/biome_service/src/workspace_types.rscrates/biome_service/src/workspace/server.rscrates/biome_service/src/workspace.rscrates/biome_service/src/workspace/client.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities
Applied to files:
crates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/json.rscrates/biome_service/src/file_handlers/html.rscrates/biome_service/src/workspace.rscrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/file_handlers/javascript.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.
Applied to files:
crates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Import and use the `FormatNode` trait for AST nodes
Applied to files:
crates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/json.rscrates/biome_service/src/file_handlers/html.rscrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/file_handlers/javascript.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode
Applied to files:
crates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Lexer must implement the biome_parser::Lexer trait
Applied to files:
crates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/json.rscrates/biome_service/src/file_handlers/html.rscrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/file_handlers/javascript.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Do not attempt to fix code; if a mandatory token/node is missing, return `None` instead
Applied to files:
crates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/json.rscrates/biome_service/src/file_handlers/html.rscrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/file_handlers/javascript.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Parser type must implement the biome_parser::Parser trait and hold context, token source, and optional options
Applied to files:
crates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/html.rscrates/biome_service/src/file_handlers/javascript.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : When a token is mandatory and present in the AST, use the AST-provided token (e.g., `node.l_paren_token().format()`) instead of emitting a static token
Applied to files:
crates/biome_service/src/file_handlers/graphql.rscrates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/json.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure
Applied to files:
Cargo.tomlcrates/biome_service/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Expose a documented public function `format_node(options: HtmlFormatOptions, root: &HtmlSyntaxNode) -> FormatResult<Formatted<HtmlFormatContext>>` delegating to `biome_formatter::format_node`
Applied to files:
crates/biome_service/src/file_handlers/css.rscrates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-25T07:22:18.540Z
Learnt from: ematipico
Repo: biomejs/biome PR: 7852
File: crates/biome_css_parser/src/syntax/property/mod.rs:161-168
Timestamp: 2025-10-25T07:22:18.540Z
Learning: In the Biome CSS parser, lexer token emission should not be gated behind parser options like `is_tailwind_directives_enabled()`. The lexer must emit correct tokens regardless of parser options to enable accurate diagnostics and error messages when the syntax is used incorrectly.
Applied to files:
crates/biome_service/src/file_handlers/css.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/cst.rs : Create FormatHtmlSyntaxNode in cst.rs implementing FormatRule<HtmlSyntaxNode> and AsFormat/IntoFormat for HtmlSyntaxNode using the provided plumbing
Applied to files:
crates/biome_service/src/file_handlers/css.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`
Applied to files:
crates/biome_service/src/workspace/server.rscrates/biome_service/src/workspace.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/
Applied to files:
crates/biome_service/src/file_handlers/json.rscrates/biome_service/Cargo.tomlcrates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/**/*.rs : Do not copy or clone data between module graph entries (including behind Arc). Each module must avoid holding duplicated data from another module to enable simple invalidation.
Applied to files:
crates/biome_service/src/file_handlers/html.rscrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/file_handlers/javascript.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Add the provided AsFormat, IntoFormat, and iterator plumbing code to lib.rs
Applied to files:
crates/biome_service/src/file_handlers/html.rscrates/biome_service/src/workspace.rscrates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/file_handlers/javascript.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Prefer implementing the Diagnostic trait via `#[derive(Diagnostic)]`
Applied to files:
crates/biome_service/src/workspace.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: `#[derive(Diagnostic)]` is supported on enums; each variant must contain a type that is itself a diagnostic
Applied to files:
crates/biome_service/src/workspace.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Types deriving `Diagnostic` must also implement `Debug`
Applied to files:
crates/biome_service/src/workspace.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation
Applied to files:
crates/biome_service/Cargo.tomlcrates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Implement the `Format` trait for your node type and use `JsFormatter` with `write!`/`format_args!` to define formatting
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Specify static properties (category, severity, description, message, location, tags) with `#[diagnostic(...)]`
Applied to files:
crates/biome_service/src/file_handlers/mod.rscrates/biome_service/src/file_handlers/javascript.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Use helper advice types from `biome_diagnostics::v2` (CodeFrameAdvice, CommandAdvice, DiffAdvice, LogAdvice) when suitable
Applied to files:
crates/biome_service/src/file_handlers/javascript.rs
🧬 Code graph analysis (11)
crates/biome_service/src/workspace/server.tests.rs (2)
crates/biome_fs/src/fs/memory.rs (1)
default(37-49)crates/biome_service/src/test_utils.rs (1)
setup_workspace_and_open_project(14-21)
crates/biome_service/src/workspace_types.rs (4)
crates/biome_service/src/file_handlers/javascript.rs (1)
pull_diagnostics_and_actions(1009-1065)crates/biome_service/src/workspace.rs (1)
pull_diagnostics_and_actions(1475-1478)crates/biome_service/src/workspace/client.rs (1)
pull_diagnostics_and_actions(175-180)crates/biome_service/src/workspace/server.rs (1)
pull_diagnostics_and_actions(1566-1654)
crates/biome_service/src/file_handlers/graphql.rs (3)
crates/biome_service/src/file_handlers/mod.rs (13)
new(584-598)new(692-705)new(847-851)new(1027-1041)new(1286-1304)new(1618-1632)new(1787-1797)filter(1458-1458)filter(1458-1458)filter(1475-1475)filter(1475-1475)filter(1651-1651)filter(1669-1669)crates/biome_html_analyze/src/lib.rs (1)
analyze(33-44)crates/biome_formatter/src/lib.rs (1)
format_node(1534-1603)
crates/biome_service/src/file_handlers/css.rs (3)
crates/biome_service/src/file_handlers/mod.rs (7)
new(584-598)new(692-705)new(847-851)new(1027-1041)new(1286-1304)new(1618-1632)new(1787-1797)crates/biome_css_formatter/src/lib.rs (2)
options(284-286)format_node(377-382)crates/biome_service/src/utils/growth_guard.rs (1)
new(19-26)
crates/biome_service/src/workspace/server.rs (3)
crates/biome_service/src/file_handlers/javascript.rs (7)
pull_diagnostics_and_actions(1009-1065)params(738-738)params(860-860)params(923-923)settings(521-521)parse(536-551)capabilities(479-517)crates/biome_service/src/workspace.rs (3)
pull_diagnostics_and_actions(1475-1478)new(471-473)new(689-691)crates/biome_service/src/workspace/client.rs (2)
pull_diagnostics_and_actions(175-180)new(60-86)
crates/biome_service/src/file_handlers/json.rs (4)
crates/biome_json_formatter/src/lib.rs (2)
options(266-268)format_node(347-352)crates/biome_service/src/file_handlers/mod.rs (7)
new(584-598)new(692-705)new(847-851)new(1027-1041)new(1286-1304)new(1618-1632)new(1787-1797)crates/biome_service/src/utils/growth_guard.rs (1)
new(19-26)crates/biome_json_parser/src/lib.rs (2)
tree(91-93)tree(208-210)
crates/biome_service/src/file_handlers/html.rs (2)
crates/biome_service/src/file_handlers/mod.rs (7)
new(584-598)new(692-705)new(847-851)new(1027-1041)new(1286-1304)new(1618-1632)new(1787-1797)crates/biome_html_formatter/src/lib.rs (1)
format_node(33-43)
crates/biome_service/src/workspace.rs (3)
crates/biome_service/src/workspace/server.rs (5)
fmt(2383-2390)pull_diagnostics_and_actions(1566-1654)new(119-141)fs(2047-2049)fs(2135-2137)crates/biome_service/src/diagnostics.rs (3)
fmt(172-174)fmt(178-180)fmt(538-540)crates/biome_service/src/workspace/client.rs (3)
pull_diagnostics_and_actions(175-180)new(60-86)fs(210-212)
crates/biome_service/src/file_handlers/mod.rs (1)
crates/biome_analyze/src/signals.rs (11)
new(50-57)new(174-185)new(281-292)new(331-349)diagnostic(22-22)diagnostic(81-85)diagnostic(356-381)actions(23-23)actions(87-93)actions(180-182)actions(383-459)
crates/biome_service/src/workspace/client.rs (4)
crates/biome_service/src/file_handlers/javascript.rs (4)
pull_diagnostics_and_actions(1009-1065)params(738-738)params(860-860)params(923-923)crates/biome_service/src/workspace.rs (14)
pull_diagnostics_and_actions(1475-1478)get_syntax_tree(1543-1546)get_syntax_tree(1626-1631)get_control_flow_graph(1550-1553)get_control_flow_graph(1633-1640)get_formatter_ir(1557-1557)get_type_info(1560-1560)get_type_info(1642-1647)get_registered_types(1563-1566)get_registered_types(1648-1654)get_semantic_model(1569-1569)get_semantic_model(1656-1661)rage(1578-1578)server_info(1582-1582)crates/biome_service/src/workspace/server.rs (9)
pull_diagnostics_and_actions(1566-1654)get_syntax_tree(1155-1177)get_control_flow_graph(1179-1200)get_formatter_ir(1202-1227)get_type_info(1229-1245)get_registered_types(1247-1266)get_semantic_model(1268-1284)rage(2105-2112)server_info(2114-2116)crates/biome_wasm/src/lib.rs (6)
get_syntax_tree(146-156)get_control_flow_graph(159-168)get_formatter_ir(171-175)get_type_info(178-182)get_registered_types(185-189)get_semantic_model(192-196)
crates/biome_service/src/file_handlers/javascript.rs (2)
crates/biome_service/src/file_handlers/mod.rs (7)
new(584-598)new(692-705)new(847-851)new(1027-1041)new(1286-1304)new(1618-1632)new(1787-1797)crates/biome_service/src/workspace/server.rs (5)
diagnostics(1404-1407)pull_diagnostics_and_actions(1566-1654)new(119-141)result(1094-1098)parse(573-599)
⏰ 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). (17)
- GitHub Check: Test Node.js API
- GitHub Check: Check JS Files
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_tailwind_parser)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: autofix
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_json_analyze)
🔇 Additional comments (26)
crates/biome_service/Cargo.toml (1)
66-66: LGTM!The
eitherdependency is correctly added using the workspace pattern and is properly positioned alphabetically.crates/biome_service/src/file_handlers/grit.rs (1)
267-267: LGTM!The new capability field is correctly initialised to
None, consistent with the pattern across all handlers that haven't yet implemented this functionality.crates/biome_service/src/file_handlers/svelte.rs (1)
110-110: LGTM!Capability field addition is consistent with other handlers.
crates/biome_service/src/file_handlers/astro.rs (1)
96-96: LGTM!Consistent capability field addition.
crates/biome_service/src/file_handlers/vue.rs (1)
110-110: LGTM!Capability field correctly added.
crates/biome_service/src/workspace/server.tests.rs (1)
422-471: LGTM!The test correctly validates the new
pull_diagnostics_and_actionsfunctionality. The assertion expecting exactly 3 actions (1 fix + 2 suppression) is specific, which is good for catching regressions, though it may need updating if the suppression action surface changes in future.Cargo.toml (1)
210-210: LGTM!The
eithercrate version 1.15.0 is current and correctly positioned in the workspace dependencies.crates/biome_service/src/workspace_types.rs (2)
551-551: LGTM!The array size is correctly incremented to reflect the new method.
574-574: LGTM!The new workspace method is properly registered and sensibly positioned alongside the other
pull_*methods.crates/biome_service/src/file_handlers/javascript.rs (4)
1-59: LGTM!The import reorganisation properly supports the new diagnostics-and-actions flow and ProcessFixAll refactoring.
505-505: LGTM!The new capability is properly wired into the analyzer capabilities, enabling the diagnostics-and-actions path for JavaScript files.
889-935: LGTM!The fix_all refactoring properly delegates to ProcessFixAll, maintaining the same logical flow whilst centralising the common processing logic. The Either-based finish approach cleanly handles the formatting branch.
1009-1065: LGTM!The new pull_diagnostics_and_actions function is well-structured and follows the established patterns from the existing lint and code_actions functions. Properly handles edge cases and integrates with the analyzer framework.
crates/biome_service/src/workspace.rs (5)
71-71: LGTM!The public re-export of embedded snippet types is appropriate for the extended API surface.
952-952: LGTM!The type simplification leverages the imported Diagnostic type, which is already biome_diagnostics::serde::Diagnostic. No semantic change.
975-996: LGTM!The new public API types properly support the diagnostics-and-actions flow. The result structure pairing diagnostics with their code actions is intuitive and well-suited for the planned interactive feature.
1474-1478: LGTM!The new Workspace trait method properly extends the public API to support the combined diagnostics-and-actions retrieval, consistent with the existing workspace method signatures.
1602-1602: LGTM!The simplified constructor call leverages the imported WorkspaceClient type. No functional change.
crates/biome_service/src/file_handlers/css.rs (4)
1-41: LGTM!The import changes properly support the ProcessFixAll refactoring and Either-based formatting branch.
361-361: LGTM!The capability field is properly added, even though CSS doesn't implement pull_diagnostics_and_actions yet. This maintains consistency with the updated capability structure.
669-669: LGTM!The clone is necessary to provide the builder with its own Arc reference, avoiding ownership issues.
679-717: LGTM!The fix_all refactoring mirrors the pattern in javascript.rs, properly delegating to ProcessFixAll whilst maintaining the original logical flow.
crates/biome_service/src/file_handlers/mod.rs (4)
551-565: LGTM!The DiagnosticsAndActionsParams struct appropriately captures the required context for the combined diagnostics-and-actions flow, consistent with existing parameter structures.
681-840: LGTM!The ProcessFixAll implementation properly centralises fix-all orchestration. The signal processing correctly handles different fix modes, the action processing applies mutations with growth guards, and the finish method cleanly handles the formatting branch via Either.
842-888: LGTM!The ProcessDiagnosticsAndActions implementation correctly collects diagnostics alongside their associated code actions, filtering to only include diagnostics that have actionable fixes.
917-917: LGTM!The type alias and capability field properly extend the analyzer capabilities structure to support the new diagnostics-and-actions flow, consistent with the existing capability pattern.
Also applies to: 931-932
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
crates/biome_service/src/file_handlers/mod.rs(6 hunks)
🧰 Additional context used
🧠 Learnings (18)
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Import and use the `FormatNode` trait for AST nodes
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Do not attempt to fix code; if a mandatory token/node is missing, return `None` instead
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Lexer must implement the biome_parser::Lexer trait
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Implement the `Format` trait for your node type and use `JsFormatter` with `write!`/`format_args!` to define formatting
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/**/*.rs : Do not copy or clone data between module graph entries (including behind Arc). Each module must avoid holding duplicated data from another module to enable simple invalidation.
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Add the provided AsFormat, IntoFormat, and iterator plumbing code to lib.rs
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Specify static properties (category, severity, description, message, location, tags) with `#[diagnostic(...)]`
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Expose a documented public function `format_node(options: HtmlFormatOptions, root: &HtmlSyntaxNode) -> FormatResult<Formatted<HtmlFormatContext>>` delegating to `biome_formatter::format_node`
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
🧬 Code graph analysis (1)
crates/biome_service/src/file_handlers/mod.rs (2)
crates/biome_analyze/src/signals.rs (10)
new(50-57)new(174-185)new(281-292)diagnostic(22-22)diagnostic(81-85)diagnostic(356-381)actions(23-23)actions(87-93)actions(180-182)actions(383-459)crates/biome_formatter/src/lib.rs (1)
range(1079-1081)
⏰ 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). (25)
- GitHub Check: autofix
- GitHub Check: Check JS Files
- GitHub Check: Test Node.js API
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Documentation
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: End-to-end tests
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Check Dependencies
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Bench (biome_tailwind_parser)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_js_parser)
|
|
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Summary
This PR does two mains things:
fix_allfunction of each language. Now we have a shared type, so the majority of the code is in one place, and each language has less repeated code. I added theEithercrate so I could conveniently handle the formatting and bubbling the errors inside the shared function. It should be enough DRY.pull_diagnostics_and_actionsthat... well, it pulls the analyzer diagnostics with their relative code actions. The reason for this addition is that I plan on implementing the new--interactivefeature that will allow users to decide how to fix errors in an interactive way (will useratatuifor the UI). In order to do so, we need a new function that pulls all the information. That's just the first step. There are more that I plan to add slowly, in the upcoming weeks.Test Plan
CI should stay green. Added a new test for the new Workspace API
Docs
N/A