chore: refactor some codgen to use proc macros to avoid merge conflicts for new rules#8633
chore: refactor some codgen to use proc macros to avoid merge conflicts for new rules#8633
Conversation
|
d446389 to
5f5506b
Compare
CodSpeed Performance ReportMerging #8633 will not alter performanceComparing Summary
Footnotes
|
Parser conformance results onjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
17a6156 to
d77e7a2
Compare
73d7dd7 to
b436611
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b436611 to
27f8e24
Compare
WalkthroughThis change extracts hardcoded group struct generation into a new procedural-macro crate ( Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
crates/biome_configuration_macros/src/visitors.rs (1)
1-219: Consider extracting shared visitor logic to a separate crate.The
LintRulesVisitorandAssistActionsVisitorimplementations here are identical to those inxtask/codegen/src/generate_configuration.rs. Extracting these to a third library crate would eliminate duplication, though this would require additional setup. For now, accepting this duplication is reasonable given the proc-macro constraint and the PR's goal of reducing merge conflicts.crates/biome_configuration_macros/src/group_struct.rs (2)
47-59: Consider improving error messages for unhandled Markdown elements.The panics are acceptable in a proc-macro context as they surface as compile errors. However, including the rule name in the panic message would help developers identify which rule's documentation contains unsupported Markdown.
🔎 Proposed improvement
Event::Start(tag) => match tag { Tag::Emphasis | Tag::Strong | Tag::Paragraph => {} - _ => panic!("Unimplemented tag {:?}", { tag }), + _ => panic!("Unimplemented tag {:?} in docs for rule '{}'", tag, rule), }, Event::End(tag) => match tag { TagEnd::Emphasis | TagEnd::Strong | TagEnd::Paragraph => {} - _ => panic!("Unimplemented tag {:?}", { tag }), + _ => panic!("Unimplemented tag {:?} in docs for rule '{}'", tag, rule), }, _ => { - panic!("Unimplemented event {:?}", { event }) + panic!("Unimplemented event {:?} in docs for rule '{}'", event, rule) }
234-239: Add explicit parentheses for clarity.The current expression relies on
&&having higher precedence than||. While the evaluation is likely correct, explicit parentheses would make the intent immediately clear.🔎 Proposed improvement
- if self.is_recommended_true() || self.is_recommended_unset() && parent_is_recommended { + if self.is_recommended_true() || (self.is_recommended_unset() && parent_is_recommended) {Same applies to line 321.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lockand included by**crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**
📒 Files selected for processing (8)
Cargo.tomlcrates/biome_configuration/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/Cargo.tomlcrates/biome_configuration_macros/src/group_struct.rscrates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rs
🧰 Additional context used
📓 Path-based instructions (2)
**/Cargo.toml
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/Cargo.toml: Use workspace dependencies withworkspace = truefor internal crates in Cargo.toml
Use path dependencies for dev-dependencies in crates to avoid requiring published versions
Files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration/Cargo.toml
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.rs: Use inline rustdoc documentation for rules, assists, and their options
Use thedbg!()macro for debugging output in Rust tests and code
Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests
Files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
🧠 Learnings (48)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Assist rules should detect refactoring opportunities and emit code action signals
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/spec_tests.rs : Use the `tests_macros::gen_tests!` macro in `spec_tests.rs` to generate test functions for each specification file matching the pattern `tests/specs/<language>/**/*.<ext>`
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/context.rs : Define `<Language>FormatContext` struct in a `context.rs` file containing `comments` and `source_map` fields, implementing `FormatContext` and `CstFormatContext` traits
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/Cargo.toml : Include development dependencies in `Cargo.toml` for formatter tests: `biome_formatter_test`, `biome_<language>_factory`, `biome_<language>_parser`, `biome_parser`, `biome_service`, `countme`, `iai`, `quickcheck`, `quickcheck_macros`, and `tests_macros`
Applied to files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration/Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro
Applied to files:
crates/biome_configuration_macros/Cargo.tomlcrates/biome_configuration_macros/src/lib.rscrates/biome_configuration/Cargo.tomlxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Create two new crates `biome_{language}_syntax` and `biome_{language}_factory` using `cargo new --lib` for new language parsers
Applied to files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration/Cargo.toml
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: Applies to **/Cargo.toml : Use workspace dependencies with `workspace = true` for internal crates in Cargo.toml
Applied to files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration/Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `language` field in `declare_lint_rule!` macro to the language the rule primarily applies to
Applied to files:
crates/biome_configuration_macros/Cargo.tomlcrates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-11-24T18:06:12.048Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.048Z
Learning: Applies to crates/biome_service/src/workspace*.rs : Implement the Workspace trait in the Biome Service to manage internal state of projects, including open documents, project layout instances, and module graph instances
Applied to files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration/Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `deprecated` field to `declare_lint_rule!` macro when deprecating a rule
Applied to files:
crates/biome_configuration_macros/Cargo.tomlcrates/biome_configuration_macros/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait
Applied to files:
crates/biome_configuration_macros/Cargo.tomlcrates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `full_options` code block property for complete biome.json configuration snippets in documentation
Applied to files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration/Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance
Applied to files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration_macros/src/lib.rscrates/biome_configuration/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/actions.rsxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: Build debug binaries using `cargo build --bin biome` for development and triaging
Applied to files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration/Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation
Applied to files:
crates/biome_configuration_macros/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options must be placed inside the `biome_rule_options` crate
Applied to files:
crates/biome_configuration_macros/Cargo.tomlCargo.tomlcrates/biome_configuration/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-11-24T18:06:12.048Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.048Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Implement watcher tests for workspace methods in watcher.tests.rs and end-to-end tests in LSP tests
Applied to files:
Cargo.toml
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: Applies to **/Cargo.toml : Use path dependencies for dev-dependencies in crates to avoid requiring published versions
Applied to files:
Cargo.tomlcrates/biome_configuration/Cargo.toml
📚 Learning: 2025-11-24T18:06:12.048Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.048Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : Use WorkspaceServer implementation for maintaining workspace state in daemon mode and CLI daemonless mode
Applied to files:
Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Lines prefixed with `#` in rule documentation code examples will be hidden from output
Applied to files:
Cargo.tomlcrates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options
Applied to files:
Cargo.tomlcrates/biome_configuration_macros/src/lib.rscrates/biome_configuration/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/actions.rsxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-11-24T18:05:42.356Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:42.356Z
Learning: Applies to crates/biome_js_type_info/**/*.rs : No module may copy or clone data from another module in the module graph, not even behind an `Arc`
Applied to files:
Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Assist rules should detect refactoring opportunities and emit code action signals
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use generic rule names if the rule could potentially be implemented for multiple languages
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation code blocks should be ordered as language, expect_diagnostic, options/full_options/use_options, ignore, file
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration/src/analyzer/assist/actions.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-22T09:27:13.161Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:27:13.161Z
Learning: In crates/biome_analyze/**/*analyze/src/**/*.rs, the `fix_kind` field in `declare_lint_rule!` should only be specified when the rule implements the `action` function. Rules that only emit diagnostics without providing code fixes should not include `fix_kind` in their metadata.
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/language_kind.rs : Add a new language prefix to the `LANGUAGE_PREFIXES` constant in `language_kind.rs` file
Applied to files:
crates/biome_configuration/Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options struct must derive `Deserializable`, `Serialize`, `Deserialize`, and optionally `JsonSchema`
Applied to files:
crates/biome_configuration/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and no domains are enabled by default
Applied to files:
crates/biome_configuration/Cargo.tomlxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and domains are only enabled when the domain is enabled
Applied to files:
crates/biome_configuration/Cargo.tomlxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `deny_unknown_fields` in serde derive macro for rule options
Applied to files:
crates/biome_configuration/Cargo.toml
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement `action` function in Rule trait to provide code actions
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).inspired()` when implementing a rule inspired by but with different behavior than an ESLint rule
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `info` for code action rules in analyzer
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement custom Visitor by implementing the Visitor trait for complex rule logic
Applied to files:
crates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use language-specific rule names if the rule is meant for a specific language only
Applied to files:
crates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/spec_tests.rs : Use the `tests_macros::gen_tests!` macro in `spec_tests.rs` to generate test functions for each specification file matching the pattern `tests/specs/<language>/**/*.<ext>`
Applied to files:
xtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `info` for rules in complexity group
Applied to files:
xtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions
Applied to files:
xtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `error` for rules in correctness, security, and a11y groups
Applied to files:
crates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `info` or `warn` for rules in style group
Applied to files:
crates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `error` for rules in suspicious group
Applied to files:
crates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Each rule option must have its own h3 header with description, default value, options block, and code example
Applied to files:
crates/biome_configuration_macros/src/group_struct.rs
🧬 Code graph analysis (4)
crates/biome_configuration_macros/src/lib.rs (3)
crates/biome_configuration_macros/src/group_struct.rs (1)
generate_group_struct(10-343)crates/biome_configuration/src/analyzer/assist/actions.rs (1)
group(82-89)crates/biome_html_analyze/src/registry.rs (1)
visit_registry(5-7)
crates/biome_configuration/src/analyzer/assist/actions.rs (1)
crates/biome_configuration_macros/src/lib.rs (1)
assist_group_structs(54-73)
crates/biome_configuration_macros/src/visitors.rs (1)
xtask/codegen/src/generate_configuration.rs (20)
record_category(28-32)record_category(53-57)record_category(72-76)record_category(91-95)record_category(110-114)record_category(135-139)record_category(153-157)record_category(172-176)record_category(191-195)record_category(210-214)record_rule(34-49)record_rule(59-68)record_rule(78-87)record_rule(97-106)record_rule(116-125)record_rule(141-149)record_rule(159-168)record_rule(178-187)record_rule(197-206)record_rule(216-225)
xtask/codegen/src/generate_configuration.rs (2)
xtask/codegen/src/lib.rs (1)
update(58-78)crates/biome_configuration_macros/src/lib.rs (2)
lint_group_structs(12-40)assist_group_structs(54-73)
⏰ 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: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Test Node.js API
- GitHub Check: Check Dependencies
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Documentation
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: End-to-end tests
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: autofix
- GitHub Check: Bench (biome_tailwind_parser)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Parser conformance
- GitHub Check: Bench (biome_package)
🔇 Additional comments (15)
crates/biome_configuration_macros/Cargo.toml (1)
1-34: LGTM!The manifest correctly uses
workspace = truefor all internal biome_* crates and proc-macro tooling. Thepulldown-cmarkdependency with a hardcoded version is fine since it's an external crate not defined in the workspace dependencies.crates/biome_configuration/Cargo.toml (1)
25-26: LGTM!The
biome_configuration_macrosdependency is correctly added withworkspace = true, following the project conventions.Cargo.toml (1)
26-26: LGTM!Workspace dependency correctly added without a version, consistent with other non-published internal crates.
xtask/codegen/src/generate_configuration.rs (1)
387-395: LGTM!The conditional macro invocations cleanly delegate group struct generation to the new proc-macro crate, achieving the PR's goal of reducing merge conflicts.
crates/biome_configuration_macros/src/lib.rs (2)
11-40: LGTM!The
lint_group_structsmacro is well-structured. It collects rules, iterates over the predefined groups, and generates the appropriate structs.
86-92: LGTM!The
to_capitalizedhelper is a clean, idiomatic implementation.crates/biome_configuration/src/analyzer/assist/actions.rs (1)
176-176: LGTM!The macro invocation neatly replaces the hand-coded
Sourcestruct whilst maintaining compatibility with the rest of the generated file.crates/biome_configuration_macros/src/group_struct.rs (8)
1-9: LGTM!Imports are appropriate for the proc-macro context. Good use of
BTreeMapfromstd::collectionsto ensure deterministic iteration order.
10-24: LGTM!Clear function signature and well-organised collectors for the generated code tokens.
79-146: LGTM!The token generation logic is well-structured. The conditional for recommended rules (requiring both
recommendedflag and empty domains) aligns with the domain-specific rule handling pattern.
149-169: LGTM!Appropriate visibility modifiers:
pub(crate)for Action's inherent method, and default visibility for Lint's trait implementation.
222-225: LGTM!The
binary_searchworks correctly here sinceGROUP_RULESis populated fromBTreeMapiteration, which maintains sorted key order.
171-243: LGTM!The Action branch generates a well-structured configuration struct with appropriate serde attributes and helper methods. The direct implementation (rather than trait) makes sense for the simpler Action case.
276-331: LGTM!Clean
RuleGroupExttrait implementation. The trait-based approach for Lint groups enables polymorphic handling of different rule groups.
333-340: LGTM!The
From<GroupPlainConfiguration>implementation correctly initialises all rule fields while leavingrecommendedasNone, allowing the plain configuration to be applied without overriding recommendation settings.
| } | ||
| }; | ||
|
|
||
| let rule_position = Literal::u8_unsuffixed(index as u8); |
There was a problem hiding this comment.
Potential overflow when casting index to u8.
If a group ever contains more than 255 rules, this cast will silently truncate. While unlikely today, a compile-time assertion or using u16 would future-proof this.
🔎 Proposed fix
- let rule_position = Literal::u8_unsuffixed(index as u8);
+ let rule_position = Literal::usize_unsuffixed(index);Or add a compile-time check:
+ assert!(
+ index <= u8::MAX as usize,
+ "Group '{}' has more than 255 rules, which exceeds the u8 limit",
+ group
+ );
let rule_position = Literal::u8_unsuffixed(index as u8);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| let rule_position = Literal::u8_unsuffixed(index as u8); | |
| let rule_position = Literal::usize_unsuffixed(index); |
🤖 Prompt for AI Agents
In crates/biome_configuration_macros/src/group_struct.rs around line 78, the
code casts index to u8 which can silently truncate for groups with >255 rules;
replace the u8 literal with a wider type (e.g., use a u16 unsuffixed literal and
cast index as u16) to future-proof, and update any downstream consumers/types if
needed; alternatively, if u8 is required, add a runtime/compile-time check
(assert or const_assert) that index <= u8::MAX before the cast to prevent silent
truncation.
| let Some(group) = input_assist.groups.get(group_name) else { | ||
| return TokenStream::from(quote! { | ||
| compile_error!(concat!("no such lint rule group found: ", group_name)); | ||
| }); | ||
| }; |
There was a problem hiding this comment.
Inconsistent error message.
The error message says "lint rule group" but this is the assist_group_structs macro. Should read "assist rule group" for clarity.
🔎 Proposed fix
let Some(group) = input_assist.groups.get(group_name) else {
return TokenStream::from(quote! {
- compile_error!(concat!("no such lint rule group found: ", group_name));
+ compile_error!(concat!("no such assist rule group found: ", group_name));
});
};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| let Some(group) = input_assist.groups.get(group_name) else { | |
| return TokenStream::from(quote! { | |
| compile_error!(concat!("no such lint rule group found: ", group_name)); | |
| }); | |
| }; | |
| let Some(group) = input_assist.groups.get(group_name) else { | |
| return TokenStream::from(quote! { | |
| compile_error!(concat!("no such assist rule group found: ", group_name)); | |
| }); | |
| }; |
🤖 Prompt for AI Agents
In crates/biome_configuration_macros/src/lib.rs around lines 60 to 64, the
compile_error message incorrectly refers to "lint rule group" but this is inside
the assist_group_structs macro; change the error string to read "assist rule
group" instead. Update the concat! literal so the emitted compile_error is
concat!("no such assist rule group found: ", group_name) (preserve existing
formatting and TokenStream construction).
27f8e24 to
7c51452
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (3)
xtask/codegen/src/generate_configuration.rs (1)
375-381: Remove commented-out code.This block appears to be leftover development code. The past review noted this was addressed in commit 7c51452, but the commented lines remain. Please remove them.
crates/biome_configuration_macros/src/lib.rs (1)
60-64: Inconsistent error message.The error message says "lint rule group" but this is the
assist_group_structsmacro. Should read "assist rule group" for clarity.🔎 Proposed fix
let Some(group) = input_assist.groups.get(group_name) else { return TokenStream::from(quote! { - compile_error!(concat!("no such lint rule group found: ", group_name)); + compile_error!(concat!("no such assist rule group found: ", group_name)); }); };crates/biome_configuration_macros/src/group_struct.rs (1)
79-79: Potential overflow when castingindextou8.If a group ever contains more than 255 rules, this cast will silently truncate. While unlikely today, consider a compile-time assertion or using
usize.🔎 Proposed fix
+ assert!( + index <= u8::MAX as usize, + "Group '{}' has more than 255 rules, which exceeds the u8 limit", + group + ); let rule_position = Literal::u8_unsuffixed(index as u8);
🧹 Nitpick comments (1)
crates/biome_configuration_macros/src/group_struct.rs (1)
48-61: Panics on unhandled Markdown events during macro expansion.These
panic!calls will cause a compile-time error if rule documentation contains unsupported Markdown elements (e.g., links, images, lists). This is probably fine as a compile-time guard, but consider whether a more graceful fallback or skip would be preferable for robustness.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lockand included by**crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**
📒 Files selected for processing (8)
Cargo.tomlcrates/biome_configuration/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/Cargo.tomlcrates/biome_configuration_macros/src/group_struct.rscrates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/visitors.rsxtask/codegen/src/generate_configuration.rs
🚧 Files skipped from review as they are similar to previous changes (3)
- Cargo.toml
- crates/biome_configuration/Cargo.toml
- crates/biome_configuration_macros/Cargo.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.rs: Use inline rustdoc documentation for rules, assists, and their options
Use thedbg!()macro for debugging output in Rust tests and code
Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests
Files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rscrates/biome_configuration_macros/src/group_struct.rs
🧠 Learnings (40)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Assist rules should detect refactoring opportunities and emit code action signals
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/spec_tests.rs : Use the `tests_macros::gen_tests!` macro in `spec_tests.rs` to generate test functions for each specification file matching the pattern `tests/specs/<language>/**/*.<ext>`
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/context.rs : Define `<Language>FormatContext` struct in a `context.rs` file containing `comments` and `source_map` fields, implementing `FormatContext` and `CstFormatContext` traits
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/src/**/*.rs : Implement a token source struct that wraps the lexer and implements `TokenSourceWithBufferedLexer` and `LexerWithCheckpoint` for lookahead and re-lexing capabilities
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:42.356Z
Learning: Applies to crates/biome_js_type_info/**/*.rs : Use `TypeReference` instead of `Arc` for types that reference other types to avoid stale cache issues when modules are replaced
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Assist rules should detect refactoring opportunities and emit code action signals
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro
Applied to files:
crates/biome_configuration_macros/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `language` field in `declare_lint_rule!` macro to the language the rule primarily applies to
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `deprecated` field to `declare_lint_rule!` macro when deprecating a rule
Applied to files:
crates/biome_configuration_macros/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-22T09:27:13.161Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:27:13.161Z
Learning: In crates/biome_analyze/**/*analyze/src/**/*.rs, the `fix_kind` field in `declare_lint_rule!` should only be specified when the rule implements the `action` function. Rules that only emit diagnostics without providing code fixes should not include `fix_kind` in their metadata.
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/visitors.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `error` for rules in correctness, security, and a11y groups
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `error` for rules in suspicious group
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-31T15:35:41.261Z
Learnt from: dyc3
Repo: biomejs/biome PR: 8639
File: crates/biome_js_analyze/src/lint/nursery/no_excessive_lines_per_file.rs:101-108
Timestamp: 2025-12-31T15:35:41.261Z
Learning: In crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs, the `issue_number` field in `declare_lint_rule!` macro is optional and the vast majority of nursery rules do not need it. Do not recommend adding `issue_number` unless there's a specific reason.
Applied to files:
crates/biome_configuration_macros/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Each invalid code example in rule documentation must emit exactly one diagnostic
Applied to files:
crates/biome_configuration_macros/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `info` or `warn` for rules in style group
Applied to files:
crates/biome_configuration_macros/src/lib.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use generic rule names if the rule could potentially be implemented for multiple languages
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/visitors.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation code blocks should be ordered as language, expect_diagnostic, options/full_options/use_options, ignore, file
Applied to files:
crates/biome_configuration_macros/src/lib.rsxtask/codegen/src/generate_configuration.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Lines prefixed with `#` in rule documentation code examples will be hidden from output
Applied to files:
xtask/codegen/src/generate_configuration.rscrates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation
Applied to files:
xtask/codegen/src/generate_configuration.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge
Applied to files:
xtask/codegen/src/generate_configuration.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement `action` function in Rule trait to provide code actions
Applied to files:
xtask/codegen/src/generate_configuration.rscrates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use language-specific rule names if the rule is meant for a specific language only
Applied to files:
xtask/codegen/src/generate_configuration.rscrates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and domains are only enabled when the domain is enabled
Applied to files:
xtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and no domains are enabled by default
Applied to files:
xtask/codegen/src/generate_configuration.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `info` for code action rules in analyzer
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).inspired()` when implementing a rule inspired by but with different behavior than an ESLint rule
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : The first paragraph of rule documentation must be a single line describing what the rule does
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options must be placed inside the `biome_rule_options` crate
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options struct must derive `Deserializable`, `Serialize`, `Deserialize`, and optionally `JsonSchema`
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement custom Visitor by implementing the Visitor trait for complex rule logic
Applied to files:
crates/biome_configuration_macros/src/visitors.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `info` for rules in complexity group
Applied to files:
crates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` for rules in performance group
Applied to files:
crates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Each rule option must have its own h3 header with description, default value, options block, and code example
Applied to files:
crates/biome_configuration_macros/src/group_struct.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/src/**/*.rs : Parse rule functions must be prefixed with `parse_` and use the name defined in the grammar file, e.g., `parse_for_statement` or `parse_expression`
Applied to files:
crates/biome_configuration_macros/src/group_struct.rs
🧬 Code graph analysis (5)
crates/biome_configuration_macros/src/lib.rs (3)
crates/biome_configuration_macros/src/group_struct.rs (1)
generate_group_struct(11-344)crates/biome_configuration/src/analyzer/assist/actions.rs (1)
group(82-89)crates/biome_html_analyze/src/registry.rs (1)
visit_registry(5-7)
xtask/codegen/src/generate_configuration.rs (2)
xtask/codegen/src/lib.rs (1)
update(58-78)crates/biome_configuration_macros/src/lib.rs (2)
lint_group_structs(12-40)assist_group_structs(54-73)
crates/biome_configuration/src/analyzer/assist/actions.rs (1)
crates/biome_configuration_macros/src/lib.rs (1)
assist_group_structs(54-73)
crates/biome_configuration_macros/src/visitors.rs (1)
xtask/codegen/src/generate_configuration.rs (20)
record_category(28-32)record_category(53-57)record_category(72-76)record_category(91-95)record_category(110-114)record_category(135-139)record_category(153-157)record_category(172-176)record_category(191-195)record_category(210-214)record_rule(34-49)record_rule(59-68)record_rule(78-87)record_rule(97-106)record_rule(116-125)record_rule(141-149)record_rule(159-168)record_rule(178-187)record_rule(197-206)record_rule(216-225)
crates/biome_configuration_macros/src/group_struct.rs (2)
crates/biome_configuration_macros/src/lib.rs (1)
to_capitalized(86-92)crates/biome_configuration/src/analyzer/mod.rs (3)
RuleFilter(722-722)recommended_rules_as_filters(936-936)is_recommended_true(927-927)
⏰ 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). (26)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Test Node.js API
- GitHub Check: Bench (biome_package)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Check Dependencies
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Parser conformance
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Documentation
- GitHub Check: End-to-end tests
- GitHub Check: Bench (biome_tailwind_parser)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: autofix
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: triage
🔇 Additional comments (8)
xtask/codegen/src/generate_configuration.rs (1)
387-395: Clean macro-based generation flow.Good work delegating group struct generation to the proc macros. The branching on
RuleCategory::LintvsRuleCategory::Actionis clear and aligns with the macro implementations inbiome_configuration_macros.crates/biome_configuration_macros/src/lib.rs (2)
11-40: Well-structured macro with explicit group enumeration.The explicit list of group names is intentional for the merge conflict mitigation goal. This ensures that adding a new rule to an existing group won't cause conflicts—only adding an entirely new group would require updating this list.
86-91: Simple capitalisation helper.This works for ASCII rule names. If rule names ever contain non-ASCII characters, the behaviour might be unexpected (e.g.,
ß→SS), but this is unlikely for this codebase.crates/biome_configuration/src/analyzer/assist/actions.rs (1)
176-176: Clean macro delegation.The
Sourcestruct and its associated impl are now generated by the macro. This achieves the PR's goal of reducing merge conflicts when adding new assist rules.crates/biome_configuration_macros/src/group_struct.rs (1)
172-244: Comprehensive group struct generation.The branching between
RuleCategory::Actionand Lint is well-handled. The Action variant uses inherent methods whilst Lint implementsRuleGroupExt, which aligns with the existing codebase patterns. TheFrom<GroupPlainConfiguration>impl for Lint groups is a nice touch for configuration ergonomics.Also applies to: 245-343
crates/biome_configuration_macros/src/visitors.rs (3)
21-43: JsLanguage visitor correctly tracks domains.The
LintRulesVisitorforJsLanguageis the only implementation that populates thedomainsfield. This is consistent with the original codegen—only JS rules have domain metadata tracked. Good consistency.
122-220: AssistActionsVisitor implementations are straightforward.Clean multi-language visitor implementations. No domain tracking needed for assist rules.
12-120: Visitor implementations are duplicated across the proc-macro and xtask codegen.The
LintRulesVisitorimplementations here mirror those inxtask/codegen/src/generate_configuration.rsexactly. This duplication is unavoidable due to architectural constraints: xtask is a build tool that cannot be depended upon by the proc-macro crate, so extracting to a shared library isn't feasible. This is an acceptable trade-off.

Summary
A frequent point of friction, particularly for contributors adding new rules, is the merge conflicts that occur as a result of merging other new rules.
This aims to make it so that in most cases, merging new rules will not require other PRs to rebase. Or at least start moving us in that direction.
This is not quite complete yet, because currently all json rules are excluded because of a circular dependency problem.Fixed lower in the PR stack.Test Plan
it builds, ci should be green
Docs