Public report of biomejs/biome, published 14 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 14 November 2026, 08:18 UTC · Survey ID cd_167f022d954f4387887b9f2d86ab75dc

biomejs/biome

Measured 14 November 2026, 08:14 UTC, at code version 97aa183

First survey, so nothing to compare with yet Code coverage: not measured

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 65out of 100 At risk

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A very large codebase: 769,268 lines of product code in 127 projects, tests not counted · Estimated rebuild effort: about 7.4 person-years · Weakest lens: Code Health, 57

Findings by how serious they are

34 critical 4426 serious 471 minor

14 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 08:14 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

64of 64 dimensions measured by tools.
4858of 4931 findings point to an exact file and line, so you can open each one in the code. The other 73 concern the repository as a whole, such as missing documentation.
64dimensions across 8 lenses, read from 769,268 lines of product code in 127 projects.
Chapters

Executive summary

biomejs/biome is rated At risk because critical security findings are open. It scores 65 out of 100, which the At risk rating leaves unchanged.

Code Health, at 57, is the weakest lens and counts most in the score. The best first step is writing log messages as searchable templates, worth about 4 points. Recording design decisions comes next, worth about 2 points. Raising Code Health to 70 would lift the score to about 69.

Nine known security holes in the packages the code depends on can be used by attackers. Five pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline, and ten parts of the code are no longer understood by anyone working on it. Updating the vulnerable packages, passing outside input through environment variables and having someone learn the forgotten files would close these risks. The two passwords or keys in the code's history need replacing, with the old ones switched off. The two pipeline steps that run downloads without checking them need each download checked against a known checksum first. The piece of product code that depends on test code needs its reference to the test project removed.

The product code is 769,268 lines, about €1,100,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Code Health 57 · counts for 45%Production Readiness 64 · counts for 25%Maturity 68 · counts for 14%Security and Compliance 74 · counts for 8%Architecture 89 · counts for 4%Domain Modelling 100 · counts for 2%Event Sourcing 100 · counts for 1%Performance 100 · counts for 1%

If Code Health rose from 57 to 70, the lowest score rated Strong, the score would rise from 65 to about 69.

Code composition: what the lines of code are
Product code 84%Tests 16%
Rebuild cost: about €1,100,000 · Estimate
Cost to rebuild€360,000 to €1,800,000, for 5,948 to 18,871 hours of work, about 7.4 person-years for 4 to 14 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.9 at a score of 65. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeVery large: 769,268 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Interpolated log message defeats structured logging
Raises the score by about 4 points · Medium effort · Structured logging
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json.
Raises the score by about 2 points · Low effort · ADR Quality
3
The findings name the configuration each number was taken from and, for the assertions, the files that hold them.
Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Raises the score by about 3 points · Medium effort · Nullable reference types

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €1,100,000 to build again, about 7.4 person-years of work. Its weakest lens is Code Health, at 57 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Interpolated log message defeats structured logging. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 10% on every change. The history of the code shows how much it changes: about 1,191,809 lines over the last 90 days, which is about 4,833,448 lines a year. At that pace, the extra work comes to an estimated 545.2 to 3271 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch biome_analyze biome_analyze biome_console biome_console biome_analyze->biome_console biome_deserialize biome_deserialize biome_analyze->biome_deserialize biome_deserialize_macros biome_deserialize_macros biome_analyze->biome_deserialize_macros biome_diagnostics biome_diagnostics biome_analyze->biome_diagnostics biome_parser biome_parser biome_analyze->biome_parser biome_rowan biome_rowan biome_analyze->biome_rowan biome_string_case biome_string_case biome_analyze->biome_string_case biome_cli biome_cli biome_cli->biome_analyze biome_configuration biome_configuration biome_cli->biome_configuration biome_cli->biome_console biome_css_analyze biome_css_analyze biome_cli->biome_css_analyze biome_cli->biome_deserialize biome_cli->biome_deserialize_macros biome_cli->biome_diagnostics biome_formatter biome_formatter biome_cli->biome_formatter biome_html_analyze biome_html_analyze biome_cli->biome_html_analyze biome_js_analyze biome_js_analyze biome_cli->biome_js_analyze biome_js_syntax biome_js_syntax biome_cli->biome_js_syntax biome_languages biome_languages biome_cli->biome_languages biome_module_graph biome_module_graph biome_cli->biome_module_graph biome_cli->biome_rowan biome_service biome_service biome_cli->biome_service biome_configuration->biome_analyze biome_configuration->biome_console biome_configuration->biome_deserialize biome_configuration->biome_deserialize_macros biome_configuration->biome_diagnostics biome_configuration->biome_formatter biome_configuration->biome_rowan biome_configuration->biome_string_case biome_css_analyze->biome_analyze biome_css_analyze->biome_console biome_css_analyze->biome_deserialize biome_css_analyze->biome_deserialize_macros biome_css_analyze->biome_diagnostics biome_css_analyze->biome_languages biome_css_analyze->biome_module_graph biome_css_analyze->biome_parser biome_css_analyze->biome_rowan biome_css_analyze->biome_string_case biome_deserialize->biome_console biome_deserialize->biome_diagnostics biome_deserialize->biome_rowan biome_deserialize_macros->biome_string_case biome_diagnostics->biome_console biome_diagnostics->biome_rowan biome_formatter->biome_console biome_formatter->biome_deserialize biome_formatter->biome_deserialize_macros biome_formatter->biome_diagnostics biome_formatter->biome_rowan biome_formatter->biome_string_case biome_html_analyze->biome_analyze biome_html_analyze->biome_console biome_html_analyze->biome_deserialize biome_html_analyze->biome_deserialize_macros biome_html_analyze->biome_diagnostics biome_html_analyze->biome_languages biome_html_analyze->biome_module_graph biome_html_analyze->biome_parser biome_html_analyze->biome_rowan biome_html_analyze->biome_string_case biome_js_analyze->biome_analyze biome_js_analyze->biome_console biome_js_analyze->biome_deserialize biome_js_analyze->biome_deserialize_macros biome_js_analyze->biome_diagnostics biome_js_analyze->biome_js_syntax biome_js_analyze->biome_languages biome_js_analyze->biome_module_graph biome_js_analyze->biome_parser biome_js_analyze->biome_rowan biome_js_analyze->biome_string_case biome_js_syntax->biome_rowan biome_js_syntax->biome_string_case biome_languages->biome_console biome_languages->biome_parser biome_languages->biome_rowan biome_languages->biome_string_case biome_module_graph->biome_console biome_module_graph->biome_diagnostics biome_module_graph->biome_formatter biome_module_graph->biome_js_syntax biome_module_graph->biome_languages biome_module_graph->biome_parser biome_module_graph->biome_rowan biome_parser->biome_console biome_parser->biome_diagnostics biome_parser->biome_rowan biome_ruledoc_utils biome_ruledoc_utils biome_ruledoc_utils->biome_analyze biome_ruledoc_utils->biome_configuration biome_ruledoc_utils->biome_console biome_ruledoc_utils->biome_css_analyze biome_ruledoc_utils->biome_deserialize biome_ruledoc_utils->biome_diagnostics biome_ruledoc_utils->biome_html_analyze biome_ruledoc_utils->biome_js_analyze biome_ruledoc_utils->biome_js_syntax biome_ruledoc_utils->biome_languages biome_ruledoc_utils->biome_module_graph biome_ruledoc_utils->biome_parser biome_ruledoc_utils->biome_rowan biome_ruledoc_utils->biome_service biome_service->biome_analyze biome_service->biome_configuration biome_service->biome_console biome_service->biome_css_analyze biome_service->biome_deserialize biome_service->biome_diagnostics biome_service->biome_formatter biome_service->biome_html_analyze biome_service->biome_js_analyze biome_service->biome_js_syntax biome_service->biome_languages biome_service->biome_module_graph biome_service->biome_parser biome_service->biome_rowan biome_service->biome_string_case biome_string_case->biome_rowan xtask_codegen xtask_codegen xtask_codegen->biome_analyze xtask_codegen->biome_cli xtask_codegen->biome_configuration xtask_codegen->biome_css_analyze xtask_codegen->biome_deserialize xtask_codegen->biome_deserialize_macros xtask_codegen->biome_diagnostics xtask_codegen->biome_html_analyze xtask_codegen->biome_js_analyze xtask_codegen->biome_js_syntax xtask_codegen->biome_languages xtask_codegen->biome_rowan xtask_codegen->biome_service xtask_codegen->biome_string_case __more__ +107 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

4661 modules, with 13256 dependencies between them. 32 loops run through 192 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 4621 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 biome_console.fmt2 biome_deserialize.merge3 biome_grit_patterns.pattern_compiler.compilation_context4 biome_text_size.size5 biome_text_size.range6 biome_configuration7 biome_parser.diagnostic8 biome_parser.marker9 biome_rowan.token_text10 biome_parser.parsed_syntax11 biome_rowan.cursor.token12 biome_service.workspace13 biome_rowan.cursor.node14 biome_formatter15 biome_parser16 biome_rowan.ast17 biome_analyze.registry18 biome_css_formatter19 biome_css_parser.parser20 biome_css_syntax.generated.nodes21 biome_graphql_formatter22 biome_graphql_syntax.generated.nodes23 biome_grit_formatter24 biome_grit_syntax.generated.nodes25 biome_html_formatter26 biome_html_syntax.generated.nodes27 biome_js_formatter28 biome_js_semantic.semantic_model.model29 biome_json_syntax.generated.nodes30 biome_markdown_formatter31 biome_markdown_syntax.generated.nodes32 biome_parser.parse_lists33 biome_yaml_syntax.generated.nodes34 biome_analyze.rule35 biome_js_syntax.generated.nodes36 biome_service.settings37 biome_analyze.context38 biome_service.file_handlers39 biome_html_analyze.lint.correctness.no_duplicate_attributes40 biome_js_analyze.lint.complexity.no_banned_types
1 biome_console.fmt
2 biome_deserialize.merge
3 biome_grit_patterns.pattern_compiler.compilation_context
4 biome_text_size.size
5 biome_text_size.range1
6 biome_configuration42
7 biome_parser.diagnostic113
8 biome_parser.marker21
9 biome_rowan.token_text12
10 biome_parser.parsed_syntax2
11 biome_rowan.cursor.token1111
12 biome_service.workspace13581331
13 biome_rowan.cursor.node3125
14 biome_formatter15113
15 biome_parser315112
16 biome_rowan.ast216
17 biome_analyze.registry121
18 biome_css_formatter1114
19 biome_css_parser.parser3
20 biome_css_syntax.generated.nodes10673285613578635
21 biome_graphql_formatter1114
22 biome_graphql_syntax.generated.nodes5994103
23 biome_grit_formatter113
24 biome_grit_syntax.generated.nodes97150145
25 biome_html_formatter1314
26 biome_html_syntax.generated.nodes29818106166167
27 biome_js_formatter1314
28 biome_js_semantic.semantic_model.model41234
29 biome_json_syntax.generated.nodes21112119
30 biome_markdown_formatter23
31 biome_markdown_syntax.generated.nodes478190
32 biome_parser.parse_lists422
33 biome_yaml_syntax.generated.nodes295961
34 biome_analyze.rule71421
35 biome_js_syntax.generated.nodes8051143574394674
36 biome_service.settings41232
37 biome_analyze.context1
38 biome_service.file_handlers7416123532
39 biome_html_analyze.lint.correctness.no_duplicate_attributes11131
40 biome_js_analyze.lint.complexity.no_banned_types21321
Uses a module listed above itPart of a loopThe module itself
1 biome_console.fmt2 biome_deserialize.merge3 biome_grit_patterns.pattern_compiler.compilation_context4 biome_text_size.size5 biome_text_size.range6 biome_configuration7 biome_parser.diagnostic8 biome_parser.marker9 biome_rowan.token_text10 biome_parser.parsed_syntax11 biome_rowan.cursor.token12 biome_service.workspace13 biome_rowan.cursor.node14 biome_formatter15 biome_parser16 biome_rowan.ast17 biome_analyze.registry18 biome_css_formatter19 biome_css_parser.parser20 biome_css_syntax.generated.nodes21 biome_graphql_formatter22 biome_graphql_syntax.generated.nodes23 biome_grit_formatter24 biome_grit_syntax.generated.nodes25 biome_html_formatter26 biome_html_syntax.generated.nodes27 biome_js_formatter28 biome_js_semantic.semantic_model.model29 biome_json_syntax.generated.nodes30 biome_markdown_formatter31 biome_markdown_syntax.generated.nodes32 biome_parser.parse_lists33 biome_yaml_syntax.generated.nodes34 biome_analyze.rule35 biome_js_syntax.generated.nodes36 biome_service.settings37 biome_analyze.context38 biome_service.file_handlers39 biome_html_analyze.lint.correctness.no_duplicate_attributes40 biome_js_analyze.lint.complexity.no_banned_typesbiome_console.fmt1biome_deserialize.merge2biome_grit_patterns.pattern_compiler.compilation_context3biome_text_size.size4biome_text_size.range5biome_configuration6biome_parser.diagnostic7biome_parser.marker8biome_rowan.token_text9biome_parser.parsed_syntax10biome_rowan.cursor.token11biome_service.workspace12biome_rowan.cursor.node13biome_formatter14biome_parser15biome_rowan.ast16biome_analyze.registry17biome_css_formatter18biome_css_parser.parser19biome_css_syntax.generated.nodes20biome_graphql_formatter21biome_graphql_syntax.generated.nodes22biome_grit_formatter23biome_grit_syntax.generated.nodes24biome_html_formatter25biome_html_syntax.generated.nodes26biome_js_formatter27biome_js_semantic.semantic_model.model28biome_json_syntax.generated.nodes29biome_markdown_formatter30biome_markdown_syntax.generated.nodes31biome_parser.parse_lists32biome_yaml_syntax.generated.nodes33biome_analyze.rule34biome_js_syntax.generated.nodes35biome_service.settings36biome_analyze.context37biome_service.file_handlers38biome_html_analyze.lint.correctness.no_duplicate_attributes39biome_js_analyze.lint.complexity.no_banned_types401421132112211111358133131251511331511221612111143106732856135786351114599410311397150145131429818106166167131441234211121192347819042229596171421805114357439467441232174161235321113121321+4621 more modules (most-connected shown)

At a glance — Code Health · 57% · Adequate · gated by D2, X4 ·

At a glance — Architecture · 89% · Strong ·

At a glance — Maturity · 68% · Adequate · gated by M2 ·

At a glance — Readiness · 64% · Adequate · gated by R4 ·

At a glance — Security · 74% · Adequate · gated by D29 ·

At a glance — Domain Modelling · 100% · Exemplary ·

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures35High / Critical
A05:2025 — Injection12High / Critical
A07:2025 — Authentication Failures3High / Critical

Roadmap

Top priorities: Interpolated log message defeats structured logging; The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`); Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Interpolated log message defeats structured logging+4.3 ptsMediumStructured logging
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json.+2.1 ptsLowADR Quality
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).+2.9 ptsMediumNullable reference types
Bring the 2 bodies over 240 down to 240 or less in Cognitive Complexity — start with biome_module_graph::db::type_inference::promise_classification::classify_expression (cognitive 491), FormatHtmlElementList::fmt_children (cognitive 246).+1.2 ptsMediumCognitive Complexity
Resolve the 2 No assertions finding(s) in Test Quality — start with in-test.js (2).+1.1 ptsLowTest Quality
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+2.1 ptsMediumArchitecture documentation
Add tests that import the unreached modules (directly or through their public entry).+2.0 ptsMediumTest Coverage
Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with in-test.js.+0.6 ptsLowTest Quality

File quality

Per-file score 0–10 — a quality signature. Of 1328 files carrying findings, judged against the Production bar: 0% slop · 53% mixed · 47% near-clean.

FileScoreBandWorst signal
REDACTED1.3SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
crates/biome_html_parser/src/lexer/mod.rs4.8MixedCyclomatic Complexity: HtmlLexer::consume_identifier (cyclomatic 42)
crates/biome_css_parser/src/lexer/mod.rs4.8MixedCyclomatic Complexity: CssLexer::consume_token_with_fallback (cyclomatic 37)
crates/biome_cli/src/commands/check.rs4.8MixedCode Duplication: Edited copy of a member (63 corresponding lines)
REDACTED5.0MixedDependency Vulnerabilities: Medium vulnerability: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
crates/biome_rowan/src/cursor/node.rs5.5MixedCognitive Complexity: PreorderMatching::next (cognitive 20)
crates/biome_analyze/src/rule.rs5.5MixedGod Classes: FileTooLong: src/rule.rs
crates/biome_markdown_parser/src/parser.rs5.6MixedGod Classes: TooManyMethods: MarkdownParser
crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs6.0MixedExplicit Debt: TodoComment
crates/biome_aria/src/roles.rs6.0MixedExplicit Debt: FixmeComment
crates/biome_html_formatter/src/utils/children.rs6.0MixedExplicit Debt: TodoComment
xtask/codegen/src/formatter.rs6.0MixedExplicit Debt: TodoComment
crates/biome_js_parser/src/lexer/mod.rs6.0MixedExplicit Debt: FixmeComment
crates/biome_js_parser/src/syntax/stmt.rs6.0MixedExplicit Debt: TodoComment

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 34

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 4426

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 471

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 14

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 64 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 64 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D19D20D21D24D26D28D29D30D31D34D35D36D43D44AX10AX3AX4AX8AX9DM4DM5ES1ES2M1M2M3M4P1P10P2P3P4P6PF1PF3R1R10R2R3R4R6R7R8R9X1X21X28X29X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 4858 of 4931 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1d91f-8f71-7c3e-bf4a-c0f557653c1f.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 42 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 372 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for packages/@biomejs/backend-jsonrpc/ failed in the analyzer sandbox (ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in packages/@biomejs/backend-jsonrpc/ was NOT MEASURED: the dependency install for packages/@biomejs/backend-jsonrpc/ failed in the analyzer sandbox (ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in packages/@biomejs/js-api/ was NOT MEASURED: the dependency install for packages/@biomejs/js-api/ failed in the analyzer sandbox (ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A hotspot's complexity is meant to be the worst body its churn actually touched. For crates/biome_js_control_flow/src/visitor.rs that could not be established — the complexity reader for the file reports no body extents, or the history carries no per-line attribution — so the row quotes the file's worst body, which the counted changes may never have touched. The churn count is unaffected.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `crates/biome_module_graph/benches/astro_server.mjs`, `packages/@biomejs/js-api/src/bundler.ts`, `packages/@biomejs/js-api/src/index.ts`, `packages/@biomejs/js-api/src/nodejs.ts`, `packages/@biomejs/js-api/src/web.ts`, … (+1 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (the repository): package.json has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P12 CI test-gate honesty — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. CI test-gate honesty could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository. Engine failure: InvalidOperationException: The requested operation requires an element of type 'Object', but the target element has type 'Array'.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The filesystem refused the listing or the read of: fuzz/corpus/rome_parse_all, fuzz/corpus/rome_parse_d_ts, fuzz/corpus/rome_parse_json, fuzz/corpus/rome_parse_jsx, fuzz/corpus/rome_parse_module, fuzz/corpus/rome_parse_script, fuzz/corpus/rome_parse_tsx, fuzz/corpus/rome_parse_typescript. Every other path was read.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 67 further occurrence(s) are not listed individually; the score already reflects all 107.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 59 further occurrence(s) are not listed individually; the score already reflects all 99.

Repo exclusion declarations: 121 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.4 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.4 / 10 · rule-coverage 100% · ceiling Prevented

435 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was biome_module_graph::db::type_inference::promise_classification::classify_expression at 183. A further 88 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being CssLexer::consume_identifier_with_slash at 242 — they are counted neither in the figure above nor in this dimension's score. 37 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/biome_tailwind_parser/src/lexer/mod.rs (biome_tailwind_parser::lexer::css_identifier_kind at 67), crates/biome_analyze/src/rule.rs (RuleSource::fmt at 63), crates/biome_css_parser/src/syntax/at_rule/mod.rs (biome_css_parser::syntax::at_rule::parse_any_at_rule at 56), crates/biome_js_formatter/src/utils/format_node_without_comments.rs (FormatAnyJsExpressionWithoutComments::fmt at 43), crates/biome_graphql_parser/src/lexer/mod.rs (GraphqlLexer::consume_name at 42), and 32 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

biome_js_analyze::lint::suspicious::no_useless_regex_backrefs::run (cyclomatic 49) · ×58crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:298
biome_markdown_parser::syntax::parse_any_block_with_indent_code_policy (cyclomatic 56) · ×26crates/biome_markdown_parser/src/syntax/mod.rs:331
biome_js_parser::syntax::stmt::parse_statement (cyclomatic 50) · ×12crates/biome_js_parser/src/syntax/stmt.rs:158
InferredType::is_promise_instance_with (cyclomatic 46) · ×11crates/biome_js_type_info/src/inferred_type.rs:431
HtmlLexer::consume_identifier (cyclomatic 42) · ×9crates/biome_html_parser/src/lexer/mod.rs:1119

+ 199 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with biome_module_graph::db::type_inference::promise_classification::classify_expression (cyclomatic 183), FormatHtmlElementList::fmt_children (cyclomatic 127). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 5.4 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity3.0 / 10Weak✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 3.0 / 10 · rule-coverage 100% · ceiling Prevented

877 method(s) exceeded the cognitive complexity threshold of 15; the worst was biome_module_graph::db::type_inference::promise_classification::classify_expression at 491.

biome_js_analyze::lint::suspicious::no_useless_regex_backrefs::run (cognitive 134) · ×115crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:298
biome_markdown_parser::syntax::parse_any_block_with_indent_code_policy (cognitive 105) · ×54crates/biome_markdown_parser/src/syntax/mod.rs:331
biome_module_graph::db::type_inference::promise_classification::classify_expression (cognitive 491) · ×21crates/biome_module_graph/src/db/type_inference/promise_classification.rs:177
biome_service::file_handlers::html::parse_embedded_nodes::parse_embedded_nodes (cognitive 156) · ×20crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:29
biome_js_parser::syntax::expr::parse_binary_or_logical_expression (cognitive 64) · ×19crates/biome_js_parser/src/syntax/expr.rs:531

+ 388 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 240 down to 240 or less in Cognitive Complexity — start with biome_module_graph::db::type_inference::promise_classification::classify_expression (cognitive 491), FormatHtmlElementList::fmt_children (cognitive 246). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 3.0 to about 4.0/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.6 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Prevented

342 god class(es) detected.

FileTooLong: workspace/server.rs · ×140crates/biome_service/src/workspace/server.rs
MethodTooLong: OverridePattern.apply_to_configuration · ×82crates/biome_configuration/src/overrides.rs:112
FunctionTooLong: biome_module_graph::db::type_inference::promise_classification::classify_expression · ×60crates/biome_module_graph/src/db/type_inference/promise_classification.rs:177
TooManyMethods: ResolutionCtx · ×26crates/biome_module_graph/src/db/type_inference/resolver.rs:223
ClassTooLong: Collector · ×26crates/biome_vue_semantic/src/semantic_model/component.rs:114

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 140 FileTooLong finding(s) in God Classes — start with mod.rs (19), lib.rs (6), server.rs (2). — One of this dimension's main actionable groups (140 warning-level).
  2. Resolve the 82 MethodTooLong finding(s) in God Classes — start with mod.rs (4), expressions.rs (4), local_inference.rs (3). — One of this dimension's main actionable groups (82 warning-level).
  3. Resolve the 60 FunctionTooLong finding(s) in God Classes — start with mod.rs (4), references.rs (4), parse_embedded_nodes.rs (3). — One of this dimension's main actionable groups (60 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication6.6 / 10Adequate✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.6 / 10 · rule-coverage 100% · ceiling Verified

1359 duplicated block group(s) detected. 8.5 % of the production lines (65,387 of 769,268) are in a reported copy. A further 893 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 19 of the 2252 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (7 lines × 2) · ×77crates/biome_cli/src/execute/migrate.rs:306
Duplicated block (12 lines × 2) · ×68crates/biome_cli/src/execute/migrate/eslint_eslint.rs:522
Duplicated block (8 lines × 2) · ×68crates/biome_configuration/src/overrides.rs:392
Duplicated block (11 lines × 2) · ×66crates/biome_configuration/src/overrides.rs:297
Duplicated block (9 lines × 2) · ×65crates/biome_cli/src/execute/migrate/eslint_eslint.rs:388

+ 424 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 77 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with mod.rs (4), node.rs (4), lib.rs (3). — One of this dimension's main actionable groups (77 warning-level).
  2. Resolve the 68 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with mod.rs (8), list.rs (3), svelte.rs (2). — One of this dimension's main actionable groups (68 warning-level).
  3. Resolve the 68 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with use_react_function_component_definition.rs (2), no_useless_regex_backrefs.rs (2), format_inferred_type_info.rs (2). — One of this dimension's main actionable groups (68 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling7.3 / 10Strong✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 7.3 / 10 · rule-coverage 100% · ceiling Prevented

127 production modules (Cargo+npm), 0 dependency cycle(s), 21 unstable depended-on module(s). Read from the build's own module declarations; 17 module(s) off the main sequence, with abstractness counted on 94 of the 127 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: biome_diagnostics_categories · ×17
Unstable project @biomejs/biome
Unstable project biome_cli
Unstable project biome_configuration_macros
Unstable project biome_css_formatter

+ 17 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 17 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (17 warning-level).
  2. Resolve the 1 Unstable project @biomejs/biome finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project biome_cli finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 15 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

15 of 906 classes have LCOM4 above 3.

Low cohesion: RuleMetadata (LCOM4 10) · ×15crates/biome_analyze/src/rule.rs:28

What to do

  1. Resolve the 15 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs (4), rule.rs (2), visitors.rs (2). — One of this dimension's main actionable groups (15 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality9.3 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 2 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 42 tests. Measured on the JavaScript/TypeScript suite only — at least 372 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: wait · ×2crates/biome_js_analyze/tests/specs/suspicious/noPlaywrightWaitForTimeout/invalid/in-test.js:2
Test project verifies nothing: the repository rootcrates/biome_js_analyze/tests/specs/suspicious/noPlaywrightWaitForTimeout/invalid/in-test.js:2

What to do

  1. Resolve the 2 No assertions finding(s) in Test Quality — start with in-test.js (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with in-test.js. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene9.1 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Verified

19 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: backtrace · ×19

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 547 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 12 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under MIT OR Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 113 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: crates/biome_cli/src/execute/migrate/eslint_to_biome.rs (21×118=2478); crates/biome_module_graph/src/db/type_inference/promise_classification.rs (11×183=2013); crates/biome_cli/src/execute/migrate/eslint_eslint.rs (15×71=1065) Repeated repair below the complexity floor: crates/biome_js_parser/src/syntax/program.rs (8 of 8 changes were fixes); crates/biome_languages/src/javascript.rs (6 of 9 changes were fixes); crates/biome_embeds/src/references.rs (5 of 8 changes were fixes)

Hotspot: crates/biome_cli/src/execute/migrate/eslint_to_biome.rs · ×81crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:767
Repeated repair: crates/biome_js_parser/src/syntax/program.rs · ×32crates/biome_js_parser/src/syntax/program.rs:37

What to do

  1. Resolve the 81 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (9), events.rs (2), visitor.rs (2). — One of this dimension's main actionable groups (81 warning-level).
  2. Resolve the 32 Repeated repair finding(s) in Churn × Complexity Hotspots — start with mod.rs (5), lib.rs (2), program.rs. — One of this dimension's main actionable groups (32 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

140 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/biome_service/src/db/state.rs. Counted over 2103 of the 4474 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt9.9 / 10Stronggated by 241 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

241 deducted task-comment markers across 769268 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×176xtask/rules_check/src/lib.rs:119
FixmeComment · ×51crates/biome_wasm/build.rs:18
HackComment · ×8xtask/codegen/src/language_kind.rs:98
XxxComment · ×6crates/biome_rowan/src/green/node.rs:260

What to do

  1. Resolve the 176 TodoComment finding(s) in Explicit Debt — start with lib.rs (12), local_inference.rs (12), watcher.rs (9). — One of this dimension's main actionable groups (176 warning-level).
  2. Resolve the 51 FixmeComment finding(s) in Explicit Debt — start with new-expression.ts (19), roles.rs (6), call-expression.ts (3). — One of this dimension's main actionable groups (51 warning-level).
  3. Resolve the 8 HackComment finding(s) in Explicit Debt — start with range.rs (3), language_kind.rs, sort_v4_variants.rs. — One of this dimension's main actionable groups (8 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 2 documentation facets pass in full. 109 document(s) read across 22 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundpackages/prettier-compare/package.json:7

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency7.8 / 10Strong✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 100% · ceiling Verified

3 naming inconsistencies among 136 declarations measured against a convention their peers follow.

`intervalID` spells `ID` where 102 names in the project spell it `Id` · ×2crates/biome_js_formatter/tests/specs/prettier/typescript/as/assignment.ts:28
`ImgHTMLAttributes` spells `HTML` where 31 names in the project spell it `Html`crates/biome_js_analyze/tests/specs/correctness/noUnusedImports/issue_4888.ts:10

What to do

  1. Resolve the 2 `intervalID` spells `ID` where 102 names in the project spell it `Id` finding(s) in Naming Consistency — start with assignment.ts (2). — One of this dimension's main actionable groups (2 recommendation-level).
  2. Resolve the 1 `ImgHTMLAttributes` spells `HTML` where 31 names in the project spell it… finding(s) in Naming Consistency — start with issue_4888.ts. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D24 · Comment Value9.5 8.8 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 8.8 / 10 · rule-coverage 92% · ceiling Documented

20 of 3981 judged comments only repeat the code they sit on (0.5 %). 553 comment(s) in another language or script were not judged.

redundant comment · ×20crates/biome_js_analyze/tests/specs/correctness/useQwikClasslist/invalid.jsx:26
doc comments repeat the names · ×4packages/@biomejs/biome/scripts/generate-packages.mjs:109

What to do

  1. Resolve the 20 redundant comment finding(s) in Comment Value — start with invalid.js (5), new-ternary-spec.js (3), valid.js (2). — One of this dimension's main actionable groups (20 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion7.4 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 7.4 / 10 · rule-coverage 100% · ceiling Documented

15 of 115 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)1.2 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 1.2 / 10 · rule-coverage 100% · ceiling Documented

12 finding(s): 0 critical, 12 high, 0 medium, 0 low. semgrep hit a parse error in 43 file(s) — `crates/biome_analyze/src/options.rs` (line 224, line 235), `crates/biome_cli/src/reporter/sarif.rs` (line 77, line 90, line 104, …), `crates/biome_configuration/src/overrides.rs` (line 119, lines 119–136, lines 137–138, …), `crates/biome_css_parser/src/lexer/scan_cursor.rs` (line 974), `crates/biome_formatter/src/lib.rs` (line 2543, line 2545, line 2547, …), … (+38 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 8 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 3 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities2.6 / 10Weak✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 2.6 / 10 · rule-coverage 100% · ceiling Documented

17 finding(s): 1 critical, 8 high, 6 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 8 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 issue-level).
  2. Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

trivy and checkov found no infrastructure-as-code or container misconfigurations.

✓ On the Gold path — maintain.

Detailed fixes: d31_recommendation.md.

D34 · Knowledge Freshness8.6 / 10Adequategated by 10 critical findings✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Documented

301 of 2103 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/biome_js_parser/src/syntax/module.rs. Counted over 2103 of the 4474 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×10crates/biome_js_parser/src/syntax/module.rs:1
Orphaned file · ×291crates/biome_package/src/node_js_package/turbo_json.rs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 10 Orphaned knowledge finding(s) in Knowledge Freshness — start with module.rs, arrow_function_expression.rs, child_list.rs. — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 291 Orphaned file finding(s) in Knowledge Freshness — start with lib.rs (6), tests.rs (3), token_source.rs (3). — One of this dimension's main actionable groups (291 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling10.0 / 10Stronggated by 13 serious findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: mod.rs↔mod.rs 81%; client.rs↔server.rs 75%; tests.rs↔mod.rs 75%

Change coupling: mod.rs ↔ mod.rs · ×13crates/biome_css_parser/src/lexer/mod.rs:1

What to do

  1. Resolve the 13 Change coupling finding(s) in Change Coupling — start with mod.rs (5), check.rs (2), client.rs. — One of this dimension's main actionable groups (13 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

3/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 6 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX8 · Test isolation7.5 / 10Strong✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

  • `biome_ruledoc_utils` (production) references the test project `biome_test_utils`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.

What to do

  • Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

M1 · Documentation (README)8.1 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

  • 1 public type in `biome_deserialize.impls` is marked as implementation by its own namespace, folder or name: `TextNumber` (crates/biome_deserialize/src/impls.rs:45, `impls`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/biome_deserialize/src/impls.rs:45

What to do

  • Hide `biome_deserialize.impls` (`TextNumber`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability6.8 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 7/12 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/biome_wasm`, `packages/@biomejs/biome`, `packages/prettier-compare`, `xtask/codegen`, `xtask/rules_check`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling6.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — package.json:22

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

PF1 · Benchmark discipline10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication7.7 / 10Strong✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • packages/@biomejs/biome/scripts/generate-packages.mjs:6 · scripts/update-manifests.mjs:6 — the two spans are one implementation copied and then locally edited — 263 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/@biomejs/biome/scripts/generate-packages.mjs:6
  • packages/aria-data/generate-aria-data.js:81 · packages/aria-data/generate-aria-data.js:113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/aria-data/generate-aria-data.js:81
  • packages/@biomejs/biome/scripts/update-beta-version.mjs:5 · packages/@biomejs/js-api/scripts/update-beta-version.mjs:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/@biomejs/biome/scripts/update-beta-version.mjs:5
  • packages/@biomejs/biome/scripts/update-preview-version.mjs:5 · packages/@biomejs/js-api/scripts/update-preview-version.mjs:5 — the two spans are one implementation copied and then locally edited — 108 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/@biomejs/biome/scripts/update-preview-version.mjs:5
  • packages/@biomejs/biome/scripts/generate-packages.mjs:135 · scripts/update-manifests.mjs:19 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/@biomejs/biome/scripts/generate-packages.mjs:135
  • packages/aria-data/generate-aria-data.js:8 · packages/aria-data/generate-aria-data.js:80 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/aria-data/generate-aria-data.js:8
  • packages/aria-data/generate-aria-data.js:182 · packages/aria-data/generate-aria-data.js:304 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/aria-data/generate-aria-data.js:182
  • packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:224 · packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:278 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:224

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity7.9 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • App has cyclomatic complexity 22 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/prettier-compare/src/components/App.tsx:37
  • parseAriaSpec has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/aria-data/generate-aria-data.js:6
  • main has cyclomatic complexity 17 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/update-crates-versions.ts:340
  • traverseDir has cyclomatic complexity 15 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/biome_formatter_test/src/prettier/prepare_tests.js:29
  • extractFunctionalBranches has cyclomatic complexity 14 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:319
  • run has cyclomatic complexity 14 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/prettier-compare/src/index.tsx:128
  • DiffView has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/prettier-compare/src/components/DiffView.tsx:24
  • validateRepository has cyclomatic complexity 12 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/update-crates-versions.ts:190
  • addKeywordBranches has cyclomatic complexity 12 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:403
  • parseConcept has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/aria-data/generate-aria-data.js:224
  • printComparison has cyclomatic complexity 11 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/prettier-compare/src/plainOutput.ts:34
  • (top-level) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/@biomejs/runtime/type-tests/traversal.test.ts:1
R3 · Large Files8.4 / 10Strong✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts has 503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:1
  • packages/@biomejs/js-api/src/common.ts has 473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/@biomejs/js-api/src/common.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage2.6 / 10Weak✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/sub2/default_package_nested.js:10 imports './sub', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/sub2/default_package_nested.js:10
  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×29) — packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:1, packages/aria-data/generate-aria-data.js:1, packages/prettier-compare/src/watch.ts:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • This repository declares test tooling, and the ✓ above records that declaration — but crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/sub2/default_package_nested.js cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/sub2/default_package_nested.js:10
R7 · Dead Code8.9 / 10Strong✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 3 file(s) (~199 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/@biomejs/biome
  • 1 file(s) (~359 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/aria-data
  • Unreachable from the 24 application, 13 tooling and 59 test entry point(s) detected in this repo. Gate removals on `pnpm run tsc` — an undetected custom entry would make these reachable.
  • no import path from any entry point (24 application, 13 tooling, 59 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×3) — scripts/update-manifests.mjs, packages/tailwindcss-config-analyzer/src/v4/parse-theme-color.ts, packages/@biomejs/js-api/scripts/update-preview-version.mjs
  • Nothing imports this binding — it is safe to review for removal. (×3) — packages/tailwindcss-config-analyzer/src/v4/css-helpers.ts:21, packages/tailwindcss-config-analyzer/src/v4/theme-namespaces.ts:45, packages/tailwindcss-config-analyzer/src/v4/theme-namespaces.ts:49

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging2.3 / 10Critical✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `debug!` at line 245 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/workspace.rs:245
  • `info!` at line 163 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:163
  • `error!` at line 218 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:218
  • `warn!` at line 223 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:223
  • `warn!` at line 309 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:309
  • `warn!` at line 448 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:448
  • `warn!` at line 467 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:467
  • `warn!` at line 473 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:473
  • `warn!` at line 485 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:485
  • `warn!` at line 495 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/scanner/watcher.rs:495
  • `debug!` at line 1535 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/javascript.rs:1535
  • `debug!` at line 1745 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/javascript.rs:1745
  • `error!` at line 1751 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/javascript.rs:1751
  • `debug!` at line 1770 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/javascript.rs:1770
  • `debug!` at line 1789 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/javascript.rs:1789
  • `debug!` at line 536 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/md.rs:536
  • `error!` at line 542 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/md.rs:542
  • `debug!` at line 162 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/svelte.rs:162
  • `error!` at line 203 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/svelte.rs:203
  • `debug!` at line 158 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/vue.rs:158
  • `error!` at line 194 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/vue.rs:194
  • `debug!` at line 446 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/yaml.rs:446
  • `error!` at line 452 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/file_handlers/yaml.rs:452
  • `debug!` at line 1224 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/db/mod.rs:1224
  • `debug!` at line 1286 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_service/src/db/mod.rs:1286
  • `debug!` at line 64 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/extension_settings.rs:64
  • `warn!` at line 119 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/server.rs:119
  • `warn!` at line 123 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/server.rs:123
  • `debug!` at line 218 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/server.rs:218
  • `error!` at line 514 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/server.rs:514
  • `error!` at line 365 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:365
  • `error!` at line 390 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:390
  • `error!` at line 465 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:465
  • `error!` at line 492 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:492
  • `error!` at line 624 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:624
  • `error!` at line 791 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:791
  • `error!` at line 837 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:837
  • `info!` at line 853 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:853
  • `info!` at line 867 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:867
  • `info!` at line 881 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/biome_lsp/src/session.rs:881

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types4.8 / 10Weak✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 6/17 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health57%Adequate — gated by D2, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture89%StrongSolid.
Maturity68%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness64%Adequate — gated by R4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security74%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Event Sourcing100%ExemplarySolid.
Performance100%ExemplarySolid.
Unscored — 4 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • SC1 Supply-chain hygiene — 20 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 32 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 67 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — AX6 reached only 3% of this repository's production lines — rust (756,692 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (the repository): package.json has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust, TypeScript surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 6 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — packages/@biomejs/backend-jsonrpc/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
  • DM1 Aggregate boundaries — this Rust crate declares no domain aggregate (a struct with private state and its own command methods), so DM1's aggregate-boundary read has no population to be taken over
  • DM2 Strongly-typed ids — the crate defines newtype typed-ids but declares no domain aggregate that could carry an id — so DM2's adoption ratio has no population to be taken over
  • DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM6 Domain ↔ infrastructure boundary — this Rust crate maps no type to a persistence framework (diesel/sea-orm/sqlx), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — Not assessed, and this one is on us: 1 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — CI test-gate honesty could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Rust source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • S1 Web-Security Posture — No web surface: 4405 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
  • X12 Unreachable branch — X12 reached only 3% of this repository's production lines — rust (756,692 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — X13 reached only 3% of this repository's production lines — rust (756,692 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 3% of this repository's production lines — rust (756,692 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Rust was read, and no request in it can be cancelled by a caller — a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — X3 reached only 3% of this repository's production lines — rust (756,692 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 34 finding(s)
D34 · Knowledge Freshness · Orphaned knowledge · ×10
  • Orphaned knowledge crates/biome_js_parser/src/syntax/module.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/biome_js_formatter/src/jsx/lists/child_list.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge crates/biome_rowan/src/syntax/trivia.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge crates/biome_js_syntax/src/export_ext.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/biome_formatter/src/comments/map.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/biome_graphql_parser/src/lexer/mod.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge crates/biome_js_parser/src/state.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge crates/biome_js_syntax/src/binding_ext.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D30 · Dependency Vulnerabilities · High CVE · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AX8 · Test isolation · Production project references a test project · ×1
  • Production project references a test project: biome_ruledoc_utils → biome_test_utils — `biome_ruledoc_utils` (production) references the test project `biome_test_utils`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×1
  • REDACTED
Serious — 4426 finding(s)
D17 · Explicit Debt · TodoComment · ×176
  • TodoComment xtask/rules_check/src/lib.rs:119 — // TODO: remove these exceptions in Biome 3.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/rules_check/src/lib.rs:151 — // TODO: remove these exceptions in Biome 3.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/rules_check/src/lib.rs:162 — // TODO: remove these exceptions in Biome 3.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/codegen/src/ast.rs:207 — // TODO: This is CSS-specific and would be better handled with a per-language — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/codegen/src/ast.rs:339 — // TODO: This is CSS-specific and would be better handled with a per-language — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_syntax_codegen/src/ast.rs:169 — // TODO: This is CSS-specific and would be better handled with a per-language — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_syntax_codegen/src/ast.rs:301 — // TODO: This is CSS-specific and would be better handled with a per-language — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/codegen/src/formatter.rs:366 — // TODO: This is CSS-specific and would be nice to handle in a — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/codegen/src/formatter.rs:870 — // TODO: implement formatter — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/codegen/src/generate_nodes.rs:277 — // TODO: review documentation — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_syntax_codegen/src/generate_nodes.rs:245 — // TODO: review documentation — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/codegen/src/generate_nodes_mut.rs:48 — // TODO: Implement range checking for the slot index to ensure other — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_syntax_codegen/src/generate_nodes_mut.rs:51 — // TODO: Implement range checking for the slot index to ensure other — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment xtask/codegen/src/generate_target_language_constants.rs:24 — // TODO: We might want to move this to `js_kinds_src.rs` when we — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/@biomejs/backend-jsonrpc/src/transport.ts:261 — // TODO: Not implemented at the moment — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/@biomejs/backend-jsonrpc/src/transport.ts:266 — // TODO: Not implemented at the moment — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment fuzz/fuzz_targets/rome_common.rs:65 — // TODO: replace with OnceLock when upgrading to 1.70 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_yaml_parser/src/lexer/mod.rs:632 — // TODO: parse multiline plain scalar at current indentation level — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4.rs:99 — // TODO: equality compares text chunk-wise and cannot short-circuit on — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_string_case/src/lib.rs:866 — // TODO: Once trait-alias are stabilized it would be enough to `use` this trait instead of individual ones. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_service/src/settings.rs:128 — // TODO: remove once HTML full support is stable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_service/src/settings.rs:132 — // TODO: remove once embedded snippets support is stable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_service/src/settings.rs:136 — // TODO: remove once pnpm workspace catalogs support is stable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_service/src/settings.rs:233 — // TODO handle error — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/biome_service/src/settings.rs:2466 — // TODO: Find a way to cache this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 151 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×140
  • FileTooLong: workspace/server.rs crates/biome_service/src/workspace/server.rs — FileTooLong — 3362 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2862 over it, 6.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/local_inference.rs crates/biome_js_type_info/src/local_inference.rs — FileTooLong — 2771 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2271 over it, 5.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: type_inference/expressions.rs crates/biome_module_graph/src/db/type_inference/expressions.rs — FileTooLong — 2560 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 97% of them inside a single declaration: ResolutionCtx (2 blocks, 73-3274). The bar is 500 significant lines; this is 2060 over it, 5.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/interned_types.rs crates/biome_js_type_info/src/interned_types.rs — FileTooLong — 2233 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1733 over it, 4.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: syntax/list.rs crates/biome_markdown_parser/src/syntax/list.rs — FileTooLong — 2117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 90 free functions. The bar is 500 significant lines; this is 1617 over it, 4.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: file_handlers/mod.rs crates/biome_service/src/file_handlers/mod.rs — FileTooLong — 1852 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1352 over it, 3.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/settings.rs crates/biome_service/src/settings.rs — FileTooLong — 1819 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1319 over it, 3.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: semantic_model/component.rs crates/biome_vue_semantic/src/semantic_model/component.rs — FileTooLong — 1805 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 83% of them inside a single declaration: Collector (2 blocks, 114-2266). The bar is 500 significant lines; this is 1305 over it, 3.61× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: file_handlers/javascript.rs crates/biome_service/src/file_handlers/javascript.rs — FileTooLong — 1582 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 1082 over it, 3.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/type_relation.rs crates/biome_js_type_info/src/type_relation.rs — FileTooLong — 1480 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 69% of them inside a single declaration: AssignabilityCheck (2 blocks, 551-2185). The bar is 500 significant lines; this is 980 over it, 2.96× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: calls/implementation.rs crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs — FileTooLong — 1479 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 37 free functions. The bar is 500 significant lines; this is 979 over it, 2.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lexer/mod.rs crates/biome_js_parser/src/lexer/mod.rs — FileTooLong — 1406 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 906 over it, 2.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: syntax/mod.rs crates/biome_markdown_parser/src/syntax/mod.rs — FileTooLong — 1392 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 83 free functions. The bar is 500 significant lines; this is 892 over it, 2.78× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lexer/mod.rs crates/biome_html_parser/src/lexer/mod.rs — FileTooLong — 1366 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: HtmlLexer (3 blocks, 15-2208). The bar is 500 significant lines; this is 866 over it, 2.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: lexer/mod.rs crates/biome_yaml_parser/src/lexer/mod.rs — FileTooLong — 1359 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 88% of them inside a single declaration: YamlLexer (5 blocks, 14-1855). The bar is 500 significant lines; this is 859 over it, 2.72× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/to_html.rs crates/biome_markdown_parser/src/to_html.rs — FileTooLong — 1352 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 53 free functions. The bar is 500 significant lines; this is 852 over it, 2.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lib.rs crates/biome_formatter/src/lib.rs — FileTooLong — 1326 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 826 over it, 2.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/workspace.rs crates/biome_service/src/workspace.rs — FileTooLong — 1307 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 807 over it, 2.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: syntax/class.rs crates/biome_js_parser/src/syntax/class.rs — FileTooLong — 1286 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 39 free functions. The bar is 500 significant lines; this is 786 over it, 2.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: semantic_model/model.rs crates/biome_vue_semantic/src/semantic_model/model.rs — FileTooLong — 1281 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 781 over it, 2.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/visitor.rs crates/biome_embeds/src/visitor.rs — FileTooLong — 1280 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: EmbeddedBindingsBuilder (2 blocks, 442-1644). The bar is 500 significant lines; this is 780 over it, 2.56× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/configuration.rs crates/biome_service/src/configuration.rs — FileTooLong — 1277 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 777 over it, 2.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: file_handlers/html.rs crates/biome_service/src/file_handlers/html.rs — FileTooLong — 1273 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 773 over it, 2.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/inferred_type.rs crates/biome_js_type_info/src/inferred_type.rs — FileTooLong — 1264 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: InferredType (2 blocks, 76-1783). The bar is 500 significant lines; this is 764 over it, 2.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: lexer/mod.rs crates/biome_css_parser/src/lexer/mod.rs — FileTooLong — 1219 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 719 over it, 2.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 115 more in this group — see findings.md.
D2 · Cognitive Complexity · biome_js_analyze · ×115
  • biome_js_analyze::lint::suspicious::no_useless_regex_backrefs::run (cognitive 134) crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:298 — biome_js_analyze::lint::suspicious::no_useless_regex_backrefs::run has cognitive complexity 134 (threshold 15). Drivers by points: if/else 18 (77 pts), loops 8 (31 pts), match/switch 6 (22 pts), boolean chains 4 (nesting depth added 98). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::correctness::no_unused_private_class_members::traverse_members_usage (cognitive 76) crates/biome_js_analyze/src/lint/correctness/no_unused_private_class_members.rs:274 — biome_js_analyze::lint::correctness::no_unused_private_class_members::traverse_members_usage has cognitive complexity 76 (threshold 15). Drivers by points: if/else 12 (45 pts), loops 6 (18 pts), match/switch 2 (7 pts), boolean chains 6 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::style::use_unicode_regex::is_valid_unicode_pattern (cognitive 71) crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:391 — biome_js_analyze::lint::style::use_unicode_regex::is_valid_unicode_pattern has cognitive complexity 71 (threshold 15). Drivers by points: if/else 12 (35 pts), match/switch 5 (17 pts), loops 4 (11 pts), boolean chains 8 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::ast_utils::is_constant_condition (cognitive 65) crates/biome_js_analyze/src/ast_utils.rs:197 — biome_js_analyze::ast_utils::is_constant_condition has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (44 pts), match/switch 5 (12 pts), boolean chains 9 (nesting depth added 30). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_analyze::lint::nursery::use_consistent_boolean_name::expressions_state (cognitive 63) crates/biome_js_analyze/src/lint/nursery/use_consistent_boolean_name.rs:881 — biome_js_analyze::lint::nursery::use_consistent_boolean_name::expressions_state has cognitive complexity 63 (threshold 15). Drivers by points: if/else 17 (44 pts), match/switch 7 (18 pts), loops 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::correctness::no_unreachable::analyze_simple (cognitive 54) crates/biome_js_analyze/src/lint/correctness/no_unreachable.rs:279 — biome_js_analyze::lint::correctness::no_unreachable::analyze_simple has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 4 (6 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::nursery::no_unmodified_loop_condition::condition_references (cognitive 51) crates/biome_js_analyze/src/lint/nursery/no_unmodified_loop_condition.rs:251 — biome_js_analyze::lint::nursery::no_unmodified_loop_condition::condition_references has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (48 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::suspicious::no_then_property::process_js_call_expr (cognitive 51) crates/biome_js_analyze/src/lint/suspicious/no_then_property.rs:303 — biome_js_analyze::lint::suspicious::no_then_property::process_js_call_expr has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (40 pts), boolean chains 5, loops 1 (5 pts), match/switch 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_js_analyze::lint::style::use_consistent_type_definitions::convert_type_alias_to_interface (cognitive 50) crates/biome_js_analyze/src/lint/style/use_consistent_type_definitions.rs:225 — biome_js_analyze::lint::style::use_consistent_type_definitions::convert_type_alias_to_interface has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (42 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_js_analyze::lint::nursery::use_explicit_return_type::collect_return_statements (cognitive 46) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:544 — biome_js_analyze::lint::nursery::use_explicit_return_type::collect_return_statements has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 2 (6 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::suspicious::no_unnecessary_conditions::check_condition_necessity (cognitive 44) crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:406 — biome_js_analyze::lint::suspicious::no_unnecessary_conditions::check_condition_necessity has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (37 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::suspicious::use_iterable_callback_return::get_function_returns_info (cognitive 44) crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:352 — biome_js_analyze::lint::suspicious::use_iterable_callback_return::get_function_returns_info has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (31 pts), match/switch 2 (7 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::style::use_global_this::check_expression (cognitive 41) crates/biome_js_analyze/src/lint/style/use_global_this.rs:100 — biome_js_analyze::lint::style::use_global_this::check_expression has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 10, match/switch 2 (3 pts) (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_analyze::lint::nursery::use_valid_character_comparison::is_longer_than_one_code_unit (cognitive 39) crates/biome_js_analyze/src/lint/nursery/use_valid_character_comparison.rs:313 — biome_js_analyze::lint::nursery::use_valid_character_comparison::is_longer_than_one_code_unit has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (25 pts), match/switch 3 (9 pts), loops 2 (5 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::suspicious::no_fallthrough_switch_clause::register_fallthrough_switch_clauses (cognitive 39) crates/biome_js_analyze/src/lint/suspicious/no_fallthrough_switch_clause.rs:232 — biome_js_analyze::lint::suspicious::no_fallthrough_switch_clause::register_fallthrough_switch_clauses has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (29 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::suspicious::no_redeclare::check_redeclarations_in_single_scope (cognitive 39) crates/biome_js_analyze/src/lint/suspicious/no_redeclare.rs:136 — biome_js_analyze::lint::suspicious::no_redeclare::check_redeclarations_in_single_scope has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (31 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_js_analyze::lint::complexity::no_playwright_useless_await::is_sync_expect_call (cognitive 38) crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:194 — biome_js_analyze::lint::complexity::no_playwright_useless_await::is_sync_expect_call has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::suspicious::no_misleading_character_class::diagnostic_regex_class (cognitive 38) crates/biome_js_analyze/src/lint/suspicious/no_misleading_character_class.rs:221 — biome_js_analyze::lint::suspicious::no_misleading_character_class::diagnostic_regex_class has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::nursery::use_svelte_reactive_classes::is_exported_value (cognitive 37) crates/biome_js_analyze/src/lint/nursery/use_svelte_reactive_classes.rs:511 — biome_js_analyze::lint::nursery::use_svelte_reactive_classes::is_exported_value has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (29 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::suspicious::no_parameters_only_used_in_recursion::traces_to_parameter (cognitive 37) crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:502 — biome_js_analyze::lint::suspicious::no_parameters_only_used_in_recursion::traces_to_parameter has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::correctness::use_exhaustive_dependencies::is_stable_binding (cognitive 36) crates/biome_js_analyze/src/lint/correctness/use_exhaustive_dependencies.rs:1098 — biome_js_analyze::lint::correctness::use_exhaustive_dependencies::is_stable_binding has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 3 (6 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::nursery::no_tanstack_query_void_query_fn::body_gives_undefined (cognitive 36) crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:322 — biome_js_analyze::lint::nursery::no_tanstack_query_void_query_fn::body_gives_undefined has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (22 pts), match/switch 2 (7 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::style::use_export_type::export_named_fix (cognitive 36) crates/biome_js_analyze/src/lint/style/use_export_type.rs:519 — biome_js_analyze::lint::style::use_export_type::export_named_fix has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::nursery::no_unsafe_return::expected_type_at (cognitive 35) crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:371 — biome_js_analyze::lint::nursery::no_unsafe_return::expected_type_at has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (27 pts), match/switch 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_analyze::lint::style::use_template::template_expression_from_binary_expression (cognitive 35) crates/biome_js_analyze/src/lint/style/use_template.rs:176 — biome_js_analyze::lint::style::use_template::template_expression_from_binary_expression has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (9 pts), match/switch 3 (8 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 90 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×82
  • MethodTooLong: OverridePattern.apply_to_configuration crates/biome_configuration/src/overrides.rs:112 — MethodTooLong — apply_to_configuration runs 435 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 335 over it, 4.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HtmlRenderer.enter crates/biome_markdown_parser/src/to_html.rs:655 — MethodTooLong — enter runs 316 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CliSession.run crates/biome_cli/src/lib.rs:78 — MethodTooLong — run runs 269 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 169 over it, 2.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UseImportType.action crates/biome_js_analyze/src/lint/style/use_import_type.rs:458 — MethodTooLong — action runs 260 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 160 over it, 2.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ListBlockList.fmt crates/biome_markdown_formatter/src/bullet_list.rs:752 — MethodTooLong — fmt runs 246 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UseReactCompiler.diagnostic crates/biome_js_analyze/src/lint/nursery/use_react_compiler.rs:123 — MethodTooLong — diagnostic runs 236 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NamingConventionSelection.selectors crates/biome_cli/src/execute/migrate/eslint_typescript.rs:267 — MethodTooLong — selectors runs 214 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ArgumentTypeCompatibility.action crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1075 — MethodTooLong — action runs 213 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SemanticEventExtractor.enter_identifier_binding crates/biome_js_semantic/src/events.rs:625 — MethodTooLong — enter_identifier_binding runs 207 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 107 over it, 2.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UseReactFunctionComponentDefinition.action crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:218 — MethodTooLong — action runs 202 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DefaultBlockListFormatter.fmt crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:378 — MethodTooLong — fmt runs 202 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MigrationResults.advices crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:141 — MethodTooLong — advices runs 188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SemanticModelBuilder.push_event crates/biome_js_semantic/src/semantic_model/builder.rs:173 — MethodTooLong — push_event runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TypeMember.from_any_js_class_member crates/biome_js_type_info/src/local_inference.rs:2195 — MethodTooLong — from_any_js_class_member runs 177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FormatYamlBlockMapExplicitEntry.fmt_fields crates/biome_yaml_formatter/src/yaml/auxiliary/block_map_explicit_entry.rs:17 — MethodTooLong — fmt_fields runs 177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: OrganizeImports.action crates/biome_js_analyze/src/assist/source/organize_imports.rs:1108 — MethodTooLong — action runs 175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RageConfiguration.fmt crates/biome_cli/src/commands/rage.rs:208 — MethodTooLong — fmt runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Printer.print_element crates/biome_formatter/src/printer/mod.rs:103 — MethodTooLong — print_element runs 170 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InferredType.is_promise_instance_with crates/biome_js_type_info/src/inferred_type.rs:431 — MethodTooLong — is_promise_instance_with runs 170 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TypeofExpression.fmt crates/biome_js_type_info/src/format_type_info.rs:451 — MethodTooLong — fmt runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TypeData.from_any_js_expression crates/biome_js_type_info/src/local_inference.rs:426 — MethodTooLong — from_any_js_expression runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NoUnusedImports.action crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:282 — MethodTooLong — action runs 157 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TypeofExpression.fmt crates/biome_js_type_info/src/format_inferred_type_info.rs:806 — MethodTooLong — fmt runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ArrowChain.fmt crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:509 — MethodTooLong — fmt runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RuleMover.action crates/biome_migrate/src/analyzers/rule_mover.rs:211 — MethodTooLong — action runs 151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 57 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×81
  • Hotspot: crates/biome_cli/src/execute/migrate/eslint_to_biome.rs crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:767 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 118 in biome_cli::execute::migrate::eslint_to_biome::migrate_eslint_rule at line 767. 4 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_cli/src/execute/migrate/eslint_to_biome.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_module_graph/src/db/type_inference/promise_classification.rs crates/biome_module_graph/src/db/type_inference/promise_classification.rs:177 — crates/biome_module_graph/src/db/type_inference/promise_classification.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 183 in biome_module_graph::db::type_inference::promise_classification::classify_expression at line 177. 3 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_module_graph/src/db/type_inference/promise_classification.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_cli/src/execute/migrate/eslint_eslint.rs crates/biome_cli/src/execute/migrate/eslint_eslint.rs:517 — crates/biome_cli/src/execute/migrate/eslint_eslint.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in Rules::deserialize at line 517. 2 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_cli/src/execute/migrate/eslint_eslint.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:29 — crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in biome_service::file_handlers::html::parse_embedded_nodes::parse_embedded_nodes at line 29. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_html_formatter/src/html/lists/element_list.rs crates/biome_html_formatter/src/html/lists/element_list.rs:382 — crates/biome_html_formatter/src/html/lists/element_list.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 127 in FormatHtmlElementList::fmt_children at line 382. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_html_formatter/src/html/lists/element_list.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_service/src/workspace/server.rs crates/biome_service/src/workspace/server.rs:833 — crates/biome_service/src/workspace/server.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in WorkspaceServerWithDb::open_file_internal at line 833. 12 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_service/src/workspace/server.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_js_type_info/src/local_inference.rs crates/biome_js_type_info/src/local_inference.rs:426 — crates/biome_js_type_info/src/local_inference.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in TypeData::from_any_js_expression at line 426. 7 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_type_info/src/local_inference.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_markdown_parser/src/syntax/mod.rs crates/biome_markdown_parser/src/syntax/mod.rs:331 — crates/biome_markdown_parser/src/syntax/mod.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in biome_markdown_parser::syntax::parse_any_block_with_indent_code_policy at line 331. 3 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_markdown_parser/src/syntax/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_js_type_info/src/inferred_type.rs crates/biome_js_type_info/src/inferred_type.rs:431 — crates/biome_js_type_info/src/inferred_type.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in InferredType::is_promise_instance_with at line 431. 2 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_type_info/src/inferred_type.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_markdown_formatter/src/markdown/lists/block_list.rs crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:378 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in DefaultBlockListFormatter::fmt at line 378. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_markdown_formatter/src/markdown/lists/block_list.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_module_graph/src/db/type_inference/expressions.rs crates/biome_module_graph/src/db/type_inference/expressions.rs:125 — crates/biome_module_graph/src/db/type_inference/expressions.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in ResolutionCtx::resolve_typeof_expression at line 125. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_module_graph/src/db/type_inference/expressions.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_module_graph/src/db/type_inference/qualifiers.rs crates/biome_module_graph/src/db/type_inference/qualifiers.rs:80 — crates/biome_module_graph/src/db/type_inference/qualifiers.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in ResolutionCtx::resolve_qualifier at line 80. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_module_graph/src/db/type_inference/qualifiers.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_vue_semantic/src/semantic_model/component.rs crates/biome_vue_semantic/src/semantic_model/component.rs:542 — crates/biome_vue_semantic/src/semantic_model/component.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Collector::collect_options_object at line 542. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_vue_semantic/src/semantic_model/component.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_markdown_parser/src/syntax/list.rs crates/biome_markdown_parser/src/syntax/list.rs:2208 — crates/biome_markdown_parser/src/syntax/list.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in biome_markdown_parser::syntax::list::parse_first_line_blocks at line 2208. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_markdown_parser/src/syntax/list.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_ruledoc_utils/src/analyzer.rs crates/biome_ruledoc_utils/src/analyzer.rs:51 — crates/biome_ruledoc_utils/src/analyzer.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in biome_ruledoc_utils::analyzer::analyze_rule_code at line 51. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_ruledoc_utils/src/analyzer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_html_formatter/src/utils/children.rs crates/biome_html_formatter/src/utils/children.rs:257 — crates/biome_html_formatter/src/utils/children.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in biome_html_formatter::utils::children::html_split_children at line 257. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_html_formatter/src/utils/children.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_configuration/src/overrides.rs crates/biome_configuration/src/overrides.rs:112 — crates/biome_configuration/src/overrides.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in OverridePattern::apply_to_configuration at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_configuration/src/overrides.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_markdown_parser/src/lexer/mod.rs crates/biome_markdown_parser/src/lexer/mod.rs:353 — crates/biome_markdown_parser/src/lexer/mod.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in MarkdownLexer::consume_token_impl at line 353. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_markdown_parser/src/lexer/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_service/src/settings.rs crates/biome_service/src/settings.rs:308 — crates/biome_service/src/settings.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Settings::apply_configuration at line 308. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_service/src/settings.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_css_parser/src/lexer/mod.rs crates/biome_css_parser/src/lexer/mod.rs:588 — crates/biome_css_parser/src/lexer/mod.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in CssLexer::consume_token_with_fallback at line 588. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_parser/src/lexer/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_js_type_info/src/interned_types.rs crates/biome_js_type_info/src/interned_types.rs:1667 — crates/biome_js_type_info/src/interned_types.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in TypeDataSlotReplacements::rebuild at line 1667. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_type_info/src/interned_types.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_service/src/file_handlers/html.rs crates/biome_service/src/file_handlers/html.rs:803 — crates/biome_service/src/file_handlers/html.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in biome_service::file_handlers::html::format_embedded at line 803. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_service/src/file_handlers/html.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_js_semantic/src/events.rs crates/biome_js_semantic/src/events.rs:625 — crates/biome_js_semantic/src/events.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in SemanticEventExtractor::enter_identifier_binding at line 625. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_semantic/src/events.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_vue_semantic/src/semantic_model/references.rs crates/biome_vue_semantic/src/semantic_model/references.rs:243 — crates/biome_vue_semantic/src/semantic_model/references.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in biome_vue_semantic::semantic_model::references::usage_of at line 243. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_vue_semantic/src/semantic_model/references.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/biome_html_parser/src/lexer/mod.rs crates/biome_html_parser/src/lexer/mod.rs:1804 — crates/biome_html_parser/src/lexer/mod.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in HtmlLexer::next_token at line 1804. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_html_parser/src/lexer/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 56 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×77
  • Duplicated block (7 lines × 2) crates/biome_cli/src/execute/migrate.rs:306 — crates/biome_cli/src/execute/migrate.rs:306-312 | crates/biome_cli/src/execute/migrate.rs:391-397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:32 — crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:32-38 | crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:173-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:39` calls `build`, `analyzer_selectors` and `crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:180` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1349 — crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1349-1355 | crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1385-1391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/biome_css_formatter/src/scss/statements/if_at_rule.rs:34 — crates/biome_css_formatter/src/scss/statements/if_at_rule.rs:34-40 | crates/biome_css_formatter/src/scss/statements/while_at_rule.rs:29-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/statements/while_at_rule.rs:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) crates/biome_grit_patterns/src/grit_css_parser.rs:60 — crates/biome_grit_patterns/src/grit_css_parser.rs:60-66 | crates/biome_grit_patterns/src/grit_json_parser.rs:59-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:387 — crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:387-393 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:403-409 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:158 — crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:158-164 | crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:224-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:186 — crates/biome_html_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:186-192 | crates/biome_js_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:154-160 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:186` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:217 — crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:217-223 | crates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rs:198-204 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:217` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_valid_aria_props.rs:98 — crates/biome_html_analyze/src/lint/a11y/use_valid_aria_props.rs:98-104 | crates/biome_js_analyze/src/lint/a11y/use_valid_aria_props.rs:115-122 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/use_valid_aria_props.rs:98` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_valid_aria_role.rs:144 — crates/biome_html_analyze/src/lint/a11y/use_valid_aria_role.rs:144-150 | crates/biome_js_analyze/src/lint/a11y/use_valid_aria_role.rs:168-174 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/use_valid_aria_role.rs:144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rs:19 — crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rs:19-25 | crates/biome_js_formatter/src/js/expressions/import_call_expression.rs:22-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut HtmlFormatter` in one and `&mut JsFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) crates/biome_html_syntax/src/attribute_ext.rs:123 — crates/biome_html_syntax/src/attribute_ext.rs:123-129 | crates/biome_html_syntax/src/attribute_ext.rs:204-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_syntax/src/attribute_ext.rs:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs:297 — crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs:297-304 | crates/biome_js_analyze/src/lint/suspicious/no_misleading_character_class.rs:154-160 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs:297` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:257 — crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:257-263 | crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:143-149 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:257` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_new_array.rs:89 — crates/biome_js_analyze/src/lint/nursery/no_new_array.rs:89-95 | crates/biome_js_analyze/src/lint/nursery/no_uninvoked_array_callback.rs:105-112 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_new_array.rs:89` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:116 — crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:116-122 | crates/biome_service/src/file_handlers/javascript.rs:796-802 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:309 — crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:309-315 | crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:320-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:309` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_alert.rs:134 — crates/biome_js_analyze/src/lint/suspicious/no_alert.rs:134-140 | crates/biome_js_analyze/src/lint/suspicious/no_alert.rs:154-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_alert.rs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_document_import_in_page.rs:53 — crates/biome_js_analyze/src/lint/suspicious/no_document_import_in_page.rs:53-59 | crates/biome_js_analyze/src/lint/suspicious/no_head_import_in_document.rs:66-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:472 — crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:472-478 | crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:506-512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:472` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_formatter/src/js/assignments/array_assignment_pattern_element.rs:18 — crates/biome_js_formatter/src/js/assignments/array_assignment_pattern_element.rs:18-24 | crates/biome_js_formatter/src/js/assignments/object_assignment_pattern_shorthand_property.rs:19-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/assignments/array_assignment_pattern_element.rs:18` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_semantic/src/events.rs:646 — crates/biome_js_semantic/src/events.rs:646-654 | crates/biome_js_semantic/src/events.rs:657-663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_semantic/src/events.rs:646` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:306 — crates/biome_js_type_info/src/format_inferred_type_info.rs:306-312 | crates/biome_js_type_info/src/format_inferred_type_info.rs:521-527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:61 — crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:61-67 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:28-34 — before extracting anything, compare `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs` and `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 52 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×68
  • Duplicated block (12 lines × 2) crates/biome_cli/src/execute/migrate/eslint_eslint.rs:522 — crates/biome_cli/src/execute/migrate/eslint_eslint.rs:522-533 | crates/biome_cli/src/execute/migrate/stylelint_stylelint.rs:126-137 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_eslint.rs:522` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_css_analyze/src/lint/suspicious/no_empty_source.rs:81 — crates/biome_css_analyze/src/lint/suspicious/no_empty_source.rs:81-92 | crates/biome_graphql_analyze/src/lint/suspicious/no_empty_source.rs:82-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/suspicious/no_empty_source.rs:81` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_css_parser/src/lexer/mod.rs:1012 — crates/biome_css_parser/src/lexer/mod.rs:1012-1023 | crates/biome_css_parser/src/lexer/mod.rs:1055-1066 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_parser/src/lexer/mod.rs:1012` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_css_parser/src/syntax/mod.rs:1075 — crates/biome_css_parser/src/syntax/mod.rs:1075-1086 | crates/biome_js_parser/src/syntax/typescript.rs:131-142 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `func` to `impl FnOnce(&mut CssParser) -> Result<T` in one and `impl FnOnce(&mut JsParser) -> Result<T` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 2) crates/biome_deserialize/src/json.rs:50 — crates/biome_deserialize/src/json.rs:50-61 | crates/biome_deserialize/src/yaml/mod.rs:62-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_deserialize/src/json.rs:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_deserialize/src/json.rs:64` calls `deserialize_from_json_str`, `default` and `crates/biome_deserialize/src/yaml/mod.rs:78` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) crates/biome_embeds/src/visitor.rs:1140 — crates/biome_embeds/src/visitor.rs:1140-1151 | crates/biome_embeds/src/visitor.rs:1155-1166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_embeds/src/visitor.rs:1140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_grit_patterns/src/grit_css_parser.rs:72 — crates/biome_grit_patterns/src/grit_css_parser.rs:72-83 | crates/biome_grit_patterns/src/grit_json_parser.rs:70-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/grit_css_parser.rs:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_grit_patterns/src/pattern_compiler/not_compiler.rs:21 — crates/biome_grit_patterns/src/pattern_compiler/not_compiler.rs:21-32 | crates/biome_grit_patterns/src/pattern_compiler/not_compiler.rs:46-57 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/biome_grit_patterns/src/pattern_compiler/predicate_call_compiler.rs:32 — crates/biome_grit_patterns/src/pattern_compiler/predicate_call_compiler.rs:32-43 | crates/biome_grit_patterns/src/pattern_compiler/predicate_call_compiler.rs:65-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/pattern_compiler/predicate_call_compiler.rs:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_grit_patterns/src/pattern_compiler/predicate_call_compiler.rs:77` calls `metavariable_prefix`, `to_owned` and `crates/biome_grit_patterns/src/pattern_compiler/predicate_call_compiler.rs:44` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) crates/biome_html_formatter/src/utils/children.rs:934 — crates/biome_html_formatter/src/utils/children.rs:934-945 | crates/biome_js_formatter/src/utils/jsx.rs:557-568 — before extracting anything, compare `crates/biome_html_formatter/src/utils/children.rs` and `crates/biome_js_formatter/src/utils/jsx.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) crates/biome_html_parser/src/lexer/mod.rs:178 — crates/biome_html_parser/src/lexer/mod.rs:178-189 | crates/biome_html_parser/src/lexer/mod.rs:311-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/lexer/mod.rs:178` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_html_parser/src/lexer/mod.rs:1044 — crates/biome_html_parser/src/lexer/mod.rs:1044-1055 | crates/biome_tailwind_parser/src/lexer/mod.rs:575-586 — before extracting anything, compare `crates/biome_html_parser/src/lexer/mod.rs` and `crates/biome_tailwind_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) crates/biome_html_parser/src/lexer/mod.rs:1342 — crates/biome_html_parser/src/lexer/mod.rs:1342-1353 | crates/biome_json_parser/src/lexer/mod.rs:536-547 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/lexer/mod.rs:1342` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_html_parser/src/syntax/svelte.rs:42 — crates/biome_html_parser/src/syntax/svelte.rs:42-53 | crates/biome_html_parser/src/syntax/svelte.rs:891-902 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/syntax/svelte.rs:42` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/assist/source/organize_imports.rs:1438 — crates/biome_js_analyze/src/assist/source/organize_imports.rs:1438-1449 | crates/biome_js_analyze/src/assist/source/organize_imports.rs:1526-1537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/assist/source/organize_imports.rs:1438` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/assist/source/use_sorted_attributes.rs:111 — crates/biome_js_analyze/src/assist/source/use_sorted_attributes.rs:111-122 | crates/biome_js_analyze/src/assist/source/use_sorted_attributes.rs:195-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:250 — crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:250-261 | crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs:269-280 — before extracting anything, compare `crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs` and `crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:250` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:185 — crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:185-196 | crates/biome_js_analyze/src/lint/a11y/use_heading_content.rs:136-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:185` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:184` calls `find_attribute_by_name`, `is_some` and `crates/biome_js_analyze/src/lint/a11y/use_heading_content.rs:136` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_extra_boolean_cast.rs:137 — crates/biome_js_analyze/src/lint/complexity/no_extra_boolean_cast.rs:137-148 | crates/biome_js_analyze/src/lint/complexity/no_extra_boolean_cast.rs:157-168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_extra_boolean_cast.rs:137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_unresolved_imports.rs:100 — crates/biome_js_analyze/src/lint/correctness/no_unresolved_imports.rs:100-111 | crates/biome_js_analyze/src/lint/suspicious/no_deprecated_imports.rs:81-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:383 — crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:383-394 | crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:397-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:383` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:327 — crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:327-338 | crates/biome_js_analyze/src/lint/nursery/no_misused_promises.rs:217-228 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:327` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_misplaced_list_elements.rs:199 — crates/biome_js_analyze/src/lint/nursery/no_misplaced_list_elements.rs:199-210 | crates/biome_js_analyze/src/lint/nursery/use_valid_character_comparison.rs:204-215 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_misplaced_list_elements.rs:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_svelte_ignored_unsubscribe.rs:90 — crates/biome_js_analyze/src/lint/nursery/no_svelte_ignored_unsubscribe.rs:90-101 | crates/biome_js_analyze/src/lint/nursery/no_uninvoked_array_callback.rs:118-129 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_svelte_ignored_unsubscribe.rs:90` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:408 — crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:408-419 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:633-644 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs` and `crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:408` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 43 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×68
  • Duplicated block (8 lines × 2) crates/biome_configuration/src/overrides.rs:392 — crates/biome_configuration/src/overrides.rs:392-399 | crates/biome_configuration/src/overrides.rs:462-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1104 — crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1104-1111 | crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1119-1126 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_deserialize_macros/src/deserializable_derive.rs:309 — crates/biome_deserialize_macros/src/deserializable_derive.rs:309-316 | crates/biome_deserialize_macros/src/deserializable_derive.rs:488-495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_deserialize_macros/src/deserializable_derive.rs:309` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:107 — crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:107-114 | crates/biome_js_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:106-113 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:107` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_html_parser/src/syntax/vue.rs:401 — crates/biome_html_parser/src/syntax/vue.rs:401-408 | crates/biome_html_parser/src/syntax/vue.rs:413-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/biome_html_syntax/src/static_value.rs:53 — crates/biome_html_syntax/src/static_value.rs:53-60 | crates/biome_js_syntax/src/static_value.rs:55-62 — before extracting anything, compare `crates/biome_html_syntax/src/static_value.rs` and `crates/biome_js_syntax/src/static_value.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_syntax/src/static_value.rs:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:138 — crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:138-145 | crates/biome_js_analyze/src/lint/style/use_single_var_declarator.rs:205-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_eager_array_methods_in_loops.rs:387 — crates/biome_js_analyze/src/lint/nursery/no_eager_array_methods_in_loops.rs:387-394 | crates/biome_js_analyze/src/lint/nursery/no_unreadable_for_of_expression.rs:351-358 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_consistent_boolean_name.rs:772 — crates/biome_js_analyze/src/lint/nursery/use_consistent_boolean_name.rs:772-779 | crates/biome_js_analyze/src/shared/late_event_handler.rs:264-271 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:291 — crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:291-298 | crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:417-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_object_from_entries.rs:389 — crates/biome_js_analyze/src/lint/nursery/use_object_from_entries.rs:389-397 | crates/biome_js_analyze/src/lint/nursery/use_object_from_entries.rs:433-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_object_from_entries.rs:389` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:424 — crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:424-431 | crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:481-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:432` calls `Some`, `star_token`, `with_star_token` and `crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:489` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/style/no_playwright_element_handle.rs:74 — crates/biome_js_analyze/src/lint/style/no_playwright_element_handle.rs:74-81 | crates/biome_js_analyze/src/lint/style/no_playwright_eval.rs:59-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs:90 — crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs:90-97 | crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs:122-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:141 — crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:141-148 | crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:192-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:218 — crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:218-225 | crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:227-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:343 — crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:343-350 | crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:374-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:343` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_js_formatter/src/js/auxiliary/case_clause.rs:33 — crates/biome_js_formatter/src/js/auxiliary/case_clause.rs:33-40 | crates/biome_js_formatter/src/js/auxiliary/default_clause.rs:23-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/biome_js_semantic/src/events.rs:1209 — crates/biome_js_semantic/src/events.rs:1209-1216 | crates/biome_js_semantic/src/events.rs:1225-1232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_semantic/src/events.rs:1209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) crates/biome_js_syntax/src/stmt_ext.rs:95 — crates/biome_js_syntax/src/stmt_ext.rs:95-102 | crates/biome_js_syntax/src/stmt_ext.rs:123-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_syntax/src/stmt_ext.rs:95` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:841 — crates/biome_js_type_info/src/format_inferred_type_info.rs:841-848 | crates/biome_js_type_info/src/format_type_info.rs:495-502 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:841` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut biome_formatter::formatter::Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) crates/biome_js_type_info/src/inferred_type.rs:1831 — crates/biome_js_type_info/src/inferred_type.rs:1831-1838 | crates/biome_js_type_info/src/inferred_type.rs:1966-1973 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/biome_json_analyze/src/lint/nursery/use_consistent_object_keys.rs:148 — crates/biome_json_analyze/src/lint/nursery/use_consistent_object_keys.rs:148-155 | crates/biome_json_analyze/src/lint/nursery/use_consistent_object_keys.rs:185-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_analyze/src/lint/nursery/use_consistent_object_keys.rs:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_lsp/src/server.rs:584 — crates/biome_lsp/src/server.rs:584-591 | crates/biome_lsp/src/server.rs:599-606 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_lsp/src/server.rs:584` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:630 — crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:630-637 | crates/biome_markdown_formatter/src/quote.rs:367-374 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 43 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×66
  • Duplicated block (11 lines × 2) crates/biome_configuration/src/overrides.rs:297 — crates/biome_configuration/src/overrides.rs:297-307 | crates/biome_configuration/src/overrides.rs:313-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:297` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_css_analyze/src/lint/nursery/use_consistent_font_weight_notation.rs:237 — crates/biome_css_analyze/src/lint/nursery/use_consistent_font_weight_notation.rs:237-247 | crates/biome_css_analyze/src/lint/nursery/use_consistent_lightness_notation.rs:195-205 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/nursery/use_consistent_font_weight_notation.rs:237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_css_parser/src/syntax/at_rule/media.rs:396 — crates/biome_css_parser/src/syntax/at_rule/media.rs:396-406 | crates/biome_css_parser/src/syntax/scss/at_rule/media.rs:232-242 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_parser/src/syntax/at_rule/media.rs:396` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_css_parser/src/syntax/selector/pseudo_class/identifier.rs:22 — crates/biome_css_parser/src/syntax/selector/pseudo_class/identifier.rs:22-32 | crates/biome_css_parser/src/syntax/selector/pseudo_element.rs:60-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_parser/src/syntax/selector/pseudo_class/identifier.rs:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_diagnostics_macros/src/generate.rs:27 — crates/biome_diagnostics_macros/src/generate.rs:27-37 | crates/biome_diagnostics_macros/src/generate.rs:268-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_diagnostics_macros/src/generate.rs:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `input` to `DeriveStructInput` in one and `DeriveEnumInput` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) crates/biome_formatter/src/lib.rs:375 — crates/biome_formatter/src/lib.rs:375-385 | crates/biome_formatter/src/lib.rs:497-507 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:160 — crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:160-170 | crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:191-201 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) crates/biome_graphql_parser/src/lexer/mod.rs:370 — crates/biome_graphql_parser/src/lexer/mod.rs:370-381 | crates/biome_graphql_parser/src/lexer/mod.rs:387-397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_parser/src/lexer/mod.rs:370` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:441 — crates/biome_grit_parser/src/lexer/mod.rs:441-451 | crates/biome_json_parser/src/lexer/mod.rs:492-502 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:441` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_html_analyze/src/lib.rs:271 — crates/biome_html_analyze/src/lib.rs:271-281 | crates/biome_markdown_analyze/src/lib.rs:166-176 — before extracting anything, compare `crates/biome_html_analyze/src/lib.rs` and `crates/biome_markdown_analyze/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:62 — crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:62-72 | crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:71-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_semantic_elements.rs:142 — crates/biome_html_analyze/src/lint/a11y/use_semantic_elements.rs:142-152 | crates/biome_js_analyze/src/lint/a11y/use_semantic_elements.rs:174-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/use_semantic_elements.rs:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_html_analyze/src/lint/correctness/no_duplicate_attributes.rs:141 — crates/biome_html_analyze/src/lint/correctness/no_duplicate_attributes.rs:141-151 | crates/biome_html_analyze/src/lint/correctness/no_duplicate_attributes.rs:156-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/correctness/no_duplicate_attributes.rs:141` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:159 — crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:159-169 | crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:153-163 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs` and `crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_html_analyze/src/lint/nursery/use_vue_v_model.rs:271 — crates/biome_html_analyze/src/lint/nursery/use_vue_v_model.rs:271-281 | crates/biome_html_analyze/src/lint/nursery/use_vue_v_on_exact.rs:190-200 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/use_vue_v_model.rs:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_html_parser/src/syntax/svelte.rs:700 — crates/biome_html_parser/src/syntax/svelte.rs:700-710 | crates/biome_html_parser/src/syntax/svelte.rs:732-742 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/syntax/svelte.rs:700` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/assist/source/organize_imports.rs:1464 — crates/biome_js_analyze/src/assist/source/organize_imports.rs:1464-1474 | crates/biome_js_analyze/src/assist/source/organize_imports.rs:1515-1525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/assist/source/organize_imports.rs:1464` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:173 — crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:173-183 | crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs:171-181 — before extracting anything, compare `crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs` and `crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:133 — crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:133-143 | crates/biome_js_analyze/src/lint/a11y/use_heading_content.rs:114-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:182 — crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:182-192 | crates/biome_js_analyze/src/lint/nursery/use_control_label.rs:262-274 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_this_in_static.rs:119 — crates/biome_js_analyze/src/lint/complexity/no_this_in_static.rs:119-129 | crates/biome_js_analyze/src/services/semantic_class.rs:300-310 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_this_in_static.rs:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_string_case_mismatch.rs:103 — crates/biome_js_analyze/src/lint/correctness/no_string_case_mismatch.rs:103-113 | crates/biome_js_analyze/src/lint/style/no_unused_template_literal.rs:103-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_string_case_mismatch.rs:103` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:423 — crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:423-433 | crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:463-473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:423` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_catch_error_name.rs:221 — crates/biome_js_analyze/src/lint/nursery/use_catch_error_name.rs:221-231 | crates/biome_js_analyze/src/lint/nursery/use_vue_macro_variable_name.rs:312-322 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_catch_error_name.rs:221` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_consistent_boolean_name.rs:970 — crates/biome_js_analyze/src/lint/nursery/use_consistent_boolean_name.rs:970-980 | crates/biome_js_analyze/src/lint/nursery/use_consistent_boolean_name.rs:982-992 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 41 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×65
  • Duplicated block (9 lines × 2) crates/biome_cli/src/execute/migrate/eslint_eslint.rs:388 — crates/biome_cli/src/execute/migrate/eslint_eslint.rs:388-396 | crates/biome_package/src/node_js_package/package_json.rs:540-548 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_eslint.rs:388` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_cli/src/reporter/json.rs:333 — crates/biome_cli/src/reporter/json.rs:333-341 | crates/biome_cli/src/reporter/rdjson.rs:117-125 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `location` to `&Location` in one and `&Location<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_cli/src/reporter/rdjson.rs:128` calls `Some` and `crates/biome_cli/src/reporter/json.rs:344` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) crates/biome_cli/src/runner/mod.rs:324 — crates/biome_cli/src/runner/mod.rs:324-332 | crates/biome_cli/src/runner/mod.rs:366-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/runner/mod.rs:324` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_configuration/src/overrides.rs:354 — crates/biome_configuration/src/overrides.rs:354-362 | crates/biome_configuration/src/overrides.rs:424-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:354` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_configuration/src/overrides.rs:364 — crates/biome_configuration/src/overrides.rs:364-372 | crates/biome_configuration/src/overrides.rs:434-442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:364` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_configuration/src/overrides.rs:374 — crates/biome_configuration/src/overrides.rs:374-382 | crates/biome_configuration/src/overrides.rs:444-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_console/src/markup.rs:215 — crates/biome_console/src/markup.rs:215-223 | crates/biome_console/src/markup.rs:237-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_console/src/markup.rs:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_css_parser/src/lexer/mod.rs:1001 — crates/biome_css_parser/src/lexer/mod.rs:1001-1009 | crates/biome_css_parser/src/lexer/mod.rs:1044-1052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_parser/src/lexer/mod.rs:1001` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_css_syntax/src/property_syntax/matcher.rs:252 — crates/biome_css_syntax/src/property_syntax/matcher.rs:252-260 | crates/biome_css_syntax/src/property_syntax/matcher.rs:392-401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_syntax/src/property_syntax/matcher.rs:252` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `&StaticScssValue` in one and `&AnyCssGenericComponentValue` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:228 — crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:228-236 | crates/biome_graphql_analyze/src/utils.rs:209-217 — before extracting anything, compare `crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs` and `crates/biome_graphql_analyze/src/utils.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:228` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:130 — crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:130-138 | crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:122-130 — before extracting anything, compare `crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` and `crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_graphql_semantic/src/events.rs:221 — crates/biome_graphql_semantic/src/events.rs:221-230 | crates/biome_graphql_semantic/src/events.rs:252-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlNameBinding` in one and `&GraphqlNameReference` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) crates/biome_grit_patterns/src/grit_resolved_pattern.rs:204 — crates/biome_grit_patterns/src/grit_resolved_pattern.rs:204-212 | crates/biome_grit_patterns/src/grit_resolved_pattern.rs:220-228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:81 — crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:81-89 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:147-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:90` calls `File` and `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:156` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) crates/biome_grit_patterns/src/pattern_compiler/function_definition_compiler.rs:24 — crates/biome_grit_patterns/src/pattern_compiler/function_definition_compiler.rs:24-32 | crates/biome_grit_patterns/src/pattern_compiler/predicate_definition_compiler.rs:25-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/pattern_compiler/function_definition_compiler.rs:24` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `biome_grit_syntax::GritFunctionDefinition` in one and `GritPredicateDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:132 — crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:132-140 | crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:143-151 — before extracting anything, compare `crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs` and `crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs:63 — crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs:63-71 | crates/biome_js_analyze/src/lint/nursery/no_non_scalable_viewport.rs:66-74 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs` and `crates/biome_js_analyze/src/lint/nursery/no_non_scalable_viewport.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs:63` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs:93 — crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs:93-101 | crates/biome_js_analyze/src/lint/nursery/no_non_scalable_viewport.rs:96-104 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs` and `crates/biome_js_analyze/src/lint/nursery/no_non_scalable_viewport.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) crates/biome_html_parser/src/lexer/mod.rs:124 — crates/biome_html_parser/src/lexer/mod.rs:124-132 | crates/biome_html_parser/src/lexer/mod.rs:240-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/lexer/mod.rs:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/biome_html_parser/src/syntax/svelte.rs:101 — crates/biome_html_parser/src/syntax/svelte.rs:101-109 | crates/biome_html_parser/src/syntax/svelte.rs:134-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/biome_js_analyze/src/ast_utils.rs:143 — crates/biome_js_analyze/src/ast_utils.rs:143-151 | crates/biome_js_analyze/src/lint/nursery/no_accidental_bitwise_operators.rs:301-309 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_before_interactive_script_outside_document.rs:85 — crates/biome_js_analyze/src/lint/correctness/no_before_interactive_script_outside_document.rs:85-93 | crates/biome_js_analyze/src/lint/correctness/use_inline_script_id.rs:87-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:260 — crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:260-268 | crates/biome_js_analyze/src/utils/indexed_collection.rs:69-77 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs` and `crates/biome_js_analyze/src/utils/indexed_collection.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_double_comparison.rs:447 — crates/biome_js_analyze/src/lint/nursery/no_double_comparison.rs:447-455 | crates/biome_js_analyze/src/lint/nursery/use_valid_character_comparison.rs:252-260 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_double_comparison.rs:447` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_map_spread.rs:187 — crates/biome_js_analyze/src/lint/nursery/no_map_spread.rs:187-195 | crates/biome_js_analyze/src/lint/nursery/no_uninvoked_array_callback.rs:116-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • + 40 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×63
  • Duplicated block (10 lines × 2) crates/biome_cli/src/commands/inspect/plugins/mod.rs:511 — crates/biome_cli/src/commands/inspect/plugins/mod.rs:511-520 | crates/biome_cli/src/commands/inspect/plugins/mod.rs:522-531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/commands/inspect/plugins/mod.rs:511` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_cli/src/execute/migrate.rs:323 — crates/biome_cli/src/execute/migrate.rs:323-332 | crates/biome_cli/src/execute/migrate.rs:408-417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate.rs:323` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:354 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:354-363 | crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs:182-191 — before extracting anything, compare `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs` and `crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:354` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_cli/src/reporter/json.rs:116 — crates/biome_cli/src/reporter/json.rs:116-125 | crates/biome_cli/src/reporter/json.rs:138-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/biome_cli/src/reporter/json.rs:125 — crates/biome_cli/src/reporter/json.rs:125-134 | crates/biome_cli/src/reporter/json.rs:154-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/reporter/json.rs:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_diagnostics/src/display/diff.rs:574 — crates/biome_diagnostics/src/display/diff.rs:574-583 | crates/biome_diagnostics/src/display/diff.rs:588-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_diagnostics/src/display/diff.rs:574` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_diagnostics/src/display/frame.rs:76 — crates/biome_diagnostics/src/display/frame.rs:76-85 | crates/biome_diagnostics/src/display/frame.rs:123-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/biome_diagnostics/src/display_github.rs:114 — crates/biome_diagnostics/src/display_github.rs:114-123 | crates/biome_diagnostics/src/display_github.rs:132-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_diagnostics/src/display_github.rs:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_diagnostics/src/display_github.rs:143` calls `push_str` and `crates/biome_diagnostics/src/display_github.rs:125` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) crates/biome_formatter/src/comments/builder.rs:613 — crates/biome_formatter/src/comments/builder.rs:613-622 | crates/biome_formatter/src/comments/builder.rs:657-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_formatter/src/comments/builder.rs:613` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_fs/src/fs.rs:298 — crates/biome_fs/src/fs.rs:298-307 | crates/biome_fs/src/fs.rs:308-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_fs/src/fs.rs:298` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:189 — crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:189-198 | crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:238-247 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:189` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `list` to `&GraphqlEnumValueList` in one and `&GraphqlSelectionList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:132 — crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:132-141 | crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:125-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_noninteractive_tabindex.rs:131 — crates/biome_html_analyze/src/lint/a11y/no_noninteractive_tabindex.rs:131-140 | crates/biome_html_analyze/src/lint/a11y/no_positive_tabindex.rs:105-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:88 — crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:88-97 | crates/biome_js_analyze/src/lint/a11y/use_valid_autocomplete.rs:93-102 — before extracting anything, compare `crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs` and `crates/biome_js_analyze/src/lint/a11y/use_valid_autocomplete.rs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else_if.rs:92 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else_if.rs:92-101 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_if.rs:99-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_is.rs:102 — crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_is.rs:102-111 | crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_show.rs:82-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_is.rs:102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) crates/biome_html_analyze/src/services/module_graph.rs:38 — crates/biome_html_analyze/src/services/module_graph.rs:38-47 | crates/biome_js_analyze/src/services/database.rs:54-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/services/database.rs:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rs:10 — crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rs:10-19 | crates/biome_js_formatter/src/ts/expressions/import_type_arguments.rs:9-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rs:10` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut HtmlFormatter` in one and `&mut JsFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_formatter/src/ts/expressions/import_type_arguments.rs:19` calls `format`, `space`, `Some` and `crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rs:20` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) crates/biome_html_syntax/src/static_value.rs:89 — crates/biome_html_syntax/src/static_value.rs:89-98 | crates/biome_js_syntax/src/static_value.rs:89-98 — before extracting anything, compare `crates/biome_html_syntax/src/static_value.rs` and `crates/biome_js_syntax/src/static_value.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:143 — crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:143-152 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:133-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_better_dom_traversing.rs:421 — crates/biome_js_analyze/src/lint/nursery/use_better_dom_traversing.rs:421-430 | crates/biome_js_analyze/src/lint/nursery/use_better_dom_traversing.rs:479-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_analyze/src/lint/nursery/use_better_dom_traversing.rs:431` calls `is_optional` and `crates/biome_js_analyze/src/lint/nursery/use_better_dom_traversing.rs:489` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:786 — crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:786-795 | crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:802-811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:786` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_js_analyze/src/lint/style/use_consistent_array_type.rs:98 — crates/biome_js_analyze/src/lint/style/use_consistent_array_type.rs:98-107 | crates/biome_js_analyze/src/lint/style/use_consistent_array_type.rs:133-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_consistent_array_type.rs:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_js_analyze/src/lint/style/use_destructuring.rs:144 — crates/biome_js_analyze/src/lint/style/use_destructuring.rs:144-153 | crates/biome_js_analyze/src/lint/style/use_destructuring.rs:184-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_destructuring.rs:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/biome_js_analyze/src/lint/style/use_export_type.rs:540 — crates/biome_js_analyze/src/lint/style/use_export_type.rs:540-549 | crates/biome_js_analyze/src/lint/style/use_import_type.rs:866-875 — before extracting anything, compare `crates/biome_js_analyze/src/lint/style/use_export_type.rs` and `crates/biome_js_analyze/src/lint/style/use_import_type.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_export_type.rs:540` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 38 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×60
  • FunctionTooLong: biome_module_graph::db::type_inference::promise_classification::classify_expression crates/biome_module_graph/src/db/type_inference/promise_classification.rs:177 — FunctionTooLong — biome_module_graph::db::type_inference::promise_classification::classify_expression runs 713 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 613 over it, 7.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_syntax_codegen::generate_nodes::generate_nodes crates/biome_syntax_codegen/src/generate_nodes.rs:9 — FunctionTooLong — biome_syntax_codegen::generate_nodes::generate_nodes runs 577 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 477 over it, 5.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_react_compiler::convert_ast::expressions::convert_expression crates/biome_react_compiler/src/convert_ast/expressions.rs:3 — FunctionTooLong — biome_react_compiler::convert_ast::expressions::convert_expression runs 463 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 363 over it, 4.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_cli::execute::migrate::eslint_to_biome::migrate_eslint_rule crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:767 — FunctionTooLong — biome_cli::execute::migrate::eslint_to_biome::migrate_eslint_rule runs 370 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 270 over it, 3.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_cli::execute::migrate::migrate_file crates/biome_cli/src/execute/migrate.rs:177 — FunctionTooLong — biome_cli::execute::migrate::migrate_file runs 308 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 208 over it, 3.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_service::file_handlers::html::parse_embedded_nodes::parse_embedded_nodes crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:29 — FunctionTooLong — biome_service::file_handlers::html::parse_embedded_nodes::parse_embedded_nodes runs 296 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 196 over it, 2.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_configuration_macros::group_struct::generate_group_struct crates/biome_configuration_macros/src/group_struct.rs:8 — FunctionTooLong — biome_configuration_macros::group_struct::generate_group_struct runs 261 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 161 over it, 2.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_cli::commands::inspect::plugins::inspect_plugins crates/biome_cli/src/commands/inspect/plugins/mod.rs:332 — FunctionTooLong — biome_cli::commands::inspect::plugins::inspect_plugins runs 239 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 139 over it, 2.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_react_compiler::convert_ast::statements::convert_statement crates/biome_react_compiler/src/convert_ast/statements.rs:33 — FunctionTooLong — biome_react_compiler::convert_ast::statements::convert_statement runs 238 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 138 over it, 2.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_ruledoc_utils::analyzer::analyze_rule_code crates/biome_ruledoc_utils/src/analyzer.rs:51 — FunctionTooLong — biome_ruledoc_utils::analyzer::analyze_rule_code runs 236 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_lsp::handlers::analysis::code_actions crates/biome_lsp/src/handlers/analysis.rs:55 — FunctionTooLong — biome_lsp::handlers::analysis::code_actions runs 231 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 131 over it, 2.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_react_compiler::convert_ast::modules::convert_export crates/biome_react_compiler/src/convert_ast/modules.rs:126 — FunctionTooLong — biome_react_compiler::convert_ast::modules::convert_export runs 201 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_js_formatter::js::expressions::call_arguments::write_grouped_arguments crates/biome_js_formatter/src/js/expressions/call_arguments.rs:353 — FunctionTooLong — biome_js_formatter::js::expressions::call_arguments::write_grouped_arguments runs 198 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_cli::runner::impls::finalizers::default::print_to_reporter crates/biome_cli/src/runner/impls/finalizers/default.rs:185 — FunctionTooLong — biome_cli::runner::impls::finalizers::default::print_to_reporter runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_service::file_handlers::html::parse_embedded_nodes::parse_matched_embed crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:1208 — FunctionTooLong — biome_service::file_handlers::html::parse_embedded_nodes::parse_matched_embed runs 163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rules_check::check_rules xtask/rules_check/src/lib.rs:48 — FunctionTooLong — rules_check::check_rules runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_lsp::handlers::analysis::fix_all crates/biome_lsp/src/handlers/analysis.rs:541 — FunctionTooLong — biome_lsp::handlers::analysis::fix_all runs 157 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_service::workspace_types::instance_type crates/biome_service/src/workspace_types.rs:95 — FunctionTooLong — biome_service::workspace_types::instance_type runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_deserialize_macros::deserializable_derive::generate_deserializable_struct crates/biome_deserialize_macros/src/deserializable_derive.rs:326 — FunctionTooLong — biome_deserialize_macros::deserializable_derive::generate_deserializable_struct runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_diagnostics::display::frame::print_frame crates/biome_diagnostics/src/display/frame.rs:36 — FunctionTooLong — biome_diagnostics::display::frame::print_frame runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_js_analyze::lint::suspicious::no_useless_regex_backrefs::run crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:298 — FunctionTooLong — biome_js_analyze::lint::suspicious::no_useless_regex_backrefs::run runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_syntax_codegen::generate_node_factory::generate_node_factory crates/biome_syntax_codegen/src/generate_node_factory.rs:8 — FunctionTooLong — biome_syntax_codegen::generate_node_factory::generate_node_factory runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_module_graph::db::type_inference::lookup::find_member_key_type_with_resolver crates/biome_module_graph/src/db/type_inference/lookup.rs:421 — FunctionTooLong — biome_module_graph::db::type_inference::lookup::find_member_key_type_with_resolver runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_service::file_handlers::html::fix_all crates/biome_service/src/file_handlers/html.rs:1366 — FunctionTooLong — biome_service::file_handlers::html::fix_all runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: biome_service::file_handlers::css::fix_all crates/biome_service/src/file_handlers/css.rs:878 — FunctionTooLong — biome_service::file_handlers::css::fix_all runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 35 more in this group — see findings.md.
D1 · Cyclomatic Complexity · biome_js_analyze · ×58
  • biome_js_analyze::lint::suspicious::no_useless_regex_backrefs::run (cyclomatic 49) crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:298 — biome_js_analyze::lint::suspicious::no_useless_regex_backrefs::run has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::style::use_unicode_regex::is_valid_unicode_pattern (cyclomatic 45) crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:391 — biome_js_analyze::lint::style::use_unicode_regex::is_valid_unicode_pattern has cyclomatic complexity 45 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • biome_js_analyze::lint::nursery::use_consistent_boolean_name::expressions_state (cyclomatic 43) crates/biome_js_analyze/src/lint/nursery/use_consistent_boolean_name.rs:881 — biome_js_analyze::lint::nursery::use_consistent_boolean_name::expressions_state has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::ast_utils::is_constant_condition (cyclomatic 42) crates/biome_js_analyze/src/ast_utils.rs:197 — biome_js_analyze::ast_utils::is_constant_condition has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::nursery::use_explicit_return_type::collect_return_statements (cyclomatic 31) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:544 — biome_js_analyze::lint::nursery::use_explicit_return_type::collect_return_statements has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::suspicious::no_unnecessary_conditions::check_condition_necessity (cyclomatic 31) crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:406 — biome_js_analyze::lint::suspicious::no_unnecessary_conditions::check_condition_necessity has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::correctness::no_unused_private_class_members::traverse_members_usage (cyclomatic 28) crates/biome_js_analyze/src/lint/correctness/no_unused_private_class_members.rs:274 — biome_js_analyze::lint::correctness::no_unused_private_class_members::traverse_members_usage has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::complexity::no_playwright_useless_await::is_sync_expect_call (cyclomatic 25) crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:194 — biome_js_analyze::lint::complexity::no_playwright_useless_await::is_sync_expect_call has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::nursery::use_explicit_type::is_allowed_in_untyped_expression (cyclomatic 25) crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:1079 — biome_js_analyze::lint::nursery::use_explicit_type::is_allowed_in_untyped_expression has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_js_analyze::lint::style::use_global_this::check_expression (cyclomatic 25) crates/biome_js_analyze/src/lint/style/use_global_this.rs:100 — biome_js_analyze::lint::style::use_global_this::check_expression has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::style::use_naming_convention::selector_from_binding_declaration (cyclomatic 24) crates/biome_js_analyze/src/lint/style/use_naming_convention.rs:1209 — biome_js_analyze::lint::style::use_naming_convention::selector_from_binding_declaration has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_analyze::lint::correctness::no_unreachable::analyze_simple (cyclomatic 23) crates/biome_js_analyze/src/lint/correctness/no_unreachable.rs:279 — biome_js_analyze::lint::correctness::no_unreachable::analyze_simple has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::correctness::use_exhaustive_dependencies::is_stable_binding (cyclomatic 23) crates/biome_js_analyze/src/lint/correctness/use_exhaustive_dependencies.rs:1098 — biome_js_analyze::lint::correctness::use_exhaustive_dependencies::is_stable_binding has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::style::use_at_index::analyze_slice_element_access (cyclomatic 23) crates/biome_js_analyze/src/lint/style/use_at_index.rs:507 — biome_js_analyze::lint::style::use_at_index::analyze_slice_element_access has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::nursery::no_unsafe_return::expected_type_at (cyclomatic 22) crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:371 — biome_js_analyze::lint::nursery::no_unsafe_return::expected_type_at has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::nursery::use_block_statement_over_iife::needs_function_scope (cyclomatic 22) crates/biome_js_analyze/src/lint/nursery/use_block_statement_over_iife.rs:232 — biome_js_analyze::lint::nursery::use_block_statement_over_iife::needs_function_scope has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • biome_js_analyze::lint::nursery::no_useless_spread::inline_literal (cyclomatic 21) crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:695 — biome_js_analyze::lint::nursery::no_useless_spread::inline_literal has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::nursery::use_svelte_reactive_classes::find_mutation (cyclomatic 21) crates/biome_js_analyze/src/lint/nursery/use_svelte_reactive_classes.rs:323 — biome_js_analyze::lint::nursery::use_svelte_reactive_classes::find_mutation has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::nursery::use_svelte_reactive_classes::is_exported_value (cyclomatic 21) crates/biome_js_analyze/src/lint/nursery/use_svelte_reactive_classes.rs:511 — biome_js_analyze::lint::nursery::use_svelte_reactive_classes::is_exported_value has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::suspicious::no_misleading_character_class::diagnostic_regex_class (cyclomatic 21) crates/biome_js_analyze/src/lint/suspicious/no_misleading_character_class.rs:221 — biome_js_analyze::lint::suspicious::no_misleading_character_class::diagnostic_regex_class has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::suspicious::no_unnecessary_conditions::check_comparison_necessity (cyclomatic 21) crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:605 — biome_js_analyze::lint::suspicious::no_unnecessary_conditions::check_comparison_necessity has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_analyze::lint::correctness::no_unused_variables::suggested_fix_if_unused (cyclomatic 20) crates/biome_js_analyze/src/lint/correctness/no_unused_variables.rs:542 — biome_js_analyze::lint::correctness::no_unused_variables::suggested_fix_if_unused has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::nursery::use_math_trunc::is_side_effect_free (cyclomatic 20) crates/biome_js_analyze/src/lint/nursery/use_math_trunc.rs:496 — biome_js_analyze::lint::nursery::use_math_trunc::is_side_effect_free has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_analyze::lint::nursery::use_object_from_entries::reduce_entry (cyclomatic 20) crates/biome_js_analyze/src/lint/nursery/use_object_from_entries.rs:373 — biome_js_analyze::lint::nursery::use_object_from_entries::reduce_entry has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_analyze::lint::nursery::use_object_from_entries::loop_object_statement (cyclomatic 20) crates/biome_js_analyze/src/lint/nursery/use_object_from_entries.rs:652 — biome_js_analyze::lint::nursery::use_object_from_entries::loop_object_statement has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • + 33 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×58
  • Duplicated block (6 lines × 2) crates/biome_cli/src/commands/inspect/config/configuration.rs:422 — crates/biome_cli/src/commands/inspect/config/configuration.rs:422-427 | crates/biome_cli/src/commands/inspect/config/configuration.rs:448-453 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/commands/inspect/config/configuration.rs:422` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_formatter_test/src/snapshot_builder.rs:51 — crates/biome_formatter_test/src/snapshot_builder.rs:51-56 | crates/biome_formatter_test/src/snapshot_builder.rs:200-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_formatter_test/src/snapshot_builder.rs:57` calls `unwrap` and `crates/biome_formatter_test/src/snapshot_builder.rs:207` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/biome_glob/src/lib.rs:375 — crates/biome_glob/src/lib.rs:375-380 | crates/biome_rule_options/src/shared/restricted_regex.rs:84-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_glob/src/lib.rs:375` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:352 — crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:352-357 | crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_for_delimiter.rs:134-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:352` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:157 — crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:157-162 | crates/biome_js_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:147-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:244 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:244-249 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:249-254 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs` and `crates/biome_js_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:244` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_html_parser/src/syntax/svelte.rs:512 — crates/biome_html_parser/src/syntax/svelte.rs:512-519 | crates/biome_html_parser/src/syntax/svelte.rs:782-787 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/syntax/svelte.rs:512` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_html_syntax/src/attribute_ext.rs:210 — crates/biome_html_syntax/src/attribute_ext.rs:210-215 | crates/biome_html_syntax/src/attribute_ext.rs:421-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_syntax/src/attribute_ext.rs:210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_html_syntax/src/attribute_ext.rs:209` calls `and_then`, `arg` and `crates/biome_html_syntax/src/attribute_ext.rs:420` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/biome_html_syntax/src/attribute_ext.rs:219 — crates/biome_html_syntax/src/attribute_ext.rs:219-224 | crates/biome_html_syntax/src/attribute_ext.rs:430-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_syntax/src/attribute_ext.rs:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_html_syntax/src/attribute_ext.rs:215 — crates/biome_html_syntax/src/attribute_ext.rs:215-220 | crates/biome_html_syntax/src/attribute_ext.rs:464-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_syntax/src/attribute_ext.rs:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_html_syntax/src/attribute_ext.rs:265 — crates/biome_html_syntax/src/attribute_ext.rs:265-270 | crates/biome_html_syntax/src/attribute_ext.rs:426-431 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_syntax/src/attribute_ext.rs:265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/ast_utils.rs:41 — crates/biome_js_analyze/src/ast_utils.rs:41-46 | crates/biome_js_analyze/src/ast_utils.rs:61-66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/ast_utils.rs:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:131 — crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:131-136 | crates/biome_js_analyze/src/lint/nursery/no_null.rs:146-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:131` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_playwright_missing_await.rs:250 — crates/biome_js_analyze/src/lint/correctness/no_playwright_missing_await.rs:250-255 | crates/biome_js_analyze/src/lint/correctness/no_playwright_missing_await.rs:281-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/correctness/use_is_nan.rs:189 — crates/biome_js_analyze/src/lint/correctness/use_is_nan.rs:189-195 | crates/biome_js_analyze/src/lint/suspicious/use_is_array.rs:106-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/use_is_nan.rs:189` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:379 — crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:379-385 | crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:1084-1089 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_await_in_promise_methods.rs:134 — crates/biome_js_analyze/src/lint/nursery/no_await_in_promise_methods.rs:134-139 | crates/biome_js_analyze/src/lint/nursery/no_useless_date_get_time.rs:141-146 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_await_in_promise_methods.rs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:687 — crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:687-692 | crates/biome_js_analyze/src/utils/indexed_collection.rs:61-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:687` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:587 — crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:587-592 | crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs:181-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/style/use_naming_convention.rs:1123 — crates/biome_js_analyze/src/lint/style/use_naming_convention.rs:1123-1128 | crates/biome_js_analyze/src/lint/style/use_naming_convention.rs:1239-1244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_naming_convention.rs:1123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_loop_func.rs:206 — crates/biome_js_analyze/src/lint/suspicious/no_loop_func.rs:206-211 | crates/biome_js_analyze/src/react/hooks.rs:56-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_loop_func.rs:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `closure` to `&biome_js_semantic::Closure` in one and `&Closure` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) crates/biome_js_type_info/src/local_inference.rs:337 — crates/biome_js_type_info/src/local_inference.rs:337-342 | crates/biome_js_type_info/src/local_inference.rs:1017-1022 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/local_inference.rs:337` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `decl` to `&AnyJsExportDefaultDeclaration` in one and `&JsClassExpression` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_type_info/src/local_inference.rs:336` calls `JsClassExportDefaultDeclaration` and `crates/biome_js_type_info/src/local_inference.rs:1016` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/biome_js_type_info/src/return_type_relation.rs:577 — crates/biome_js_type_info/src/return_type_relation.rs:577-582 | crates/biome_js_type_info/src/return_type_relation.rs:584-589 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:312 — crates/biome_markdown_parser/src/syntax/list.rs:312-317 | crates/biome_markdown_parser/src/syntax/list.rs:3396-3402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/syntax/list.rs:312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) crates/biome_module_graph/src/db/type_inference/expressions.rs:2195 — crates/biome_module_graph/src/db/type_inference/expressions.rs:2195-2200 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2335-2340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/expressions.rs:2195` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 33 more in this group — see findings.md.
D2 · Cognitive Complexity · biome_markdown_parser · ×54
  • biome_markdown_parser::syntax::parse_any_block_with_indent_code_policy (cognitive 105) crates/biome_markdown_parser/src/syntax/mod.rs:331 — biome_markdown_parser::syntax::parse_any_block_with_indent_code_policy has cognitive complexity 105 (threshold 15). Drivers by points: if/else 45 (80 pts), boolean chains 20, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::list::parse_first_line_blocks (cognitive 68) crates/biome_markdown_parser/src/syntax/list.rs:2208 — biome_markdown_parser::syntax::list::parse_first_line_blocks has cognitive complexity 68 (threshold 15). Drivers by points: if/else 27 (42 pts), boolean chains 20, loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::list::classify_blank_line_in_quote (cognitive 63) crates/biome_markdown_parser/src/syntax/list.rs:3283 — biome_markdown_parser::syntax::list::classify_blank_line_in_quote has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (51 pts), boolean chains 7, loops 3 (5 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_markdown_parser::syntax::link_block::skip_destination_tokens (cognitive 56) crates/biome_markdown_parser/src/syntax/link_block.rs:233 — biome_markdown_parser::syntax::link_block::skip_destination_tokens has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (44 pts), loops 3 (5 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_markdown_parser::syntax::list::check_continuation_indent (cognitive 51) crates/biome_markdown_parser/src/syntax/list.rs:2733 — biome_markdown_parser::syntax::list::check_continuation_indent has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (42 pts), boolean chains 9 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::inline::parse_inline_item_list_until_impl (cognitive 50) crates/biome_markdown_parser/src/syntax/inline/mod.rs:79 — biome_markdown_parser::syntax::inline::parse_inline_item_list_until_impl has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (41 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::inline::emphasis::match_delimiters (cognitive 50) crates/biome_markdown_parser/src/syntax/inline/emphasis.rs:456 — biome_markdown_parser::syntax::inline::emphasis::match_delimiters has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (33 pts), boolean chains 9, loops 3 (8 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::inline::parse_any_inline (cognitive 48) crates/biome_markdown_parser/src/syntax/inline/mod.rs:255 — biome_markdown_parser::syntax::inline::parse_any_inline has cognitive complexity 48 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 6 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::thematic_break_block::is_thematic_break_pattern (cognitive 46) crates/biome_markdown_parser/src/syntax/thematic_break_block.rs:46 — biome_markdown_parser::syntax::thematic_break_block::is_thematic_break_pattern has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 17, loops 4 (5 pts), match/switch 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::parse_inline_item_list_with_task_list_item (cognitive 44) crates/biome_markdown_parser/src/syntax/mod.rs:1510 — biome_markdown_parser::syntax::parse_inline_item_list_with_task_list_item has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 9, loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::inline::emphasis::collect_delimiters (cognitive 44) crates/biome_markdown_parser/src/syntax/inline/emphasis.rs:327 — biome_markdown_parser::syntax::inline::emphasis::collect_delimiters has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 9, loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::inline::emphasis::parse_emphasis_from_context (cognitive 44) crates/biome_markdown_parser/src/syntax/inline/emphasis.rs:644 — biome_markdown_parser::syntax::inline::emphasis::parse_emphasis_from_context has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 10, loops 3 (4 pts), match/switch 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::list::classify_blank_line (cognitive 42) crates/biome_markdown_parser/src/syntax/list.rs:3184 — biome_markdown_parser::syntax::list::classify_blank_line has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::to_html::strip_quote_prefixes (cognitive 39) crates/biome_markdown_parser/src/to_html.rs:286 — biome_markdown_parser::to_html::strip_quote_prefixes has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (29 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_markdown_parser::syntax::inline::links::parse_inline_link_destination_tokens (cognitive 36) crates/biome_markdown_parser/src/syntax/inline/links.rs:679 — biome_markdown_parser::syntax::inline::links::parse_inline_link_destination_tokens has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_markdown_parser::syntax::list::parse_continuation_block (cognitive 33) crates/biome_markdown_parser/src/syntax/list.rs:2935 — biome_markdown_parser::syntax::list::parse_continuation_block has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::header::parse_trailing_hashes (cognitive 31) crates/biome_markdown_parser/src/syntax/header.rs:383 — biome_markdown_parser::syntax::header::parse_trailing_hashes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::header::header_content_source_len (cognitive 30) crates/biome_markdown_parser/src/syntax/header.rs:229 — biome_markdown_parser::syntax::header::header_content_source_len has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_markdown_parser::syntax::inline::links::collect_link_text (cognitive 30) crates/biome_markdown_parser/src/syntax/inline/links.rs:526 — biome_markdown_parser::syntax::inline::links::collect_link_text has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::link_block::is_valid_link_definition_lookahead (cognitive 29) crates/biome_markdown_parser/src/syntax/link_block.rs:85 — biome_markdown_parser::syntax::link_block::is_valid_link_definition_lookahead has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • biome_markdown_parser::syntax::list::next_quoted_content_continues_same_list (cognitive 29) crates/biome_markdown_parser/src/syntax/list.rs:1787 — biome_markdown_parser::syntax::list::next_quoted_content_continues_same_list has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::thematic_break_block::parse_thematic_break_parts (cognitive 27) crates/biome_markdown_parser/src/syntax/thematic_break_block.rs:185 — biome_markdown_parser::syntax::thematic_break_block::parse_thematic_break_parts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::scan_newline_in_inline_list (cognitive 24) crates/biome_markdown_parser/src/syntax/mod.rs:1781 — biome_markdown_parser::syntax::scan_newline_in_inline_list has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 8 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::textual_looks_like_list_marker (cognitive 24) crates/biome_markdown_parser/src/syntax/mod.rs:2095 — biome_markdown_parser::syntax::textual_looks_like_list_marker has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_parser::syntax::list::parse_bullet (cognitive 24) crates/biome_markdown_parser/src/syntax/list.rs:891 — biome_markdown_parser::syntax::list::parse_bullet has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • + 29 more in this group — see findings.md.
D17 · Explicit Debt · FixmeComment · ×51
  • FixmeComment crates/biome_wasm/build.rs:18 — // FIXME: a lot of this code is duplicated in xtask/codegen/src/generate_bindings.rs — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_unicode_table/src/bytes.rs:116 — // FIXME: Should we ignore the first ascii control chars which are nearly never seen instead of returning Err? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_service/src/diagnostics.rs:725 — // FIXME: This really needs proper diagnostics — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_rowan/src/arc.rs:184 — // FIXME(bholley): Use the updated comment when [2] is merged. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_resolver/src/lib.rs:810 — // FIXME: This is an incomplete approximation of how resolving inside — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_package/src/node_semver/range.tests.rs:379 — // FIXME: The following test cases were supported by node_semver, but are — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_module_graph/src/js_module_info/visitor.rs:187 — // FIXME: We may need to implement this if we want to fully — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_parser/src/lexer/mod.rs:1088 — // FIXME: This should use ID_Continue, not XID_Continue — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/call-expression.ts:19 — // FIXME: ((a?.b!).c) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/call-expression.ts:29 — // FIXME: ((a?.b!).c) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/call-expression.ts:28 — // FIXME: ((a?.b)!.c) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:2 — // FIXME: new (a?.b)! (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:3 — // FIXME: new (a?.b!) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:5 — // FIXME: new (a.b?.c)! (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:6 — // FIXME: new (a.b?.c!) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:9 — // FIXME: new (a?.b.c)! (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:10 — // FIXME: new (a?.b.c!) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:31 — // FIXME: new ((a?.()).b)! (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:32 — // FIXME: new ((a?.()).b!) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:33 — // FIXME: new ((a?.())!.b) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:34 — // FIXME: new ((a?.()!).b) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:35 — // FIXME: new ((a!?.()).b) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:38 — // FIXME: new (a?.())! (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:39 — // FIXME: new (a?.()!) (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/biome_js_formatter/tests/specs/prettier/typescript/chain-expression/new-expression.ts:41 — // FIXME: new (a.b.c?.())! (); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 26 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×48
  • Duplicated block (5 lines × 2) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:795 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:795-799 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1309-1313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:795` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_deserialize/src/json.rs:332 — crates/biome_deserialize/src/json.rs:332-336 | crates/biome_js_syntax/src/unescape.rs:108-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_deserialize/src/json.rs:332` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_deserialize/src/json.rs:329` calls `EscapedUnicode` and `crates/biome_js_syntax/src/unescape.rs:105` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_astro_set_html_directive.rs:54 — crates/biome_html_analyze/src/lint/nursery/no_astro_set_html_directive.rs:54-59 | crates/biome_html_analyze/src/lint/nursery/use_astro_client_only_directive_value.rs:57-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:138 — crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:138-142 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:140-145 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs` and `crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_implicit_coercions.rs:404 — crates/biome_js_analyze/src/lint/complexity/no_implicit_coercions.rs:404-408 | crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:131-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_implicit_coercions.rs:404` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/complexity/use_array_find.rs:62 — crates/biome_js_analyze/src/lint/complexity/use_array_find.rs:62-66 | crates/biome_js_analyze/src/lint/correctness/no_playwright_missing_await.rs:251-256 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:895 — crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:895-899 | crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:906-911 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/correctness/use_qwik_method_usage.rs:175 — crates/biome_js_analyze/src/lint/correctness/use_qwik_method_usage.rs:175-179 | crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:224-228 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/use_qwik_method_usage.rs:175` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:377 — crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:377-381 | crates/biome_js_analyze/src/lint/suspicious/use_array_sort_compare.rs:62-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_object_constructor.rs:149 — crates/biome_js_analyze/src/lint/nursery/no_object_constructor.rs:149-153 | crates/biome_js_analyze/src/lint/nursery/no_zero_fractions.rs:266-270 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_object_constructor.rs:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:291 — crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:291-295 | crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:300-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/style/use_shorthand_assign.rs:156 — crates/biome_js_analyze/src/lint/style/use_shorthand_assign.rs:156-160 | crates/biome_js_analyze/src/lint/suspicious/no_misrefactored_shorthand_assign.rs:142-146 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_shorthand_assign.rs:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:235 — crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:235-239 | crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:241-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:235` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_js_formatter/src/js/module/export_from_clause.rs:28 — crates/biome_js_formatter/src/js/module/export_from_clause.rs:28-32 | crates/biome_js_formatter/src/ts/declarations/import_equals_declaration.rs:26-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/ts/declarations/import_equals_declaration.rs:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_formatter/src/js/module/export_from_clause.rs:24` calls `Some`, `format`, `space` and `crates/biome_js_formatter/src/ts/declarations/import_equals_declaration.rs:24` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) crates/biome_js_formatter/src/js/module/export_named_from_specifier.rs:23 — crates/biome_js_formatter/src/js/module/export_named_from_specifier.rs:23-28 | crates/biome_js_formatter/src/ts/bindings/type_parameter.rs:19-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/module/export_named_from_specifier.rs:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:146 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:146-152 | crates/biome_markdown_formatter/src/quote.rs:245-249 — before extracting anything, compare `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs` and `crates/biome_markdown_formatter/src/quote.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) crates/biome_migrate/src/analyzers/includes.rs:31 — crates/biome_migrate/src/analyzers/includes.rs:31-39 | crates/biome_migrate/src/analyzers/organize_imports.rs:29-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_migrate/src/analyzers/includes.rs:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_module_graph/src/db/type_inference/imports.rs:146 — crates/biome_module_graph/src/db/type_inference/imports.rs:146-150 | crates/biome_module_graph/src/db/type_inference/imports.rs:926-930 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/imports.rs:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:249 — crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:249-253 | crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:302-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:249` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_rowan/src/syntax/token.rs:296 — crates/biome_rowan/src/syntax/token.rs:296-300 | crates/biome_rowan/src/syntax/token.rs:327-331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:136 — crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:136-140 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:442-451 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:442` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/biome_grit_parser/src/lib.rs:107 — crates/biome_grit_parser/src/lib.rs:107-111 | crates/biome_markdown_parser/src/lib.rs:167-171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `parse` to `GritParse` in one and `MarkdownParse` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) crates/biome_html_formatter/src/context.rs:445 — crates/biome_html_formatter/src/context.rs:445-449 | crates/biome_markdown_formatter/src/context.rs:222-226 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/biome_js_formatter/src/ts/lists/index_signature_modifier_list.rs:12 — crates/biome_js_formatter/src/ts/lists/index_signature_modifier_list.rs:12-16 | crates/biome_js_formatter/src/ts/lists/property_parameter_modifier_list.rs:11-15 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&TsIndexSignatureModifierList` in one and `&TsPropertyParameterModifierList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) crates/biome_js_runtime/src/ast.rs:266 — crates/biome_js_runtime/src/ast.rs:266-271 | crates/biome_js_runtime/src/token.rs:41-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • + 23 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×44
  • Duplicated block (14 lines × 2) crates/biome_css_analyze/src/lib.rs:231 — crates/biome_css_analyze/src/lib.rs:231-244 | crates/biome_js_analyze/src/lib.rs:243-256 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lib.rs:231` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:76 — crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:76-89 | crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:118-131 — before extracting anything, compare `crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs` and `crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) crates/biome_css_analyze/src/services/semantic.rs:121 — crates/biome_css_analyze/src/services/semantic.rs:121-134 | crates/biome_js_analyze/src/services/semantic.rs:158-171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `event` to `&WalkEvent<CssSyntaxNode>` in one and `&WalkEvent<JsSyntaxNode>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) crates/biome_css_formatter/src/css/auxiliary/container_at_rule_declarator.rs:15 — crates/biome_css_formatter/src/css/auxiliary/container_at_rule_declarator.rs:15-28 | crates/biome_css_formatter/src/tailwind/statements/source_at_rule.rs:10-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/container_at_rule_declarator.rs:15` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssContainerAtRuleDeclarator` in one and `&TwSourceAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) crates/biome_embeds/src/visitor.rs:99 — crates/biome_embeds/src/visitor.rs:99-112 | crates/biome_service/src/embed/html.rs:107-120 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) crates/biome_formatter/src/lib.rs:1242 — crates/biome_formatter/src/lib.rs:1242-1255 | crates/biome_formatter/src/lib.rs:1269-1282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_formatter/src/lib.rs:1242` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:136 — crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:136-149 | crates/biome_graphql_analyze/src/utils.rs:94-107 — before extracting anything, compare `crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs` and `crates/biome_graphql_analyze/src/utils.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `GraphqlVariableDefinition` in one and `N` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:150` calls `variable_name` and `crates/biome_graphql_analyze/src/utils.rs:108` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) crates/biome_grit_formatter/src/grit/lists/list_pattern_list.rs:13 — crates/biome_grit_formatter/src/grit/lists/list_pattern_list.rs:13-26 | crates/biome_json_formatter/src/json/lists/array_element_list.rs:32-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/lists/list_pattern_list.rs:13` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut GritFormatter` in one and `&mut JsonFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) crates/biome_grit_patterns/src/grit_resolved_pattern.rs:164 — crates/biome_grit_patterns/src/grit_resolved_pattern.rs:164-177 | crates/biome_grit_patterns/src/grit_resolved_pattern.rs:257-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/grit_resolved_pattern.rs:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:143 — crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:143-156 | crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:154-167 — before extracting anything, compare `crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs` and `crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&AnyHtmlTagElement` in one and `&AnyJsxElement` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) crates/biome_html_analyze/src/lint/correctness/no_restricted_elements.rs:91 — crates/biome_html_analyze/src/lint/correctness/no_restricted_elements.rs:91-104 | crates/biome_js_analyze/src/lint/correctness/no_restricted_elements.rs:99-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/correctness/no_restricted_elements.rs:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_misplaced_list_elements.rs:151 — crates/biome_html_analyze/src/lint/nursery/no_misplaced_list_elements.rs:151-164 | crates/biome_js_analyze/src/lint/nursery/no_misplaced_list_elements.rs:121-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:90 — crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:90-103 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:90-103 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs` and `crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) crates/biome_html_parser/src/syntax/vue.rs:98 — crates/biome_html_parser/src/syntax/vue.rs:98-111 | crates/biome_html_parser/src/syntax/vue.rs:127-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/biome_js_analyze/src/frameworks/mod.rs:24 — crates/biome_js_analyze/src/frameworks/mod.rs:24-37 | crates/biome_js_analyze/src/react.rs:219-232 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/frameworks/mod.rs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:565 — crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:565-578 | crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:608-621 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/biome_js_analyze/src/lint/style/use_export_type.rs:340 — crates/biome_js_analyze/src/lint/style/use_export_type.rs:340-353 | crates/biome_js_analyze/src/lint/style/use_export_type.rs:374-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_export_type.rs:340` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:625 — crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:625-638 | crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:708-721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:622` calls `Ok`, `value_token` and `crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:707` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) crates/biome_js_parser/src/syntax/expr.rs:1096 — crates/biome_js_parser/src/syntax/expr.rs:1096-1109 | crates/biome_js_parser/src/syntax/function.rs:1491-1504 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_parser/src/syntax/expr.rs:1096` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/biome_js_parser/src/syntax/program.rs:108 — crates/biome_js_parser/src/syntax/program.rs:108-121 | crates/biome_js_parser/src/syntax/program.rs:135-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_parser/src/syntax/program.rs:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/biome_js_semantic/src/events.rs:1231 — crates/biome_js_semantic/src/events.rs:1231-1244 | crates/biome_js_semantic/src/events.rs:1245-1258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_semantic/src/events.rs:1231` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/biome_js_syntax/src/parentheses/tstype.rs:68 — crates/biome_js_syntax/src/parentheses/tstype.rs:68-81 | crates/biome_js_syntax/src/parentheses/tstype.rs:124-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) crates/biome_js_transform/src/lib.rs:56 — crates/biome_js_transform/src/lib.rs:56-69 | crates/biome_migrate/src/lib.rs:63-76 — before extracting anything, compare `crates/biome_js_transform/src/lib.rs` and `crates/biome_migrate/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_transform/src/lib.rs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_migrate/src/lib.rs:61` calls `insert_service`, `IsRoot` and `crates/biome_js_transform/src/lib.rs:54` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:1248 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1248-1261 | crates/biome_js_type_info/src/format_type_info.rs:1131-1144 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut biome_formatter::formatter::Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) crates/biome_js_type_info/src/format_type_info.rs:752 — crates/biome_js_type_info/src/format_type_info.rs:752-765 | crates/biome_js_type_info/src/format_type_info.rs:958-971 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 19 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×40
  • Edited copy of a member (15 corresponding lines) crates/biome_js_analyze/src/frameworks/mod.rs:113 — crates/biome_js_analyze/src/frameworks/mod.rs:113-127 | crates/biome_js_analyze/src/react.rs:301-323 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs:15 — crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs:15-29 | crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs:38-52 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_runtime/src/kind_set.rs:300 — crates/biome_js_runtime/src/kind_set.rs:300-314 | crates/biome_js_runtime/src/kind_set.rs:373-387 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_unnecessary_string_trim.rs:157 — crates/biome_js_analyze/src/lint/nursery/no_unnecessary_string_trim.rs:157-171 | crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:131-149 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_dynamic_delete.rs:179 — crates/biome_js_analyze/src/lint/nursery/no_dynamic_delete.rs:179-193 | crates/biome_js_analyze/src/lint/nursery/no_process_exit.rs:72-90 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_cli/src/service/unix.rs:82 — crates/biome_cli/src/service/unix.rs:82-96 | crates/biome_cli/src/service/windows.rs:31-45 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_html_analyze/src/lint/nursery/use_tailwind_sorted_classes.rs:67 — crates/biome_html_analyze/src/lint/nursery/use_tailwind_sorted_classes.rs:67-82 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_sorted_classes.rs:78-92 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_semantic/src/semantic_model/reference.rs:22 — crates/biome_js_semantic/src/semantic_model/reference.rs:22-36 | crates/biome_js_semantic/src/semantic_model/reference.rs:38-52 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:184 — crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:184-198 | crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:233-247 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_runtime/src/ast.rs:295 — crates/biome_js_runtime/src/ast.rs:295-309 | crates/biome_js_runtime/src/ast.rs:363-377 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_service/src/settings.rs:1143 — crates/biome_service/src/settings.rs:1143-1160 | crates/biome_service/src/settings.rs:1261-1275 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_analyze/src/ast_utils.rs:142 — crates/biome_js_analyze/src/ast_utils.rs:142-159 | crates/biome_js_analyze/src/lint/nursery/no_accidental_bitwise_operators.rs:300-314 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_module_graph/src/js_module_info/flow/builder.rs:105 — crates/biome_module_graph/src/js_module_info/flow/builder.rs:105-119 | crates/biome_module_graph/src/js_module_info/flow/builder.rs:252-267 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_embeds/src/data.rs:229 — crates/biome_embeds/src/data.rs:229-250 | crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_router_link_tag_prop.rs:160-174 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_private_imports.rs:279 — crates/biome_js_analyze/src/lint/correctness/no_private_imports.rs:279-293 | crates/biome_js_analyze/src/lint/correctness/no_unresolved_imports.rs:258-272 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) xtask/codegen/src/generate_global_types/compare.rs:399 — xtask/codegen/src/generate_global_types/compare.rs:399-419 | xtask/codegen/src/generate_global_types/compare.rs:426-440 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_formatter/src/comments.rs:1281 — crates/biome_formatter/src/comments.rs:1281-1295 | crates/biome_formatter/src/comments.rs:1335-1349 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_aria_hidden_on_focusable.rs:103 — crates/biome_html_analyze/src/lint/a11y/no_aria_hidden_on_focusable.rs:103-117 | crates/biome_js_analyze/src/lint/a11y/no_aria_hidden_on_focusable.rs:123-137 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_html_parser/src/syntax/astro.rs:112 — crates/biome_html_parser/src/syntax/astro.rs:112-128 | crates/biome_html_parser/src/syntax/svelte.rs:1493-1507 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_unnecessary_string_trim.rs:308 — crates/biome_js_analyze/src/lint/nursery/no_unnecessary_string_trim.rs:308-322 | crates/biome_js_analyze/src/lint/nursery/use_global_regex_in_match_all.rs:202-216 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:507 — crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:507-521 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:722-736 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_css_parser/src/syntax/scss/at_rule/function_at_rule.rs:24 — crates/biome_css_parser/src/syntax/scss/at_rule/function_at_rule.rs:24-38 | crates/biome_css_parser/src/syntax/scss/at_rule/mixin_at_rule.rs:23-37 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_js_parser/src/syntax/stmt.rs:1703 — crates/biome_js_parser/src/syntax/stmt.rs:1703-1717 | crates/biome_js_parser/src/syntax/stmt.rs:1720-1737 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_package/src/node_js_package/tsconfig_json.rs:67 — crates/biome_package/src/node_js_package/tsconfig_json.rs:67-81 | crates/biome_package/src/node_js_package/turbo_json.rs:140-154 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_vue_undeclared_directives.rs:138 — crates/biome_html_analyze/src/lint/nursery/no_vue_undeclared_directives.rs:138-152 | crates/biome_js_analyze/src/lint/nursery/no_dangling_underscore.rs:115-132 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×38
  • Edited copy of a member (11 corresponding lines) crates/biome_js_analyze/src/lint/complexity/no_useless_continue.rs:108 — crates/biome_js_analyze/src/lint/complexity/no_useless_continue.rs:108-118 | crates/biome_js_analyze/src/lint/suspicious/no_debugger.rs:69-81 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_grit_patterns/src/grit_binding.rs:76 — crates/biome_grit_patterns/src/grit_binding.rs:76-87 | crates/biome_grit_patterns/src/grit_binding.rs:202-212 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_alt_text.rs:163 — crates/biome_html_analyze/src/lint/a11y/use_alt_text.rs:163-178 | crates/biome_js_analyze/src/lint/a11y/use_alt_text.rs:157-167 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_yaml_parser/src/lexer/mod.rs:912 — crates/biome_yaml_parser/src/lexer/mod.rs:912-922 | crates/biome_yaml_parser/src/lexer/mod.rs:935-948 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:893 — crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:893-903 | crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:911-923 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_markdown_parser/src/syntax/fenced_code_block.rs:253 — crates/biome_markdown_parser/src/syntax/fenced_code_block.rs:253-270 | crates/biome_markdown_parser/src/syntax/fenced_code_block.rs:278-288 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_js_parser/src/syntax/typescript/types.rs:230 — crates/biome_js_parser/src/syntax/typescript/types.rs:230-246 | crates/biome_js_parser/src/syntax/typescript/types.rs:2229-2239 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_service/src/file_handlers/html.rs:790 — crates/biome_service/src/file_handlers/html.rs:790-800 | crates/biome_service/src/file_handlers/yaml.rs:444-456 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_css_syntax/src/property_syntax/matcher.rs:250 — crates/biome_css_syntax/src/property_syntax/matcher.rs:250-260 | crates/biome_css_syntax/src/property_syntax/matcher.rs:390-401 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_tailwind_logic/src/syntax_service.rs:697 — crates/biome_tailwind_logic/src/syntax_service.rs:697-707 | crates/biome_tailwind_logic/src/syntax_service.rs:715-725 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_css_analyze/src/lint/correctness/no_unmatchable_anb_selector.rs:164 — crates/biome_css_analyze/src/lint/correctness/no_unmatchable_anb_selector.rs:164-175 | crates/biome_js_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:178-188 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_js_parser/src/syntax/typescript/types.rs:1210 — crates/biome_js_parser/src/syntax/typescript/types.rs:1210-1220 | crates/biome_js_parser/src/syntax/typescript/types.rs:1478-1489 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_css_syntax/src/scss_ext/map.rs:57 — crates/biome_css_syntax/src/scss_ext/map.rs:57-67 | crates/biome_css_syntax/src/scss_ext/map.rs:83-94 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:274 — crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:274-285 | crates/biome_js_analyze/src/lint/nursery/use_vue_separate_static_class.rs:101-111 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_extend_native.rs:145 — crates/biome_js_analyze/src/lint/nursery/no_extend_native.rs:145-155 | crates/biome_js_analyze/src/lint/nursery/no_implied_eval.rs:237-249 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_tailwind_parser/src/syntax/css_value.rs:265 — crates/biome_tailwind_parser/src/syntax/css_value.rs:265-276 | crates/biome_tailwind_parser/src/syntax/css_value.rs:387-397 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:547 — crates/biome_html_parser/src/syntax/svelte.rs:547-557 | crates/biome_html_parser/src/syntax/svelte.rs:559-569 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_html_syntax/src/element_ext.rs:41 — crates/biome_html_syntax/src/element_ext.rs:41-51 | crates/biome_html_syntax/src/element_ext.rs:53-63 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_yaml_parser/src/parser/flow.rs:91 — crates/biome_yaml_parser/src/parser/flow.rs:91-101 | crates/biome_yaml_parser/src/parser/flow.rs:103-113 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs:68 — crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs:68-78 | crates/biome_css_parser/src/syntax/scss/identifiers/module_member_access.rs:51-67 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_css_parser/src/syntax/value/dimension.rs:52 — crates/biome_css_parser/src/syntax/value/dimension.rs:52-77 | crates/biome_tailwind_parser/src/syntax/css_value.rs:165-175 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_js_analyze/src/lint/a11y/use_key_with_mouse_events.rs:112 — crates/biome_js_analyze/src/lint/a11y/use_key_with_mouse_events.rs:112-122 | crates/biome_js_analyze/src/lint/a11y/use_key_with_mouse_events.rs:124-134 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_formatter/src/comments/map.rs:493 — crates/biome_formatter/src/comments/map.rs:493-503 | crates/biome_formatter/src/comments/map.rs:505-515 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_js_syntax/src/parentheses/expression.rs:800 — crates/biome_js_syntax/src/parentheses/expression.rs:800-813 | crates/biome_js_syntax/src/parentheses/tstype.rs:52-62 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/biome_react_compiler/src/convert_ast/expressions.rs:925 — crates/biome_react_compiler/src/convert_ast/expressions.rs:925-935 | crates/biome_react_compiler/src/convert_ast/jsx.rs:190-200 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 13 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×37
  • Edited copy of a member (17 corresponding lines) crates/biome_grit_patterns/src/grit_built_in_functions.rs:506 — crates/biome_grit_patterns/src/grit_built_in_functions.rs:506-523 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:545-561 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_single_promise_in_promise_methods.rs:361 — crates/biome_js_analyze/src/lint/nursery/no_single_promise_in_promise_methods.rs:361-377 | crates/biome_js_analyze/src/lint/nursery/no_svelte_useless_derived_by.rs:260-277 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_css_analyze/src/services/semantic.rs:79 — crates/biome_css_analyze/src/services/semantic.rs:79-95 | crates/biome_js_analyze/src/services/semantic.rs:106-132 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_rule_options/src/organize_imports/import_groups.rs:294 — crates/biome_rule_options/src/organize_imports/import_groups.rs:294-310 | crates/biome_rule_options/src/organize_imports/import_groups.rs:510-528 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:1247 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1247-1263 | crates/biome_js_type_info/src/format_type_info.rs:1130-1146 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_js_analyze/src/frameworks/playwright.rs:421 — crates/biome_js_analyze/src/frameworks/playwright.rs:421-438 | crates/biome_js_analyze/src/frameworks/playwright.rs:444-460 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:287 — crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:287-305 | crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:414-430 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_header_scope.rs:76 — crates/biome_html_analyze/src/lint/a11y/no_header_scope.rs:76-92 | crates/biome_js_analyze/src/lint/a11y/no_header_scope.rs:74-93 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_json_analyze/src/lint/nursery/use_package_json_valid_cpu.rs:208 — crates/biome_json_analyze/src/lint/nursery/use_package_json_valid_cpu.rs:208-224 | crates/biome_json_analyze/src/lint/nursery/use_package_json_valid_license.rs:176-197 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_react_compiler/src/convert_ast/expressions.rs:984 — crates/biome_react_compiler/src/convert_ast/expressions.rs:984-1005 | crates/biome_react_compiler/src/convert_ast/modules.rs:557-573 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_grit_patterns/src/pattern_compiler/not_compiler.rs:19 — crates/biome_grit_patterns/src/pattern_compiler/not_compiler.rs:19-35 | crates/biome_grit_patterns/src/pattern_compiler/not_compiler.rs:44-60 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_html_analyze/src/lint/correctness/no_restricted_elements.rs:88 — crates/biome_html_analyze/src/lint/correctness/no_restricted_elements.rs:88-104 | crates/biome_js_analyze/src/lint/correctness/no_restricted_elements.rs:96-112 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_markdown_formatter/src/words.rs:449 — crates/biome_markdown_formatter/src/words.rs:449-465 | crates/biome_markdown_formatter/src/words.rs:467-483 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:60 — crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:60-77 | crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:293-309 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:108 — crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:108-129 | crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:352-368 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_markdown_parser/src/parser.rs:1275 — crates/biome_markdown_parser/src/parser.rs:1275-1298 | crates/biome_markdown_parser/src/syntax/link_block.rs:599-615 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_css_formatter/src/comments.rs:850 — crates/biome_css_formatter/src/comments.rs:850-866 | crates/biome_css_formatter/src/scss/auxiliary/variable_declaration.rs:191-209 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1029 — crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1029-1045 | crates/biome_tailwind_logic/src/class_category.rs:572-592 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:75 — crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:75-91 | crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:77-96 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_deserialize/src/impls.rs:23 — crates/biome_deserialize/src/impls.rs:23-39 | crates/biome_deserialize/src/impls.rs:67-83 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_markdown_parser/src/to_html.rs:1964 — crates/biome_markdown_parser/src/to_html.rs:1964-1980 | crates/biome_package/src/node_js_package/package_json.rs:369-389 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_graphql_parser/src/parser/definitions/fragment.rs:17 — crates/biome_graphql_parser/src/parser/definitions/fragment.rs:17-33 | crates/biome_graphql_parser/src/parser/definitions/operation.rs:111-129 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_cli/src/commands/inspect.rs:212 — crates/biome_cli/src/commands/inspect.rs:212-228 | crates/biome_cli/src/commands/mod.rs:912-935 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_css_formatter/src/css/auxiliary/list_of_component_values_expression.rs:16 — crates/biome_css_formatter/src/css/auxiliary/list_of_component_values_expression.rs:16-32 | crates/biome_css_formatter/src/scss/auxiliary/expression.rs:12-28 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/biome_css_analyze/src/fonts.rs:278 — crates/biome_css_analyze/src/fonts.rs:278-299 | crates/biome_css_syntax/src/property_syntax/matcher.rs:166-182 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×37
  • Duplicated block (13 lines × 2) crates/biome_css_analyze/src/lib.rs:268 — crates/biome_css_analyze/src/lib.rs:268-280 | crates/biome_js_analyze/src/lib.rs:266-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) crates/biome_css_formatter/src/css/auxiliary/list_of_component_values_expression.rs:17 — crates/biome_css_formatter/src/css/auxiliary/list_of_component_values_expression.rs:17-29 | crates/biome_css_formatter/src/scss/auxiliary/expression.rs:13-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/list_of_component_values_expression.rs:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssListOfComponentValuesExpression` in one and `&ScssExpression` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) crates/biome_css_formatter/src/css/auxiliary/nested_qualified_rule.rs:11 — crates/biome_css_formatter/src/css/auxiliary/nested_qualified_rule.rs:11-23 | crates/biome_css_formatter/src/css/auxiliary/qualified_rule.rs:11-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/nested_qualified_rule.rs:11` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssNestedQualifiedRule` in one and `&CssQualifiedRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) crates/biome_css_formatter/src/css/auxiliary/root.rs:11 — crates/biome_css_formatter/src/css/auxiliary/root.rs:11-23 | crates/biome_graphql_formatter/src/graphql/auxiliary/root.rs:10-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/root.rs:11` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut CssFormatter` in one and `&mut GraphqlFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) crates/biome_css_formatter/src/utils/string_utils.rs:263 — crates/biome_css_formatter/src/utils/string_utils.rs:263-275 | crates/biome_js_formatter/src/utils/string_utils.rs:336-348 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/utils/string_utils.rs:263` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_graphql_analyze/src/lib.rs:109 — crates/biome_graphql_analyze/src/lib.rs:109-121 | crates/biome_yaml_analyze/src/lib.rs:109-121 — before extracting anything, compare `crates/biome_graphql_analyze/src/lib.rs` and `crates/biome_yaml_analyze/src/lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/lib.rs:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_graphql_parser/src/parser/definitions/interface.rs:56 — crates/biome_graphql_parser/src/parser/definitions/interface.rs:56-68 | crates/biome_graphql_parser/src/parser/definitions/object.rs:45-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs:17 — crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs:17-29 | crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs:40-52 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs:17` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:110 — crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:110-122 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:118-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:174 — crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:174-186 | crates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rs:170-182 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_aria_props_for_role.rs:104 — crates/biome_html_analyze/src/lint/a11y/use_aria_props_for_role.rs:104-116 | crates/biome_js_analyze/src/lint/a11y/use_aria_props_for_role.rs:116-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/use_aria_props_for_role.rs:104` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:123 — crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:123-135 | crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:117-129 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs` and `crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_html_analyze/src/lint/nursery/use_tailwind_variables_shorthand.rs:84 — crates/biome_html_analyze/src/lint/nursery/use_tailwind_variables_shorthand.rs:84-96 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_variables_shorthand.rs:83-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) crates/biome_html_analyze/src/lint/security/use_iframe_sandbox.rs:62 — crates/biome_html_analyze/src/lint/security/use_iframe_sandbox.rs:62-74 | crates/biome_js_analyze/src/lint/security/use_iframe_sandbox.rs:82-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/security/use_iframe_sandbox.rs:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:918 — crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:918-930 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:896-908 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs` and `crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:918` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_js_formatter/src/comments.rs:955 — crates/biome_js_formatter/src/comments.rs:955-967 | crates/biome_js_formatter/src/comments.rs:1042-1054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) crates/biome_js_formatter/src/js/statements/break_statement.rs:15 — crates/biome_js_formatter/src/js/statements/break_statement.rs:15-27 | crates/biome_js_formatter/src/js/statements/continue_statement.rs:15-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/statements/break_statement.rs:15` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsBreakStatement` in one and `&JsContinueStatement` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) crates/biome_js_formatter/src/js/statements/if_statement.rs:28 — crates/biome_js_formatter/src/js/statements/if_statement.rs:28-40 | crates/biome_js_formatter/src/js/statements/while_statement.rs:21-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/statements/if_statement.rs:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:1270 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1270-1282 | crates/biome_js_type_info/src/format_type_info.rs:1156-1168 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut biome_formatter::formatter::Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) crates/biome_js_type_info/src/local_inference.rs:1048 — crates/biome_js_type_info/src/local_inference.rs:1048-1060 | crates/biome_js_type_info/src/local_inference.rs:1430-1442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/local_inference.rs:1048` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `decl` to `&JsFunctionDeclaration` in one and `&TsDeclareFunctionDeclaration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) crates/biome_module_graph/src/db/queries.rs:78 — crates/biome_module_graph/src/db/queries.rs:78-90 | crates/biome_module_graph/src/db/queries.rs:187-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/queries.rs:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_module_graph/src/format_module_graph.rs:54 — crates/biome_module_graph/src/format_module_graph.rs:54-66 | crates/biome_module_graph/src/format_module_graph.rs:608-620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/format_module_graph.rs:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_package/src/node_js_package/turbo_json.rs:197 — crates/biome_package/src/node_js_package/turbo_json.rs:197-209 | crates/biome_package/src/node_js_package/turbo_json.rs:213-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_package/src/node_js_package/turbo_json.rs:197` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/biome_react_compiler/src/convert_ast/expressions.rs:872 — crates/biome_react_compiler/src/convert_ast/expressions.rs:872-884 | crates/biome_react_compiler/src/convert_ast/modules.rs:384-396 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_react_compiler/src/convert_ast/expressions.rs:872` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `class` to `&JsClassExpression` in one and `&JsClassExportDefaultDeclaration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) crates/biome_service/src/db/mod.rs:586 — crates/biome_service/src/db/mod.rs:586-598 | crates/biome_service/src/db/mod.rs:1460-1472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×36
  • Duplicated block (16 lines × 2) crates/biome_cli/src/execute/migrate/eslint.rs:207 — crates/biome_cli/src/execute/migrate/eslint.rs:207-222 | crates/biome_cli/src/execute/migrate/stylelint.rs:138-153 — before extracting anything, compare `crates/biome_cli/src/execute/migrate/eslint.rs` and `crates/biome_cli/src/execute/migrate/stylelint.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint.rs:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_css_formatter/src/css/auxiliary/supports_and_condition.rs:10 — crates/biome_css_formatter/src/css/auxiliary/supports_and_condition.rs:10-25 | crates/biome_css_formatter/src/css/auxiliary/supports_or_condition.rs:10-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/supports_and_condition.rs:10` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssSupportsAndCondition` in one and `&CssSupportsOrCondition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) crates/biome_css_formatter/src/tailwind/statements/utility_at_rule.rs:10 — crates/biome_css_formatter/src/tailwind/statements/utility_at_rule.rs:10-25 | crates/biome_css_formatter/src/tailwind/statements/variant_at_rule.rs:10-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/tailwind/statements/utility_at_rule.rs:10` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&TwUtilityAtRule` in one and `&TwVariantAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) crates/biome_css_parser/src/syntax/mod.rs:136 — crates/biome_css_parser/src/syntax/mod.rs:136-151 | crates/biome_css_parser/src/syntax/mod.rs:210-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) crates/biome_graphql_analyze/src/lib.rs:125 — crates/biome_graphql_analyze/src/lib.rs:125-140 | crates/biome_yaml_analyze/src/lib.rs:125-140 — before extracting anything, compare `crates/biome_graphql_analyze/src/lib.rs` and `crates/biome_yaml_analyze/src/lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/lib.rs:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_graphql_formatter/src/graphql/extensions/schema_extension.rs:14 — crates/biome_graphql_formatter/src/graphql/extensions/schema_extension.rs:14-30 | crates/biome_grit_formatter/src/grit/auxiliary/language_declaration.rs:13-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/extensions/schema_extension.rs:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut GraphqlFormatter` in one and `&mut GritFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) crates/biome_grit_patterns/src/grit_context.rs:328 — crates/biome_grit_patterns/src/grit_context.rs:328-343 | crates/biome_grit_patterns/src/grit_context.rs:360-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/grit_context.rs:328` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_header_scope.rs:77 — crates/biome_html_analyze/src/lint/a11y/no_header_scope.rs:77-92 | crates/biome_js_analyze/src/lint/a11y/no_header_scope.rs:78-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/a11y/no_header_scope.rs:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_analyze/src/lint/a11y/no_header_scope.rs:75` calls `query`, `find_attribute_by_name` and `crates/biome_html_analyze/src/lint/a11y/no_header_scope.rs:76` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else.rs:191 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else.rs:191-206 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else_if.rs:245-260 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else.rs:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_on.rs:85 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_on.rs:85-100 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_on.rs:104-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_on.rs:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_on.rs:101` calls `VueVOnShorthandDirective` and `crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_on.rs:83` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_astro_set_html_directive.rs:72 — crates/biome_html_analyze/src/lint/nursery/no_astro_set_html_directive.rs:72-87 | crates/biome_js_analyze/src/lint/nursery/no_astro_set_html_directive.rs:69-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:112 — crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:112-127 | crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs:114-129 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs` and `crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:112` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_obsolete_tags.rs:75 — crates/biome_html_analyze/src/lint/nursery/no_obsolete_tags.rs:75-90 | crates/biome_js_analyze/src/lint/nursery/no_obsolete_tags.rs:106-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:168 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:168-183 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:178-193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_html_analyze/src/lint/nursery/use_control_label.rs:135 — crates/biome_html_analyze/src/lint/nursery/use_control_label.rs:135-150 | crates/biome_js_analyze/src/lint/nursery/use_control_label.rs:150-165 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) crates/biome_html_syntax/src/attribute_ext.rs:187 — crates/biome_html_syntax/src/attribute_ext.rs:187-202 | crates/biome_html_syntax/src/attribute_ext.rs:232-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_syntax/src/attribute_ext.rs:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:84 — crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:84-99 | crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:101-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) crates/biome_js_formatter/src/js/expressions/bigint_literal_expression.rs:20 — crates/biome_js_formatter/src/js/expressions/bigint_literal_expression.rs:20-35 | crates/biome_js_formatter/src/ts/types/bigint_literal_type.rs:19-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/expressions/bigint_literal_expression.rs:20` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_js_type_info/src/local_inference.rs:2444 — crates/biome_js_type_info/src/local_inference.rs:2444-2459 | crates/biome_js_type_info/src/local_inference.rs:2492-2507 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/local_inference.rs:2444` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:70 — crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:70-85 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:37-52 — before extracting anything, compare `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs` and `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:70` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:65 — crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:65-80 | crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs:62-77 — before extracting anything, compare `crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs` and `crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_markdown_parser/src/lexer/mod.rs:513 — crates/biome_markdown_parser/src/lexer/mod.rs:513-528 | crates/biome_markdown_parser/src/lexer/mod.rs:756-771 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/lexer/mod.rs:513` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:860 — crates/biome_markdown_parser/src/syntax/list.rs:860-875 | crates/biome_markdown_parser/src/syntax/list.rs:1280-1295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/syntax/list.rs:860` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1534 — crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1534-1549 | crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1589-1604 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1534` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1605` calls `has_unknown_members` and `crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1550` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) crates/biome_service/src/file_handlers/html.rs:661 — crates/biome_service/src/file_handlers/html.rs:661-676 | crates/biome_service/src/file_handlers/md.rs:386-401 — before extracting anything, compare `crates/biome_service/src/file_handlers/html.rs` and `crates/biome_service/src/file_handlers/md.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/html.rs:661` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 11 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×34
  • Edited copy of a member (9 corresponding lines) crates/biome_html_syntax/src/static_value.rs:31 — crates/biome_html_syntax/src/static_value.rs:31-39 | crates/biome_js_syntax/src/static_value.rs:32-41 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_playwright_unsafe_references.rs:465 — crates/biome_js_analyze/src/lint/nursery/no_playwright_unsafe_references.rs:465-478 | crates/biome_js_analyze/src/lint/nursery/no_playwright_unsafe_references.rs:484-492 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_package/src/license/expression.rs:199 — crates/biome_package/src/license/expression.rs:199-207 | crates/biome_package/src/license/expression.rs:210-218 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_vue_deprecated_destroyed_lifecycle.rs:206 — crates/biome_js_analyze/src/lint/nursery/no_vue_deprecated_destroyed_lifecycle.rs:206-214 | crates/biome_js_analyze/src/lint/nursery/use_vue_registered_component_name_casing.rs:239-250 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_object_constructor.rs:180 — crates/biome_js_analyze/src/lint/nursery/no_object_constructor.rs:180-188 | crates/biome_js_analyze/src/lint/nursery/use_simplified_boolean_return.rs:316-326 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_markdown_formatter/src/gfm/lists/table_cell_list.rs:8 — crates/biome_markdown_formatter/src/gfm/lists/table_cell_list.rs:8-16 | crates/biome_markdown_formatter/src/gfm/lists/table_delimiter_cell_list.rs:8-16 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_css_parser/src/syntax/scss/value/function.rs:43 — crates/biome_css_parser/src/syntax/scss/value/function.rs:43-56 | crates/biome_css_parser/src/syntax/scss/value/function.rs:73-81 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_package/src/node_js_package/tsconfig_json.rs:55 — crates/biome_package/src/node_js_package/tsconfig_json.rs:55-63 | crates/biome_package/src/node_js_package/turbo_json.rs:128-136 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_css_analyze/src/fonts.rs:265 — crates/biome_css_analyze/src/fonts.rs:265-273 | crates/biome_css_syntax/src/property_syntax/matcher.rs:153-161 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_grit_patterns/src/pattern_compiler/contains_compiler.rs:12 — crates/biome_grit_patterns/src/pattern_compiler/contains_compiler.rs:12-20 | crates/biome_grit_patterns/src/pattern_compiler/within_compiler.rs:12-20 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_js_parser/src/syntax/auxiliary.rs:29 — crates/biome_js_parser/src/syntax/auxiliary.rs:29-37 | crates/biome_js_parser/src/syntax/stmt.rs:510-523 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:217 — crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:217-225 | crates/biome_js_analyze/src/lint/suspicious/no_useless_regex_backrefs.rs:226-234 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_service/src/file_handlers/mod.rs:255 — crates/biome_service/src/file_handlers/mod.rs:255-263 | crates/biome_service/src/workspace/server.rs:257-267 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_json_analyze/src/lint/nursery/use_package_json_cpu.rs:57 — crates/biome_json_analyze/src/lint/nursery/use_package_json_cpu.rs:57-65 | crates/biome_json_analyze/src/lint/nursery/use_package_json_engines.rs:62-75 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_package/src/node_js_package/turbo_json.rs:118 — crates/biome_package/src/node_js_package/turbo_json.rs:118-126 | crates/biome_package/src/node_js_package/tsconfig_json.rs:45-53 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_cli/src/logging.rs:160 — crates/biome_cli/src/logging.rs:160-169 | crates/biome_diagnostics/src/diagnostic.rs:154-162 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_graphql_semantic/src/semantic_model/binding.rs:51 — crates/biome_graphql_semantic/src/semantic_model/binding.rs:51-59 | crates/biome_graphql_semantic/src/semantic_model/reference.rs:55-63 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_react_compiler/src/convert_ast/jsx.rs:159 — crates/biome_react_compiler/src/convert_ast/jsx.rs:159-167 | crates/biome_react_compiler/src/convert_ast/jsx.rs:274-282 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_css_semantic/src/semantic_model/db.rs:144 — crates/biome_css_semantic/src/semantic_model/db.rs:144-153 | crates/biome_js_analyze/src/lint/nursery/use_better_dom_traversing.rs:373-381 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_useless_qualifier.rs:382 — crates/biome_js_analyze/src/lint/nursery/no_useless_qualifier.rs:382-390 | crates/biome_migrate/src/analyzers/no_restriected_globals.rs:114-122 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_css_parser/src/syntax/declaration.rs:233 — crates/biome_css_parser/src/syntax/declaration.rs:233-241 | crates/biome_css_parser/src/syntax/scss/at_rule/extend_at_rule.rs:62-73 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_deserialize/src/diagnostics.rs:221 — crates/biome_deserialize/src/diagnostics.rs:221-231 | crates/biome_parser/src/diagnostic.rs:102-110 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_grit_patterns/src/grit_node.rs:46 — crates/biome_grit_patterns/src/grit_node.rs:46-54 | crates/biome_grit_patterns/src/grit_target_node.rs:377-385 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_js_runtime/src/ast.rs:273 — crates/biome_js_runtime/src/ast.rs:273-281 | crates/biome_js_runtime/src/ast.rs:283-293 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/biome_js_parser/src/syntax/function.rs:1118 — crates/biome_js_parser/src/syntax/function.rs:1118-1127 | crates/biome_js_parser/src/syntax/typescript/types.rs:1039-1047 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 9 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×32
  • Repeated repair: crates/biome_js_parser/src/syntax/program.rs crates/biome_js_parser/src/syntax/program.rs:37 — crates/biome_js_parser/src/syntax/program.rs changed 8 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is biome_js_parser::syntax::program::parse at line 37), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(core): parse and visit generics (#13057)”; “fix(svelte): parse type annotations in const tags (#13021)”; “fix(vue): parse `generic` attribute of Vue setup scripts (#12124)”; “fix(format/html/vue): format Vue event handlers that are statements (#12218)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_parser/src/syntax/program.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_languages/src/javascript.rs crates/biome_languages/src/javascript.rs:734 — crates/biome_languages/src/javascript.rs changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is JsFileSource::try_from_extension at line 734), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(core): parse and visit generics (#13057)”; “fix(svelte): parse type annotations in const tags (#13021)”; “fix(vue): parse `generic` attribute of Vue setup scripts (#12124)”; “fix(vue): slots are now parsed with a new root (#12030)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_languages/src/javascript.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_embeds/src/references.rs crates/biome_embeds/src/references.rs:156 — crates/biome_embeds/src/references.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is biome_embeds::references::vue_directive_name_matches_reference_name at line 156), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(vue): parse `generic` attribute of Vue setup scripts (#12124)”; “fix(vue): slots are now parsed with a new root (#12030)”; “fix(tailwind): detect tailwind classes in class expressions (#11802)”; “fix(service): preserve embedded references in stateless processing (#11398)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_embeds/src/references.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_css_analyze/src/lint/correctness/no_missing_var_function.rs crates/biome_css_analyze/src/lint/correctness/no_missing_var_function.rs:226 — crates/biome_css_analyze/src/lint/correctness/no_missing_var_function.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is biome_css_analyze::lint::correctness::no_missing_var_function::is_wrapped_in_var at line 226), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(lint/css): resolve root declarations in embedded snippets (#12967)”; “fix: improve more lint diagnostics (#12354)”; “fix(css): support Sass values in modern if() branches (#12209)”; “fix(css_parser): distinguish legacy and modern if() syntax (#12047)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_analyze/src/lint/correctness/no_missing_var_function.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_tailwind_parser/src/lexer/mod.rs crates/biome_tailwind_parser/src/lexer/mod.rs:90 — crates/biome_tailwind_parser/src/lexer/mod.rs changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is TailwindLexer::consume_token_saw_negative at line 90), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(parse/tailwind): handle long dashed base names when aribtrary values are involved (#12898)”; “fix(tailwind): read stylesheets imported from packages (#12192)”; “fix(parse/tailwind): parse CSS variable shorthands as parameter lists (#12183)”; “fix(parse/tailwind): tokenize binary minus in CSS values (#12181)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_tailwind_parser/src/lexer/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_js_parser/src/parse.rs crates/biome_js_parser/src/parse.rs:37 — crates/biome_js_parser/src/parse.rs changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is Parse::cast at line 37), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(vue): parse `generic` attribute of Vue setup scripts (#12124)”; “fix(vue): slots are now parsed with a new root (#12030)”; “fix(tailwind): detect tailwind classes in class expressions (#11802)”; “fix(rowan): avoid stack overflow when dropping deep trees (#11368)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_parser/src/parse.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_css_analyze/src/lint/style/no_descending_specificity.rs crates/biome_css_analyze/src/lint/style/no_descending_specificity.rs:292 — crates/biome_css_analyze/src/lint/style/no_descending_specificity.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is biome_css_analyze::lint::style::no_descending_specificity::find_descending_selector at line 292), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(noDescendingSpecificity): resolve tail selectors (#12588)”; “fix: lint rules and typescript reference resolution (#11751)”; “fix(noDuplicateProperties): handle function named (#11591)”; “fix(noDescendingSpecificity): improve specificity comparison (#11539)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_analyze/src/lint/style/no_descending_specificity.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_css_parser/src/syntax/property/custom.rs crates/biome_css_parser/src/syntax/property/custom.rs:244 — crates/biome_css_parser/src/syntax/property/custom.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is biome_css_parser::syntax::property::custom::parse_custom_property_component at line 244), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(css_parser): lex digit-led hash names in raw custom property values (#12805)”; “fix(css): preserve URL nodes in SCSS custom properties (#12398)”; “fix(css): preserve Sass function call boundaries (#11764)”; “fix(css/parse): legacy filters (#11582)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_parser/src/syntax/property/custom.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_js_formatter/src/lib.rs crates/biome_js_formatter/src/lib.rs:375 — crates/biome_js_formatter/src/lib.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is FormatNodeRule::fmt_node at line 375), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(core): astro fmt embedding (#11975)”; “fix(format/js): omit redundant unary operand parentheses (#11724)”; “fix(js/parser): read Astro template expression contents as Astro does (#11440)”; “fix(js/parser): support Astro implicit fragments and void elements (#11437)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_formatter/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_css_parser/src/syntax/scss/expression/mod.rs crates/biome_css_parser/src/syntax/scss/expression/mod.rs:122 — crates/biome_css_parser/src/syntax/scss/expression/mod.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is ScssExpressionOptions::with_end_ts at line 122), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(css): support Sass values in modern if() branches (#12209)”; “fix(css_parser): parse unary and identifier-led SCSS list expressions (#12096)”; “fix(css_parser): parse SCSS module variables in media queries (#11765)”; “fix(css): preserve Sass function call boundaries (#11764)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_parser/src/syntax/scss/expression/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_grit_patterns/src/grit_target_language/js_target_language.rs crates/biome_grit_patterns/src/grit_target_language/js_target_language.rs:138 — crates/biome_grit_patterns/src/grit_target_language/js_target_language.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is JsTargetLanguage::is_disregarded_snippet_field at line 138), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: various bug fixes (#11735)”; “fix: various fixes (#11670)”; “fix(grit): query named imports (#11627)”; “fix(grit): match named re-export specifiers (#11458)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_grit_patterns/src/grit_target_language/js_target_language.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_service/src/embed/html.rs crates/biome_service/src/embed/html.rs:309 — crates/biome_service/src/embed/html.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is biome_service::embed::html::resolve_script_language at line 309), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(core): parse and visit generics (#13057)”; “fix(vue): parse `generic` attribute of Vue setup scripts (#12124)”; “fix(vue): slots are now parsed with a new root (#12030)”; “fix(js/parser): read Astro template expression contents as Astro does (#11440)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_service/src/embed/html.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_css_parser/src/syntax/property/mod.rs crates/biome_css_parser/src/syntax/property/mod.rs:176 — crates/biome_css_parser/src/syntax/property/mod.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is biome_css_parser::syntax::property::parse_composes_property_value at line 176), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(css_parser): don't panic on non-identifier composes value (#13033)”; “fix(css): support Sass values in modern if() branches (#12209)”; “fix(parse/css): support Grit metavariables in selectors and property names (#12199)”; “fix(css/parse): legacy filters (#11582)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_parser/src/syntax/property/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_css_parser/src/syntax/selector/mod.rs crates/biome_css_parser/src/syntax/selector/mod.rs:602 — crates/biome_css_parser/src/syntax/selector/mod.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is biome_css_parser::syntax::selector::parse_sub_selector at line 602), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(css): support compound SCSS placeholder selectors (#12276)”; “fix(parse/css): support Grit metavariables in selectors and property names (#12199)”; “fix(css_parser): allow final semicolon omission in SCSS at-rules (#11714)”; “fix(css_parser): support interpolated subselectors in SCSS (#11685)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_parser/src/syntax/selector/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_css_parser/src/syntax/at_rule/feature.rs crates/biome_css_parser/src/syntax/at_rule/feature.rs:101 — crates/biome_css_parser/src/syntax/at_rule/feature.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is biome_css_parser::syntax::at_rule::feature::parse_named_query_feature at line 101), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(css_parser): correct variable-led SCSS media ranges (#12196)”; “fix(scss): support unary expressions in query values (#11974)”; “fix(css_parser): parse SCSS module variables in media queries (#11765)”; “fix(css_parser): allow parenthesized Sass query values (#11680)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_parser/src/syntax/at_rule/feature.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_html_parser/src/token_source.rs crates/biome_html_parser/src/token_source.rs:221 — crates/biome_html_parser/src/token_source.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is HtmlEmbeddedLanguage::closing_tag_name at line 221), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(parse/html/vue): parse `v-for` binding default values (#12702)”; “fix(html): lex processing instructions in their own context (#12292)”; “fix(lint/html/svelte): mark `class:` and `style:` shorthands as variable usages (#12246)”; “fix(html/parser): correct Astro document parsing (#11403)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_html_parser/src/token_source.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_js_formatter/src/utils/format_binary_like_expression.rs crates/biome_js_formatter/src/utils/format_binary_like_expression.rs:381 — crates/biome_js_formatter/src/utils/format_binary_like_expression.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is FormatBinaryLikeOperatorAndRight::fmt at line 381), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(format/html/vue): format Vue directive values inside quotes (#12131)”; “fix: formatter and lint rules (#11790)”; “fix(format/js): omit redundant unary operand parentheses (#11724)”; “fix(format/js): keep comments above binary operators with operatorLinebreak before (#11718)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_formatter/src/utils/format_binary_like_expression.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_module_graph/src/db/type_inference/imports.rs crates/biome_module_graph/src/db/type_inference/imports.rs:362 — crates/biome_module_graph/src/db/type_inference/imports.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is ResolutionCtx::resolve_import_member_with_steps at line 362), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(inference): keep context and avoid overflow (#12041)”; “fix(inference): reduce unnecessary type inference (#11631)”; “fix(type_inference): infer non-cyclic declarations in module cycles (#11555)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_module_graph/src/db/type_inference/imports.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_js_analyze/src/lint/complexity/no_useless_string_concat.rs crates/biome_js_analyze/src/lint/complexity/no_useless_string_concat.rs:376 — crates/biome_js_analyze/src/lint/complexity/no_useless_string_concat.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is biome_js_analyze::lint::complexity::no_useless_string_concat::extract_string_value at line 376), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(biome_js_analyze): preserve JS number stringification semantics in noUselessStringConcat (#12211)”; “fix(noUselessStringConcat): escape quotes in string concat fixes (#11914)”; “fix(analyzer): various bugs (#11720)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_analyze/src/lint/complexity/no_useless_string_concat.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_analyze/src/matcher.rs crates/biome_analyze/src/matcher.rs:152 — crates/biome_analyze/src/matcher.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is RuleFilter::eq at line 152), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(analyze): first class citizen snippets (#11915)”; “fix: various fixes (#11670)”; “fix(analyzer): suppressions via trait (#11660)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_analyze/src/matcher.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_service/src/workspace.rs crates/biome_service/src/workspace.rs:199 — crates/biome_service/src/workspace.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is FeaturesSupported::with_settings_and_language at line 199), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: mark REDACTED as protected file (#12664)”; “fix(loader): js plugins (#12188)”; “fix(workspace): scanner behaviour (#11533)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_service/src/workspace.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_cli/src/execute/migrate/prettier.rs crates/biome_cli/src/execute/migrate/prettier.rs:491 — crates/biome_cli/src/execute/migrate/prettier.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is biome_cli::execute::migrate::prettier::load_config at line 491), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(migrate): carry Prettier's bracketSpacing into the top-level (#12670)”; “fix(migrate): carry Prettier's bracketSpacing in overrides (#12649)”; “fix(migrate): use Prettier's defaults for semi and singleQuote (#12266)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_cli/src/execute/migrate/prettier.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_js_parser/src/syntax/jsx/mod.rs crates/biome_js_parser/src/syntax/jsx/mod.rs:667 — crates/biome_js_parser/src/syntax/jsx/mod.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is JsxAttributeList::parse_element at line 667), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(js_parser): accept any expression in Astro shorthand attributes (#12394)”; “fix(js/parser): read Astro template expression contents as Astro does (#11440)”; “fix(js/parser): support Astro implicit fragments and void elements (#11437)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_parser/src/syntax/jsx/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_js_syntax/src/lib.rs crates/biome_js_syntax/src/lib.rs:244 — crates/biome_js_syntax/src/lib.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is OperatorPrecedence::try_from_binary_operator at line 244), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(js/parser): read Astro template expression contents as Astro does (#11440)”; “fix(inference): use local inference for constructor dependent members (#11443)”; “fix(parse/js): handle incomplete declarations more gracefully (#11422)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_js_syntax/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/biome_css_parser/src/syntax/at_rule/unknown.rs crates/biome_css_parser/src/syntax/at_rule/unknown.rs:222 — crates/biome_css_parser/src/syntax/at_rule/unknown.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is UnknownAtRuleComponentBalance::bump at line 222), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(css): parse quoted interpolation in unknown SCSS at-rules (#12259)”; “fix(css): preserve interpolated SCSS at-rule names (#12205)”; “fix(css_parser): allow final semicolon omission in SCSS at-rules (#11714)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:40:27 -05:00' --until='2026-11-13 18:40:27 -05:00' --full-history --no-merges -- crates/biome_css_parser/src/syntax/at_rule/unknown.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×32
  • Duplicated block (17 lines × 2) crates/biome_analyze/src/diagnostics.rs:458 — crates/biome_analyze/src/diagnostics.rs:458-474 | crates/biome_analyze/src/diagnostics.rs:493-509 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_analyze/src/diagnostics.rs:458` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `fmt` to `&mut std::fmt::Formatter` in one and `&mut biome_console::fmt::Formatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) crates/biome_analyze/src/signals.rs:651 — crates/biome_analyze/src/signals.rs:651-667 | crates/biome_analyze/src/signals.rs:727-743 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/biome_cli/src/reporter/summary.rs:37 — crates/biome_cli/src/reporter/summary.rs:37-53 | crates/biome_cli/src/reporter/terminal.rs:30-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) crates/biome_cli/src/service/windows.rs:133 — crates/biome_cli/src/service/windows.rs:133-149 | crates/biome_cli/src/service/windows.rs:261-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) crates/biome_configuration_macros/src/lib.rs:50 — crates/biome_configuration_macros/src/lib.rs:50-66 | crates/biome_configuration_macros/src/lib.rs:99-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration_macros/src/lib.rs:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_glob/src/editorconfig.rs:135 — crates/biome_glob/src/editorconfig.rs:135-151 | crates/biome_glob/src/lib.rs:377-393 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_glob/src/editorconfig.rs:135` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:111 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:111-127 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:107-123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) crates/biome_html_formatter/src/svelte/auxiliary/await_catch_block.rs:11 — crates/biome_html_formatter/src/svelte/auxiliary/await_catch_block.rs:11-27 | crates/biome_html_formatter/src/svelte/auxiliary/await_then_block.rs:11-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_formatter/src/svelte/auxiliary/await_catch_block.rs:11` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&SvelteAwaitCatchBlock` in one and `&SvelteAwaitThenBlock` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_solid_destructured_props.rs:271 — crates/biome_js_analyze/src/lint/correctness/no_solid_destructured_props.rs:271-287 | crates/biome_js_analyze/src/lint/correctness/no_solid_destructured_props.rs:289-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:686 — crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:686-702 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:862-878 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs` and `crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) crates/biome_js_analyze/src/lint/style/use_export_type.rs:280 — crates/biome_js_analyze/src/lint/style/use_export_type.rs:280-296 | crates/biome_js_analyze/src/lint/style/use_import_type.rs:435-451 — before extracting anything, compare `crates/biome_js_analyze/src/lint/style/use_export_type.rs` and `crates/biome_js_analyze/src/lint/style/use_import_type.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:626 — crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:626-642 | crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:685-701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:626` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) crates/biome_json_parser/src/lexer/mod.rs:112 — crates/biome_json_parser/src/lexer/mod.rs:112-128 | crates/biome_parser/src/lexer.rs:162-178 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_parser/src/lexer/mod.rs:112` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_languages/src/lib.rs:459 — crates/biome_languages/src/lib.rs:459-475 | crates/biome_languages/src/lib.rs:488-504 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_languages/src/lib.rs:459` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_manifest/src/lib.rs:219 — crates/biome_manifest/src/lib.rs:219-235 | crates/biome_manifest/src/lib.rs:243-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_manifest/src/lib.rs:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_markdown_formatter/src/bullet_list.rs:765 — crates/biome_markdown_formatter/src/bullet_list.rs:765-781 | crates/biome_markdown_formatter/src/bullet_list.rs:892-908 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/bullet_list.rs:765` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:92 — crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:92-108 | crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs:133-149 — before extracting anything, compare `crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs` and `crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:92` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_module_graph/src/css_module_info/traverse.rs:691 — crates/biome_module_graph/src/css_module_info/traverse.rs:691-707 | crates/biome_module_graph/src/css_module_info/traverse.rs:772-788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/css_module_info/traverse.rs:691` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_module_graph/src/db/type_inference/expressions.rs:875 — crates/biome_module_graph/src/db/type_inference/expressions.rs:875-891 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1500-1516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/biome_module_graph/src/js_module_info/collector.rs:220 — crates/biome_module_graph/src/js_module_info/collector.rs:220-236 | crates/biome_module_graph/src/js_module_info/collector.rs:275-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/js_module_info/collector.rs:220` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_parser/src/parsed_syntax.rs:260 — crates/biome_parser/src/parsed_syntax.rs:260-276 | crates/biome_parser/src/parsed_syntax.rs:298-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) crates/biome_service/src/file_handlers/css.rs:1065 — crates/biome_service/src/file_handlers/css.rs:1065-1081 | crates/biome_service/src/file_handlers/json.rs:982-998 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/json.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 278 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:1065` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:536 — crates/biome_syntax_codegen/src/generate_nodes.rs:536-552 | xtask/codegen/src/generate_nodes.rs:568-584 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:536` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_vue_semantic/src/semantic_model/component.rs:1144 — crates/biome_vue_semantic/src/semantic_model/component.rs:1144-1160 | crates/biome_vue_semantic/src/semantic_model/component.rs:1180-1196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_vue_semantic/src/semantic_model/component.rs:1144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/biome_yaml_parser/src/lexer/mod.rs:790 — crates/biome_yaml_parser/src/lexer/mod.rs:790-806 | crates/biome_yaml_parser/src/lexer/mod.rs:829-845 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_yaml_parser/src/lexer/mod.rs:790` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×31
  • Edited copy of a member (8 corresponding lines) crates/biome_grit_formatter/src/context.rs:145 — crates/biome_grit_formatter/src/context.rs:145-152 | crates/biome_markdown_formatter/src/context.rs:257-264 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_vue_lifecycle_after_await.rs:86 — crates/biome_js_analyze/src/lint/nursery/no_vue_lifecycle_after_await.rs:86-93 | crates/biome_js_analyze/src/lint/nursery/no_vue_watch_after_await.rs:86-93 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_astro_set_html_directive.rs:53 — crates/biome_html_analyze/src/lint/nursery/no_astro_set_html_directive.rs:53-61 | crates/biome_html_analyze/src/lint/nursery/use_astro_client_only_directive_value.rs:56-63 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_analyze/src/categories.rs:341 — crates/biome_analyze/src/categories.rs:341-348 | crates/biome_analyze/src/categories.rs:352-359 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_parser/src/lexer.rs:592 — crates/biome_parser/src/lexer.rs:592-599 | crates/biome_parser/src/lexer.rs:618-630 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4_variants.rs:649 — crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4_variants.rs:649-656 | crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4_variants.rs:759-766 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_configuration/src/lib.rs:994 — crates/biome_configuration/src/lib.rs:994-1001 | crates/biome_configuration/src/lib.rs:1005-1016 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_syntax/src/numbers.rs:83 — crates/biome_js_syntax/src/numbers.rs:83-90 | crates/biome_js_syntax/src/unescape.rs:73-80 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:2492 — crates/biome_markdown_parser/src/syntax/list.rs:2492-2502 | crates/biome_markdown_parser/src/syntax/list.rs:2507-2514 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:858 — crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:858-865 | crates/biome_js_analyze/src/lint/a11y/no_redundant_alt.rs:145-154 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_confusing_array_splice.rs:284 — crates/biome_js_analyze/src/lint/nursery/no_confusing_array_splice.rs:284-291 | crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:650-657 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_unsafe_plus_operands.rs:239 — crates/biome_js_analyze/src/lint/nursery/no_unsafe_plus_operands.rs:239-246 | crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:995-1003 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_service/src/workspace.rs:402 — crates/biome_service/src/workspace.rs:402-409 | crates/biome_service/src/workspace.rs:416-426 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_css_parser/src/token_source.rs:58 — crates/biome_css_parser/src/token_source.rs:58-69 | crates/biome_js_parser/src/token_source.rs:31-38 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_vue_semantic/src/semantic_model/component.rs:2436 — crates/biome_vue_semantic/src/semantic_model/component.rs:2436-2443 | crates/biome_js_analyze/src/frameworks/vue/vue_setup.rs:42-50 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_parser/src/syntax/class.rs:65 — crates/biome_js_parser/src/syntax/class.rs:65-72 | crates/biome_js_parser/src/syntax/function.rs:499-506 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_graphql_semantic/src/semantic_model/model.rs:191 — crates/biome_graphql_semantic/src/semantic_model/model.rs:191-198 | crates/biome_js_semantic/src/semantic_model/model.rs:612-619 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_html_parser/src/token_source.rs:281 — crates/biome_html_parser/src/token_source.rs:281-288 | crates/biome_tailwind_parser/src/token_source.rs:51-59 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_markdown_formatter/src/markdown/lists/code_name_list.rs:10 — crates/biome_markdown_formatter/src/markdown/lists/code_name_list.rs:10-21 | crates/biome_html_formatter/src/svelte/lists/directive_modifier_list.rs:12-19 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_css_analyze/src/lint/nursery/use_consistent_lightness_notation.rs:220 — crates/biome_css_analyze/src/lint/nursery/use_consistent_lightness_notation.rs:220-227 | crates/biome_css_analyze/src/lint/suspicious/no_duplicate_font_names.rs:149-156 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_constant_comparisons.rs:381 — crates/biome_js_analyze/src/lint/nursery/no_constant_comparisons.rs:381-388 | crates/biome_js_analyze/src/lint/nursery/no_double_comparison.rs:271-279 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_formatter/src/lib.rs:1006 — crates/biome_formatter/src/lib.rs:1006-1013 | crates/biome_markdown_formatter/src/context.rs:71-78 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_await_in_promise_methods.rs:196 — crates/biome_js_analyze/src/lint/nursery/no_await_in_promise_methods.rs:196-204 | crates/biome_js_analyze/src/lint/nursery/no_single_promise_in_promise_methods.rs:204-211 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_unused_variables.rs:752 — crates/biome_js_analyze/src/lint/correctness/no_unused_variables.rs:752-759 | crates/biome_js_analyze/src/lint/correctness/use_exhaustive_dependencies.rs:1511-1521 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_subtraction_comparison.rs:250 — crates/biome_js_analyze/src/lint/nursery/no_subtraction_comparison.rs:250-257 | crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:314-321 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×30
  • Edited copy of a member (14 corresponding lines) crates/biome_resolver/src/db.rs:333 — crates/biome_resolver/src/db.rs:333-350 | crates/biome_resolver/src/db.rs:408-421 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_tailwind_parser/src/lexer/mod.rs:111 — crates/biome_tailwind_parser/src/lexer/mod.rs:111-124 | crates/biome_tailwind_parser/src/lexer/mod.rs:127-140 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_confusing_array_splice.rs:411 — crates/biome_js_analyze/src/lint/nursery/no_confusing_array_splice.rs:411-424 | crates/biome_js_analyze/src/lint/nursery/no_useless_splice.rs:471-492 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:108 — crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:108-128 | crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:125-138 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_js_parser/src/syntax/typescript/types.rs:1135 — crates/biome_js_parser/src/syntax/typescript/types.rs:1135-1148 | crates/biome_js_parser/src/syntax/typescript/types.rs:1150-1165 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_html_analyze/src/lint/nursery/use_tailwind_sorted_classes.rs:95 — crates/biome_html_analyze/src/lint/nursery/use_tailwind_sorted_classes.rs:95-108 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_sorted_classes.rs:117-136 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:418 — crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:418-431 | crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:437-450 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_service/src/diagnostics.rs:638 — crates/biome_service/src/diagnostics.rs:638-651 | crates/biome_service/src/diagnostics.rs:653-666 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_css_formatter/src/css/auxiliary/declaration.rs:9 — crates/biome_css_formatter/src/css/auxiliary/declaration.rs:9-32 | crates/biome_js_formatter/src/js/statements/debugger_statement.rs:13-26 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_rowan/src/cursor.rs:255 — crates/biome_rowan/src/cursor.rs:255-268 | crates/biome_rowan/src/cursor.rs:269-282 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_markdown_parser/src/to_html.rs:1558 — crates/biome_markdown_parser/src/to_html.rs:1558-1571 | crates/biome_markdown_parser/src/to_html.rs:1579-1595 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_js_analyze/src/lint/style/use_throw_new_error.rs:100 — crates/biome_js_analyze/src/lint/style/use_throw_new_error.rs:100-113 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_page_pause.rs:80-98 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_vue_valid_default_prop.rs:360 — crates/biome_js_analyze/src/lint/nursery/use_vue_valid_default_prop.rs:360-373 | crates/biome_js_analyze/src/lint/nursery/use_while_loop_condition.rs:310-325 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_markdown_parser/src/syntax/mod.rs:1186 — crates/biome_markdown_parser/src/syntax/mod.rs:1186-1199 | crates/biome_markdown_parser/src/syntax/mod.rs:2272-2292 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_css_parser/src/lexer/scan_cursor.rs:463 — crates/biome_css_parser/src/lexer/scan_cursor.rs:463-476 | crates/biome_css_parser/src/lexer/scan_cursor.rs:483-498 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_plugin_loader/src/lib.rs:519 — crates/biome_plugin_loader/src/lib.rs:519-532 | crates/biome_service/src/configuration.rs:1095-1113 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_js_formatter/src/js/lists/object_member_list.rs:12 — crates/biome_js_formatter/src/js/lists/object_member_list.rs:12-25 | crates/biome_js_formatter/src/ts/lists/enum_member_list.rs:12-25 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_grit_parser/src/parser/patterns.rs:620 — crates/biome_grit_parser/src/parser/patterns.rs:620-633 | crates/biome_grit_parser/src/parser/patterns.rs:751-764 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_js_type_info/src/interned_types.rs:2383 — crates/biome_js_type_info/src/interned_types.rs:2383-2398 | crates/biome_js_type_info/src/type_data.rs:1245-1258 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_graphql_parser/src/parser/directive.rs:51 — crates/biome_graphql_parser/src/parser/directive.rs:51-64 | crates/biome_js_parser/src/syntax/class.rs:2759-2774 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_js_analyze/src/lint/performance/no_img_element.rs:101 — crates/biome_js_analyze/src/lint/performance/no_img_element.rs:101-114 | crates/biome_js_analyze/src/lint/suspicious/no_document_import_in_page.rs:85-98 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_configuration/src/analyzer/mod.rs:460 — crates/biome_configuration/src/analyzer/mod.rs:460-473 | crates/biome_configuration/src/analyzer/mod.rs:505-520 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_html_lang.rs:72 — crates/biome_html_analyze/src/lint/a11y/use_html_lang.rs:72-85 | crates/biome_js_analyze/src/lint/a11y/use_html_lang.rs:100-113 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_service/src/file_handlers/html.rs:330 — crates/biome_service/src/file_handlers/html.rs:330-344 | crates/biome_service/src/file_handlers/json.rs:69-82 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs:99 — crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs:99-115 | crates/biome_js_analyze/src/lint/suspicious/no_vue_arrow_func_in_watch.rs:133-146 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×29
  • Duplicated block (15 lines × 2) crates/biome_cli/src/execute/migrate/eslint.rs:336 — crates/biome_cli/src/execute/migrate/eslint.rs:336-350 | crates/biome_cli/src/execute/migrate/stylelint.rs:189-203 — before extracting anything, compare `crates/biome_cli/src/execute/migrate/eslint.rs` and `crates/biome_cli/src/execute/migrate/stylelint.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint.rs:336` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:250 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:250-264 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:290-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_cli/src/runner/impls/process_file/check.rs:121 — crates/biome_cli/src/runner/impls/process_file/check.rs:121-135 | crates/biome_cli/src/runner/impls/process_file/format.rs:102-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/runner/impls/process_file/check.rs:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:83 — crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:83-97 | crates/biome_css_analyze/src/lint/suspicious/no_duplicate_properties.rs:92-106 — before extracting anything, compare `crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs` and `crates/biome_css_analyze/src/lint/suspicious/no_duplicate_properties.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:83` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_css_formatter/src/comments.rs:706 — crates/biome_css_formatter/src/comments.rs:706-720 | crates/biome_css_formatter/src/comments.rs:852-866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) crates/biome_deserialize_macros/src/deserializable_derive.rs:542 — crates/biome_deserialize_macros/src/deserializable_derive.rs:542-556 | crates/biome_deserialize_macros/src/deserializable_derive.rs:575-589 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_deserialize_macros/src/deserializable_derive.rs:542` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `DeserializableFromData` in one and `DeserializableTryFromData` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 2) crates/biome_graphql_formatter/src/graphql/definitions/fragment_definition.rs:16 — crates/biome_graphql_formatter/src/graphql/definitions/fragment_definition.rs:16-30 | crates/biome_graphql_formatter/src/graphql/definitions/variable_definition.rs:15-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/definitions/fragment_definition.rs:16` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlFragmentDefinition` in one and `&GraphqlVariableDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 2) crates/biome_grit_patterns/src/pattern_compiler/assignment_compiler.rs:20 — crates/biome_grit_patterns/src/pattern_compiler/assignment_compiler.rs:20-34 | crates/biome_grit_patterns/src/pattern_compiler/assignment_compiler.rs:44-58 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:94 — crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:94-108 | crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:99-113 — before extracting anything, compare `crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs` and `crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:140 — crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:140-154 | crates/biome_js_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:130-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:140` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_tailwind_restyled_components.rs:159 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_restyled_components.rs:159-173 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_restyled_components.rs:182-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) crates/biome_html_parser/src/lexer/mod.rs:193 — crates/biome_html_parser/src/lexer/mod.rs:193-207 | crates/biome_html_parser/src/lexer/mod.rs:263-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:856 — crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:856-870 | crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:886-900 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:856` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:871` calls `JsIdentifierExpression`, `identifier_refers_to_const_assertion` and `crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:901` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_drizzle_delete_without_where.rs:63 — crates/biome_js_analyze/src/lint/suspicious/no_drizzle_delete_without_where.rs:63-77 | crates/biome_js_analyze/src/lint/suspicious/no_drizzle_update_without_where.rs:63-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) crates/biome_js_control_flow/src/nodes/for_stmt.rs:50 — crates/biome_js_control_flow/src/nodes/for_stmt.rs:50-64 | crates/biome_js_control_flow/src/nodes/while_stmt.rs:32-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_control_flow/src/nodes/for_stmt.rs:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:566 — crates/biome_js_formatter/src/js/expressions/call_arguments.rs:566-580 | crates/biome_js_formatter/src/js/expressions/call_arguments.rs:608-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/biome_js_parser/src/syntax/module.rs:835 — crates/biome_js_parser/src/syntax/module.rs:835-857 | crates/biome_js_parser/src/syntax/module.rs:1129-1143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_parser/src/syntax/module.rs:835` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_js_type_info/src/local_inference.rs:2202 — crates/biome_js_type_info/src/local_inference.rs:2202-2216 | crates/biome_js_type_info/src/local_inference.rs:2218-2232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) crates/biome_markdown_formatter/src/markdown/auxiliary/quote.rs:23 — crates/biome_markdown_formatter/src/markdown/auxiliary/quote.rs:23-37 | crates/biome_markdown_formatter/src/quote.rs:40-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/auxiliary/quote.rs:23` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) crates/biome_markdown_parser/src/syntax/mod.rs:2233 — crates/biome_markdown_parser/src/syntax/mod.rs:2233-2247 | crates/biome_markdown_parser/src/syntax/mod.rs:2273-2287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/syntax/mod.rs:2233` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_module_graph/src/type_inference/profiling.rs:574 — crates/biome_module_graph/src/type_inference/profiling.rs:574-588 | crates/biome_module_graph/src/type_inference/profiling.rs:664-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/type_inference/profiling.rs:574` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) crates/biome_rule_options/src/no_restricted_imports.rs:404 — crates/biome_rule_options/src/no_restricted_imports.rs:404-418 | crates/biome_rule_options/src/no_restricted_imports.rs:429-443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_rule_options/src/no_restricted_imports.rs:404` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_service/src/file_handlers/html/go_to.rs:61 — crates/biome_service/src/file_handlers/html/go_to.rs:61-75 | crates/biome_service/src/file_handlers/javascript/go_to.rs:331-345 — `crates/biome_service/src/file_handlers/html/go_to.rs` and `crates/biome_service/src/file_handlers/javascript/go_to.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/html/go_to.rs:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/biome_yaml_formatter/src/yaml/auxiliary/flow_mapping.rs:9 — crates/biome_yaml_formatter/src/yaml/auxiliary/flow_mapping.rs:9-23 | crates/biome_yaml_formatter/src/yaml/auxiliary/flow_sequence.rs:9-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_yaml_formatter/src/yaml/auxiliary/flow_mapping.rs:9` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&YamlFlowMapping` in one and `&YamlFlowSequence` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 2) crates/biome_yaml_formatter/src/yaml/lists/block_map_entry_list.rs:10 — crates/biome_yaml_formatter/src/yaml/lists/block_map_entry_list.rs:10-24 | crates/biome_yaml_formatter/src/yaml/lists/block_sequence_entry_list.rs:10-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&YamlBlockMapEntryList` in one and `&YamlBlockSequenceEntryList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • + 4 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×29
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/aria-data/generate-aria-data.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/watch.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/components/App.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/languages.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/@biomejs/biome/scripts/generate-packages.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/generate-tailwind-preset-v4.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/extract-variants.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/components/DiffView.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/plainOutput.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/biome.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/probe-samples.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/prettier.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/parse-theme-color.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/css-helpers.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/value-types.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/extract-theme-keys.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/components/DiagnosticsView.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/extract-property-order.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/tailwindcss-config-analyzer/src/v4/theme-namespaces.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/prettier-compare/src/components/Spinner.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/@biomejs/biome/scripts/update-beta-version.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/@biomejs/js-api/scripts/update-beta-version.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/@biomejs/js-api/scripts/update-preview-version.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×27
  • Edited copy of a member (13 corresponding lines) crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:91 — crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:91-103 | crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:133-145 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:131 — crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:131-143 | crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:124-136 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:142 — crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:142-154 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:132-144 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_formatter_test/src/snapshot_builder.rs:48 — crates/biome_formatter_test/src/snapshot_builder.rs:48-60 | crates/biome_formatter_test/src/snapshot_builder.rs:90-107 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_semantic/src/semantic_model/binding.rs:583 — crates/biome_js_semantic/src/semantic_model/binding.rs:583-595 | crates/biome_js_semantic/src/semantic_model/binding.rs:598-610 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:190 — crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:190-202 | crates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rs:207-219 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_service/src/db/mod.rs:442 — crates/biome_service/src/db/mod.rs:442-454 | crates/biome_service/src/db/mod.rs:1128-1142 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_parser/src/syntax/module.rs:1416 — crates/biome_js_parser/src/syntax/module.rs:1416-1429 | crates/biome_js_parser/src/syntax/module.rs:1441-1453 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:238 — crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:238-250 | crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:305-317 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_markdown_parser/src/syntax/fenced_code_block.rs:139 — crates/biome_markdown_parser/src/syntax/fenced_code_block.rs:139-151 | crates/biome_markdown_parser/src/syntax/mod.rs:1923-1939 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_type_info/src/interned_types.rs:1889 — crates/biome_js_type_info/src/interned_types.rs:1889-1901 | crates/biome_js_type_info/src/interned_types.rs:3113-3126 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_react_compiler/src/convert_ast/statements.rs:6 — crates/biome_react_compiler/src/convert_ast/statements.rs:6-18 | crates/biome_react_compiler/src/convert_ast/statements.rs:498-512 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:150 — crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:150-168 | crates/biome_js_analyze/src/lint/a11y/no_label_without_control.rs:162-174 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_analyze/src/lint/complexity/no_useless_string_concat.rs:809 — crates/biome_js_analyze/src/lint/complexity/no_useless_string_concat.rs:809-829 | crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:370-382 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_constant_binary_expressions.rs:491 — crates/biome_js_analyze/src/lint/suspicious/no_constant_binary_expressions.rs:491-506 | crates/biome_js_analyze/src/lint/suspicious/no_constant_binary_expressions.rs:599-611 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_service/src/file_handlers/html.rs:1637 — crates/biome_service/src/file_handlers/html.rs:1637-1649 | crates/biome_service/src/file_handlers/html.rs:1670-1683 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:669 — crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:669-683 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:839-851 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:767 — crates/biome_js_type_info/src/format_inferred_type_info.rs:767-779 | crates/biome_js_type_info/src/format_inferred_type_info.rs:783-795 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_css_parser/src/syntax/scss/identifiers/interpolated_selector.rs:54 — crates/biome_css_parser/src/syntax/scss/identifiers/interpolated_selector.rs:54-66 | crates/biome_css_parser/src/syntax/scss/identifiers/interpolated_selector.rs:76-93 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_type_info/src/type_relation.rs:2188 — crates/biome_js_type_info/src/type_relation.rs:2188-2202 | crates/biome_module_graph/src/db/type_inference/lookup.rs:1028-1040 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:2544 — crates/biome_markdown_parser/src/syntax/list.rs:2544-2560 | crates/biome_markdown_parser/src/syntax/table.rs:257-269 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:780 — crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:780-792 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:917-929 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_constructor_return.rs:84 — crates/biome_js_analyze/src/lint/correctness/no_constructor_return.rs:84-96 | crates/biome_js_analyze/src/lint/correctness/no_setter_return.rs:100-113 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:135 — crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:135-150 | crates/biome_css_parser/src/syntax/value/function/tailwind.rs:10-22 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/biome_diagnostics/src/display/diff.rs:780 — crates/biome_diagnostics/src/display/diff.rs:780-792 | crates/biome_diagnostics/src/display/frame.rs:433-445 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 2 more in this group — see findings.md.
D1 · Cyclomatic Complexity · biome_markdown_parser · ×26
  • biome_markdown_parser::syntax::parse_any_block_with_indent_code_policy (cyclomatic 56) crates/biome_markdown_parser/src/syntax/mod.rs:331 — biome_markdown_parser::syntax::parse_any_block_with_indent_code_policy has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::list::parse_first_line_blocks (cyclomatic 49) crates/biome_markdown_parser/src/syntax/list.rs:2208 — biome_markdown_parser::syntax::list::parse_first_line_blocks has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::thematic_break_block::is_thematic_break_pattern (cyclomatic 42) crates/biome_markdown_parser/src/syntax/thematic_break_block.rs:46 — biome_markdown_parser::syntax::thematic_break_block::is_thematic_break_pattern has cyclomatic complexity 42 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • biome_markdown_parser::syntax::list::classify_blank_line_in_quote (cyclomatic 34) crates/biome_markdown_parser/src/syntax/list.rs:3283 — biome_markdown_parser::syntax::list::classify_blank_line_in_quote has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::inline::emphasis::parse_emphasis_from_context (cyclomatic 33) crates/biome_markdown_parser/src/syntax/inline/emphasis.rs:644 — biome_markdown_parser::syntax::inline::emphasis::parse_emphasis_from_context has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::inline::parse_any_inline (cyclomatic 29) crates/biome_markdown_parser/src/syntax/inline/mod.rs:255 — biome_markdown_parser::syntax::inline::parse_any_inline has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::parse_inline_item_list_with_task_list_item (cyclomatic 27) crates/biome_markdown_parser/src/syntax/mod.rs:1510 — biome_markdown_parser::syntax::parse_inline_item_list_with_task_list_item has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::list::check_continuation_indent (cyclomatic 27) crates/biome_markdown_parser/src/syntax/list.rs:2733 — biome_markdown_parser::syntax::list::check_continuation_indent has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::inline::emphasis::collect_delimiters (cyclomatic 26) crates/biome_markdown_parser/src/syntax/inline/emphasis.rs:327 — biome_markdown_parser::syntax::inline::emphasis::collect_delimiters has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::to_html::extract_alt_text_inline (cyclomatic 25) crates/biome_markdown_parser/src/to_html.rs:2064 — biome_markdown_parser::to_html::extract_alt_text_inline has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_markdown_parser::syntax::inline::parse_inline_item_list_until_impl (cyclomatic 24) crates/biome_markdown_parser/src/syntax/inline/mod.rs:79 — biome_markdown_parser::syntax::inline::parse_inline_item_list_until_impl has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::link_block::is_valid_link_definition_lookahead (cyclomatic 24) crates/biome_markdown_parser/src/syntax/link_block.rs:85 — biome_markdown_parser::syntax::link_block::is_valid_link_definition_lookahead has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_markdown_parser::syntax::inline::emphasis::match_delimiters (cyclomatic 23) crates/biome_markdown_parser/src/syntax/inline/emphasis.rs:456 — biome_markdown_parser::syntax::inline::emphasis::match_delimiters has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::list::classify_blank_line (cyclomatic 23) crates/biome_markdown_parser/src/syntax/list.rs:3184 — biome_markdown_parser::syntax::list::classify_blank_line has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::link_block::skip_destination_tokens (cyclomatic 22) crates/biome_markdown_parser/src/syntax/link_block.rs:233 — biome_markdown_parser::syntax::link_block::skip_destination_tokens has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::scan_newline_in_inline_list (cyclomatic 21) crates/biome_markdown_parser/src/syntax/mod.rs:1781 — biome_markdown_parser::syntax::scan_newline_in_inline_list has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::inline::links::parse_inline_link_destination_tokens (cyclomatic 19) crates/biome_markdown_parser/src/syntax/inline/links.rs:679 — biome_markdown_parser::syntax::inline::links::parse_inline_link_destination_tokens has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::list::parse_continuation_block (cyclomatic 19) crates/biome_markdown_parser/src/syntax/list.rs:2935 — biome_markdown_parser::syntax::list::parse_continuation_block has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::at_unindented_block_interrupt (cyclomatic 18) crates/biome_markdown_parser/src/syntax/mod.rs:2058 — biome_markdown_parser::syntax::at_unindented_block_interrupt has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • biome_markdown_parser::syntax::list::parse_bullet (cyclomatic 18) crates/biome_markdown_parser/src/syntax/list.rs:891 — biome_markdown_parser::syntax::list::parse_bullet has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_markdown_parser::syntax::list::handle_first_line_marker_only (cyclomatic 18) crates/biome_markdown_parser/src/syntax/list.rs:2126 — biome_markdown_parser::syntax::list::handle_first_line_marker_only has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_markdown_parser::syntax::textual_looks_like_list_marker (cyclomatic 17) crates/biome_markdown_parser/src/syntax/mod.rs:2095 — biome_markdown_parser::syntax::textual_looks_like_list_marker has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::to_html::strip_quote_prefixes (cyclomatic 17) crates/biome_markdown_parser/src/to_html.rs:286 — biome_markdown_parser::to_html::strip_quote_prefixes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_markdown_parser::syntax::classify_quote_break_after_newline (cyclomatic 16) crates/biome_markdown_parser/src/syntax/mod.rs:1003 — biome_markdown_parser::syntax::classify_quote_break_after_newline has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_markdown_parser::syntax::is_quote_only_blank_line_from_source (cyclomatic 16) crates/biome_markdown_parser/src/syntax/mod.rs:1648 — biome_markdown_parser::syntax::is_quote_only_blank_line_from_source has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • + 1 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×26
  • TooManyMethods: ResolutionCtx crates/biome_module_graph/src/db/type_inference/resolver.rs:223 — TooManyMethods — 148 methods, declared across 6 files: type_inference/expressions.rs (66), type_inference/resolver.rs (35), type_inference/imports.rs (22), type_inference/qualifiers.rs (14), +2 more file(s). The bar is 30 methods; this is 118 over it, 4.93× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TypeData crates/biome_js_type_info/src/interned_types.rs:117 — TooManyMethods — 113 methods, declared across 5 files: src/interned_types.rs (58), src/local_inference.rs (44), src/type_transform.rs (7), src/type_relation.rs (3), +1 more file(s). The bar is 30 methods; this is 83 over it, 3.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: InferredType crates/biome_js_type_info/src/inferred_type.rs:76 — TooManyMethods — 88 methods, declared across 4 files: src/inferred_type.rs (74), inferred_type/any_type_kind.rs (7), inferred_type/boolean_coercion.rs (5), inferred_type/spread_misuse.rs (2). The bar is 30 methods; this is 58 over it, 2.93× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SyntaxNode crates/biome_rowan/src/syntax/node.rs:19 — TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HtmlLexer crates/biome_html_parser/src/lexer/mod.rs:15 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CssLexer crates/biome_css_parser/src/lexer/mod.rs:182 — TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WorkspaceServerWithDb crates/biome_service/src/workspace/server.rs:182 — TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: JsLexer crates/biome_js_parser/src/lexer/mod.rs:147 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MarkdownParser crates/biome_markdown_parser/src/parser.rs:543 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SyntaxNode crates/biome_rowan/src/cursor/node.rs:19 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Session crates/biome_lsp/src/session.rs:104 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: YamlLexer crates/biome_yaml_parser/src/lexer/mod.rs:14 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MarkdownLexer crates/biome_markdown_parser/src/lexer/mod.rs:96 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Collector crates/biome_vue_semantic/src/semantic_model/component.rs:114 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: JsFormatOptions crates/biome_js_formatter/src/context.rs:157 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WorkspaceDb crates/biome_service/src/db/mod.rs:212 — TooManyMethods — 48 methods, declared across 2 files: db/mod.rs (47), db/parse.rs (1). The bar is 30 methods; this is 18 over it, 1.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Component crates/biome_vue_semantic/src/semantic_model/model.rs:987 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CssScanCursor crates/biome_css_parser/src/lexer/scan_cursor.rs:44 — TooManyMethods — 45 methods, declared across 2 files: lexer/scan_cursor.rs (42), scan_cursor/url.rs (3). The bar is 30 methods; this is 15 over it, 1.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: JsFileSource crates/biome_languages/src/javascript.rs:383 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SyntaxToken crates/biome_rowan/src/syntax/token.rs:15 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AssignabilityCheck crates/biome_js_type_info/src/type_relation.rs:551 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: EmbeddedBindingsBuilder crates/biome_embeds/src/visitor.rs:442 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Settings crates/biome_service/src/settings.rs:99 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DbState crates/biome_service/src/db/state.rs:203 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HtmlFormatOptions crates/biome_html_formatter/src/context.rs:17 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 1 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×26
  • ClassTooLong: Collector crates/biome_vue_semantic/src/semantic_model/component.rs:114 — ClassTooLong — 1490 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 55 methods, 2 blocks, lines 114-2266. The bar is 400 significant lines; this is 1090 over it, 3.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HtmlLexer crates/biome_html_parser/src/lexer/mod.rs:15 — ClassTooLong — 1223 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 75 methods, 3 blocks, lines 15-2208. The bar is 400 significant lines; this is 823 over it, 3.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: YamlLexer crates/biome_yaml_parser/src/lexer/mod.rs:14 — ClassTooLong — 1196 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 60 methods, 5 blocks, lines 14-1855. The bar is 400 significant lines; this is 796 over it, 2.99× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: InferredType crates/biome_js_type_info/src/inferred_type.rs:76 — ClassTooLong — 1074 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 88 methods, 2 blocks, lines 76-1783. The bar is 400 significant lines; this is 674 over it, 2.69× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AssignabilityCheck crates/biome_js_type_info/src/type_relation.rs:551 — ClassTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 43 methods, 2 blocks, lines 551-2185. The bar is 400 significant lines; this is 625 over it, 2.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Session crates/biome_lsp/src/session.rs:104 — ClassTooLong — 928 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 60 methods, 3 blocks, lines 104-1707. The bar is 400 significant lines; this is 528 over it, 2.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SemanticEventExtractor crates/biome_js_semantic/src/events.rs:153 — ClassTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 2 blocks, lines 153-1494. The bar is 400 significant lines; this is 418 over it, 2.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EmbeddedBindingsBuilder crates/biome_embeds/src/visitor.rs:442 — ClassTooLong — 783 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 40 methods, 2 blocks, lines 442-1644. The bar is 400 significant lines; this is 383 over it, 1.96× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TypeData crates/biome_js_type_info/src/interned_types.rs:117 — ClassTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 113 methods, 2 blocks, lines 117-1307. The bar is 400 significant lines; this is 327 over it, 1.82× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GritLexer crates/biome_grit_parser/src/lexer/mod.rs:15 — ClassTooLong — 646 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 19 methods, 3 blocks, lines 15-1045. The bar is 400 significant lines; this is 246 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WorkspaceDb crates/biome_service/src/db/mod.rs:212 — ClassTooLong — 620 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 48 methods, 8 blocks, lines 212-1589. The bar is 400 significant lines; this is 220 over it, 1.55× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ResolutionCtx crates/biome_module_graph/src/db/type_inference/resolver.rs:223 — ClassTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 148 methods, 2 blocks, lines 223-1150. The bar is 400 significant lines; this is 194 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FormatMdInlineItemList crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:207 — ClassTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 4 blocks, lines 207-1237. The bar is 400 significant lines; this is 190 over it, 1.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GritResolvedPattern crates/biome_grit_patterns/src/grit_resolved_pattern.rs:24 — ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 3 methods, 3 blocks, lines 24-801. The bar is 400 significant lines; this is 185 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JsModuleInfoCollector crates/biome_module_graph/src/js_module_info/collector.rs:49 — ClassTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 26 methods, 3 blocks, lines 49-895. The bar is 400 significant lines; this is 145 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Printer crates/biome_formatter/src/printer/mod.rs:35 — ClassTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods, 2 blocks, lines 35-891. The bar is 400 significant lines; this is 108 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HtmlRenderer crates/biome_markdown_parser/src/to_html.rs:523 — ClassTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 10 methods, 2 blocks, lines 523-1288. The bar is 400 significant lines; this is 105 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ConfigurationExtendsLoader crates/biome_service/src/configuration.rs:647 — ClassTooLong — 496 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 17 methods, 2 blocks, lines 647-1346. The bar is 400 significant lines; this is 96 over it, 1.24× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GraphqlLexer crates/biome_graphql_parser/src/lexer/mod.rs:12 — ClassTooLong — 481 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 17 methods, 4 blocks, lines 12-744. The bar is 400 significant lines; this is 81 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OverridePattern crates/biome_configuration/src/overrides.rs:35 — ClassTooLong — 475 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 2 blocks, lines 35-631. The bar is 400 significant lines; this is 75 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UseImportType crates/biome_js_analyze/src/lint/style/use_import_type.rs:30 — ClassTooLong — 470 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods. The bar is 400 significant lines; this is 70 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Lexer crates/biome_json_parser/src/lexer/mod.rs:32 — ClassTooLong — 460 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 4 blocks, lines 32-864. The bar is 400 significant lines; this is 60 over it, 1.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TailwindLexer crates/biome_tailwind_parser/src/lexer/mod.rs:15 — ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 30 methods, 5 blocks, lines 15-727. The bar is 400 significant lines; this is 54 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MarkdownParser crates/biome_markdown_parser/src/parser.rs:543 — ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 61 methods, 3 blocks, lines 543-1437. The bar is 400 significant lines; this is 6 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Settings crates/biome_service/src/settings.rs:99 — ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 35 methods, 3 blocks, lines 99-1781. The bar is 400 significant lines; this is 5 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×26
  • Edited copy of a member (16 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:855 — crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:855-877 | crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:885-904 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_module_graph/src/db/queries/css.rs:422 — crates/biome_module_graph/src/db/queries/css.rs:422-454 | crates/biome_module_graph/src/db/queries/css.rs:702-758 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_analyze/src/lint/a11y/no_autofocus.rs:121 — crates/biome_js_analyze/src/lint/a11y/no_autofocus.rs:121-136 | crates/biome_js_analyze/src/lint/style/no_inferrable_types.rs:191-209 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:208 — crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs:208-223 | crates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rs:189-204 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:220 — crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:220-235 | crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:237-252 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_glob/src/editorconfig.rs:132 — crates/biome_glob/src/editorconfig.rs:132-151 | crates/biome_rule_options/src/shared/restricted_regex.rs:83-98 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:2423 — crates/biome_markdown_parser/src/syntax/list.rs:2423-2438 | crates/biome_markdown_parser/src/syntax/list.rs:2516-2532 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_syntax/src/expr_ext.rs:904 — crates/biome_js_syntax/src/expr_ext.rs:904-919 | crates/biome_js_syntax/src/expr_ext.rs:921-938 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_alert.rs:133 — crates/biome_js_analyze/src/lint/suspicious/no_alert.rs:133-148 | crates/biome_js_analyze/src/lint/suspicious/no_alert.rs:153-175 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_analyze/src/lint/complexity/use_arrow_function.rs:331 — crates/biome_js_analyze/src/lint/complexity/use_arrow_function.rs:331-348 | crates/biome_js_syntax/src/parentheses/expression.rs:434-449 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_markdown_parser/src/lib.rs:79 — crates/biome_markdown_parser/src/lib.rs:79-94 | crates/biome_markdown_parser/src/lib.rs:189-205 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_analyze/src/lint/complexity/use_index_of.rs:304 — crates/biome_js_analyze/src/lint/complexity/use_index_of.rs:304-319 | crates/biome_js_analyze/src/lint/complexity/use_index_of.rs:339-354 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_aria_props_for_role.rs:101 — crates/biome_html_analyze/src/lint/a11y/use_aria_props_for_role.rs:101-116 | crates/biome_js_analyze/src/lint/a11y/use_aria_props_for_role.rs:110-128 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_html_syntax/src/lib.rs:111 — crates/biome_html_syntax/src/lib.rs:111-126 | crates/biome_json_syntax/src/lib.rs:95-111 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_grit_parser/src/lexer/mod.rs:265 — crates/biome_grit_parser/src/lexer/mod.rs:265-280 | crates/biome_grit_parser/src/lexer/mod.rs:282-297 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_semantic/src/semantic_model/scope.rs:215 — crates/biome_js_semantic/src/semantic_model/scope.rs:215-230 | crates/biome_js_semantic/src/semantic_model/scope.rs:247-262 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_css_analyze/src/lint/suspicious/no_empty_source.rs:77 — crates/biome_css_analyze/src/lint/suspicious/no_empty_source.rs:77-92 | crates/biome_graphql_analyze/src/lint/suspicious/no_empty_source.rs:78-93 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_formatter/src/js/lists/module_item_list.rs:10 — crates/biome_js_formatter/src/js/lists/module_item_list.rs:10-28 | crates/biome_js_formatter/src/js/lists/statement_list.rs:10-25 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rs:91 — crates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rs:91-106 | crates/biome_js_analyze/src/lint/style/no_unused_template_literal.rs:123-148 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_formatter/src/js/objects/literal_member_name.rs:13 — crates/biome_js_formatter/src/js/objects/literal_member_name.rs:13-35 | crates/biome_js_formatter/src/ts/objects/literal_enum_member_name.rs:10-25 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_parser/src/syntax/module.rs:1462 — crates/biome_js_parser/src/syntax/module.rs:1462-1477 | crates/biome_js_parser/src/syntax/typescript/statement.rs:233-250 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_js_type_info/src/builders.rs:251 — crates/biome_js_type_info/src/builders.rs:251-267 | crates/biome_js_type_info/src/builders.rs:272-287 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_markdown_parser/src/syntax/link_block.rs:621 — crates/biome_markdown_parser/src/syntax/link_block.rs:621-647 | crates/biome_markdown_parser/src/syntax/link_block.rs:652-667 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_formatter/src/diagnostics.rs:37 — crates/biome_formatter/src/diagnostics.rs:37-57 | crates/biome_formatter/src/diagnostics.rs:124-139 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/biome_css_formatter/src/tailwind/auxiliary/theme_prefix_option.rs:8 — crates/biome_css_formatter/src/tailwind/auxiliary/theme_prefix_option.rs:8-25 | crates/biome_css_formatter/src/scss/auxiliary/module_member_access.rs:8-23 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×26
  • Edited copy of a member (7 corresponding lines) crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_variable_names.rs:51 — crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_variable_names.rs:51-57 | crates/biome_graphql_analyze/src/lint/suspicious/no_duplicate_fields.rs:200-209 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:252 — crates/biome_markdown_parser/src/syntax/list.rs:252-258 | crates/biome_markdown_parser/src/syntax/quote.rs:631-640 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:213 — crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:213-219 | crates/biome_js_analyze/src/assist/source/use_sorted_attributes.rs:169-175 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_rowan/src/serde_impls.rs:30 — crates/biome_rowan/src/serde_impls.rs:30-36 | crates/biome_rowan/src/serde_impls.rs:43-53 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_diagnostics/src/display.rs:776 — crates/biome_diagnostics/src/display.rs:776-782 | crates/biome_diagnostics/src/display/message.rs:79-87 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_inline_template.rs:69 — crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_inline_template.rs:69-76 | crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_slot_scope.rs:95-101 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_grit_patterns/src/grit_binding.rs:109 — crates/biome_grit_patterns/src/grit_binding.rs:109-115 | crates/biome_grit_patterns/src/grit_binding.rs:117-123 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_excessive_statements_per_function.rs:303 — crates/biome_js_analyze/src/lint/nursery/no_excessive_statements_per_function.rs:303-310 | crates/biome_js_analyze/src/lint/nursery/no_invalid_remove_event_listener.rs:173-179 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_syntax/src/jsx_ext.rs:46 — crates/biome_js_syntax/src/jsx_ext.rs:46-52 | crates/biome_js_syntax/src/jsx_ext.rs:54-60 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_rule_options/src/use_nullish_coalescing.rs:147 — crates/biome_rule_options/src/use_nullish_coalescing.rs:147-155 | crates/biome_rule_options/src/no_undeclared_dependencies.rs:56-62 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_formatter/src/builders.rs:1529 — crates/biome_formatter/src/builders.rs:1529-1537 | crates/biome_formatter/src/builders.rs:2573-2579 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_analyze/src/frameworks/mod.rs:94 — crates/biome_js_analyze/src/frameworks/mod.rs:94-101 | crates/biome_js_analyze/src/shared/node_process.rs:12-18 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_semantic/src/lib.rs:22 — crates/biome_js_semantic/src/lib.rs:22-28 | crates/biome_js_semantic/src/semantic_model/builder.rs:163-170 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_flat_math_min_max.rs:199 — crates/biome_js_analyze/src/lint/nursery/use_flat_math_min_max.rs:199-205 | crates/biome_js_formatter/src/utils/member_chain/mod.rs:571-577 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_graphql_parser/src/parser/definitions/operation.rs:132 — crates/biome_graphql_parser/src/parser/definitions/operation.rs:132-138 | crates/biome_graphql_parser/src/parser/definitions/schema.rs:58-64 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_object_from_entries.rs:935 — crates/biome_js_analyze/src/lint/nursery/use_object_from_entries.rs:935-945 | crates/biome_js_analyze/src/lint/nursery/use_math_trunc.rs:585-591 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_runtime/src/ast.rs:503 — crates/biome_js_runtime/src/ast.rs:503-510 | crates/biome_js_runtime/src/semantic.rs:357-363 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_css_formatter/src/utils/scss_include_keyword_value.rs:42 — crates/biome_css_formatter/src/utils/scss_include_keyword_value.rs:42-48 | crates/biome_markdown_formatter/src/markdown/auxiliary/inline_italic.rs:212-218 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_analyze/src/lint/complexity/use_array_some.rs:353 — crates/biome_js_analyze/src/lint/complexity/use_array_some.rs:353-361 | crates/biome_js_analyze/src/lint/nursery/use_includes.rs:684-690 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_diagnostics/src/panic.rs:114 — crates/biome_diagnostics/src/panic.rs:114-120 | crates/biome_service/src/db/state.rs:573-584 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_parser/src/syntax/module.rs:364 — crates/biome_js_parser/src/syntax/module.rs:364-370 | crates/biome_js_parser/src/syntax/typescript/types.rs:975-985 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_configuration/src/diagnostics.rs:274 — crates/biome_configuration/src/diagnostics.rs:274-280 | crates/biome_parser/src/diagnostic.rs:150-157 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_json_analyze/src/lint/nursery/use_package_json_valid_cpu.rs:227 — crates/biome_json_analyze/src/lint/nursery/use_package_json_valid_cpu.rs:227-233 | crates/biome_json_analyze/src/lint/nursery/use_package_json_valid_license.rs:200-206 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_js_parser/src/parser.rs:133 — crates/biome_js_parser/src/parser.rs:133-139 | crates/biome_markdown_parser/src/parser.rs:1017-1023 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/biome_css_formatter/src/scss/auxiliary/include_argument_list.rs:41 — crates/biome_css_formatter/src/scss/auxiliary/include_argument_list.rs:41-49 | crates/biome_css_formatter/src/scss/auxiliary/keyword_argument.rs:29-35 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×24
  • Edited copy of a member (18 corresponding lines) crates/biome_vue_semantic/src/semantic_model/component.rs:1002 — crates/biome_vue_semantic/src/semantic_model/component.rs:1002-1027 | crates/biome_vue_semantic/src/semantic_model/component.rs:1251-1268 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:646 — crates/biome_js_type_info/src/format_inferred_type_info.rs:646-670 | crates/biome_js_type_info/src/format_type_info.rs:957-974 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_rule_options/src/no_tailwind_restricted_classes.rs:60 — crates/biome_rule_options/src/no_tailwind_restricted_classes.rs:60-77 | crates/biome_rule_options/src/no_tailwind_restricted_classes.rs:103-120 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_js_formatter/src/js/expressions/bigint_literal_expression.rs:18 — crates/biome_js_formatter/src/js/expressions/bigint_literal_expression.rs:18-35 | crates/biome_js_formatter/src/ts/types/bigint_literal_type.rs:13-34 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_grit_parser/src/parser/patterns.rs:323 — crates/biome_grit_parser/src/parser/patterns.rs:323-342 | crates/biome_grit_parser/src/parser/patterns.rs:354-371 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs:54 — crates/biome_html_analyze/src/lint/nursery/no_non_scalable_viewport.rs:54-71 | crates/biome_js_analyze/src/lint/nursery/no_non_scalable_viewport.rs:56-74 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_react_compiler/src/convert_ast/expressions.rs:940 — crates/biome_react_compiler/src/convert_ast/expressions.rs:940-957 | crates/biome_react_compiler/src/convert_ast/expressions.rs:962-979 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_deserialize/src/json.rs:44 — crates/biome_deserialize/src/json.rs:44-61 | crates/biome_deserialize/src/yaml/mod.rs:56-73 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:59 — crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:59-76 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs:60-77 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_tailwind_parser/src/lexer/mod.rs:454 — crates/biome_tailwind_parser/src/lexer/mod.rs:454-471 | crates/biome_tailwind_parser/src/lexer/mod.rs:512-539 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_markdown_parser/src/to_html.rs:1889 — crates/biome_markdown_parser/src/to_html.rs:1889-1906 | crates/biome_markdown_syntax/src/text_ext.rs:44-61 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_css_formatter/src/scss/auxiliary/nesting_declaration.rs:8 — crates/biome_css_formatter/src/scss/auxiliary/nesting_declaration.rs:8-30 | crates/biome_html_formatter/src/svelte/auxiliary/debug_block.rs:9-26 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_magic_array_flat_depth.rs:78 — crates/biome_js_analyze/src/lint/nursery/no_magic_array_flat_depth.rs:78-95 | crates/biome_js_analyze/src/lint/nursery/use_lowercase_test_title.rs:151-168 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_css_parser/src/lexer/source_cursor.rs:73 — crates/biome_css_parser/src/lexer/source_cursor.rs:73-93 | crates/biome_json_parser/src/lexer/mod.rs:212-229 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_css_parser/src/syntax/at_rule/function.rs:135 — crates/biome_css_parser/src/syntax/at_rule/function.rs:135-152 | crates/biome_css_parser/src/syntax/at_rule/function.rs:160-177 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_css_formatter/src/comments.rs:207 — crates/biome_css_formatter/src/comments.rs:207-227 | crates/biome_css_formatter/src/comments.rs:231-248 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_css_parser/src/syntax/scss/at_rule/import_at_rule.rs:71 — crates/biome_css_parser/src/syntax/scss/at_rule/import_at_rule.rs:71-89 | crates/biome_css_parser/src/syntax/scss/at_rule/import_at_rule.rs:102-119 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_markdown_parser/src/syntax/mod.rs:700 — crates/biome_markdown_parser/src/syntax/mod.rs:700-717 | crates/biome_markdown_parser/src/syntax/mod.rs:801-820 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_html_analyze/src/lint/security/use_iframe_sandbox.rs:61 — crates/biome_html_analyze/src/lint/security/use_iframe_sandbox.rs:61-78 | crates/biome_js_analyze/src/lint/security/use_iframe_sandbox.rs:81-98 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:99 — crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:99-116 | crates/biome_css_analyze/src/lint/suspicious/no_duplicate_properties.rs:108-125 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_playwright_force_option.rs:104 — crates/biome_js_analyze/src/lint/suspicious/no_playwright_force_option.rs:104-121 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_networkidle.rs:116-133 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/arbitrary_value_match.rs:603 — crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/arbitrary_value_match.rs:603-620 | crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/arbitrary_value_match.rs:622-642 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_configuration/src/analyzer/mod.rs:1155 — crates/biome_configuration/src/analyzer/mod.rs:1155-1172 | crates/biome_configuration/src/analyzer/mod.rs:1174-1191 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/biome_service/src/file_handlers/md.rs:429 — crates/biome_service/src/file_handlers/md.rs:429-446 | crates/biome_service/src/file_handlers/md.rs:450-467 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×24
  • Edited copy of a member (12 corresponding lines) crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:124 — crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:124-141 | crates/biome_js_analyze/src/lint/correctness/no_unused_labels.rs:111-122 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:93 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:93-108 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:93-104 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_module_graph/src/db/type_inference/expressions.rs:110 — crates/biome_module_graph/src/db/type_inference/expressions.rs:110-121 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1962-1976 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_graphql_semantic/src/semantic_model/model.rs:118 — crates/biome_graphql_semantic/src/semantic_model/model.rs:118-129 | crates/biome_graphql_semantic/src/semantic_model/model.rs:154-166 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_configuration/src/editorconfig.rs:375 — crates/biome_configuration/src/editorconfig.rs:375-386 | crates/biome_configuration/src/editorconfig.rs:388-399 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_shared_branch_code.rs:373 — crates/biome_js_analyze/src/lint/nursery/no_shared_branch_code.rs:373-384 | crates/biome_js_analyze/src/lint/nursery/use_atomic_updates.rs:611-622 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:509 — crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:509-520 | crates/biome_js_analyze/src/lint/nursery/use_better_dom_traversing.rs:359-371 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_react_compiler/src/convert_ast/identifiers.rs:390 — crates/biome_react_compiler/src/convert_ast/identifiers.rs:390-404 | crates/biome_react_compiler/src/convert_ast/statements.rs:682-693 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_deserialize_macros/src/deserializable_derive.rs:632 — crates/biome_deserialize_macros/src/deserializable_derive.rs:632-643 | crates/biome_deserialize_macros/src/deserializable_derive.rs:667-678 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_double_equals.rs:95 — crates/biome_js_analyze/src/lint/suspicious/no_double_equals.rs:95-112 | crates/biome_js_analyze/src/lint/suspicious/no_equals_to_null.rs:60-71 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_db/src/testing.rs:127 — crates/biome_db/src/testing.rs:127-139 | crates/biome_db/src/testing.rs:169-180 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_js_semantic/src/semantic_model/closure.rs:205 — crates/biome_js_semantic/src/semantic_model/closure.rs:205-218 | crates/biome_js_semantic/src/semantic_model/scope.rs:190-201 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_js_analyze/src/lint/complexity/no_implicit_coercions.rs:516 — crates/biome_js_analyze/src/lint/complexity/no_implicit_coercions.rs:516-533 | crates/biome_js_analyze/src/lint/nursery/no_useless_type_conversion.rs:455-466 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_css_parser/src/lexer/mod.rs:1965 — crates/biome_css_parser/src/lexer/mod.rs:1965-1976 | crates/biome_graphql_parser/src/lexer/mod.rs:124-135 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_css_parser/src/syntax/scss/selector/interpolated_pseudo.rs:109 — crates/biome_css_parser/src/syntax/scss/selector/interpolated_pseudo.rs:109-120 | crates/biome_css_parser/src/syntax/scss/selector/interpolated_pseudo.rs:172-183 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_diagnostics/src/context.rs:573 — crates/biome_diagnostics/src/context.rs:573-584 | crates/biome_diagnostics/src/context.rs:586-597 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_module_graph/src/db/queries/type_inference/calls.rs:85 — crates/biome_module_graph/src/db/queries/type_inference/calls.rs:85-96 | crates/biome_module_graph/src/db/queries/type_inference/calls.rs:117-130 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:727 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:727-742 | crates/biome_markdown_formatter/src/bullet_list.rs:590-601 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_migrate/src/analyzers/all.rs:34 — crates/biome_migrate/src/analyzers/all.rs:34-45 | crates/biome_migrate/src/analyzers/organize_imports.rs:62-73 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_css_parser/src/syntax/scss/at_rule/else_clause.rs:28 — crates/biome_css_parser/src/syntax/scss/at_rule/else_clause.rs:28-40 | crates/biome_css_parser/src/syntax/at_rule/mod.rs:291-302 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_css_parser/src/syntax/scss/at_rule/mod.rs:114 — crates/biome_css_parser/src/syntax/scss/at_rule/mod.rs:114-127 | crates/biome_html_parser/src/syntax/svelte.rs:1396-1407 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_css_parser/src/syntax/selector/mod.rs:674 — crates/biome_css_parser/src/syntax/selector/mod.rs:674-685 | crates/biome_js_parser/src/syntax/module.rs:391-402 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_markdown_parser/src/lexer/mod.rs:1352 — crates/biome_markdown_parser/src/lexer/mod.rs:1352-1363 | crates/biome_markdown_parser/src/syntax/table.rs:414-425 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/biome_css_formatter/src/css/auxiliary/layer_declaration.rs:8 — crates/biome_css_formatter/src/css/auxiliary/layer_declaration.rs:8-19 | crates/biome_css_formatter/src/css/auxiliary/layer_reference.rs:8-21 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×23
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_cli/src/execute/migrate/eslint.rs:120 — crates/biome_cli/src/execute/migrate/eslint.rs:120-147 | crates/biome_cli/src/execute/migrate/eslint.rs:155-233 | crates/biome_cli/src/execute/migrate/prettier.rs:495-578 | crates/biome_cli/src/execute/migrate/stylelint.rs:93-164 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_cli/src/service/windows.rs:132 — crates/biome_cli/src/service/windows.rs:132-149 | crates/biome_cli/src/service/windows.rs:161-174 | crates/biome_cli/src/service/windows.rs:260-277 | crates/biome_cli/src/service/windows.rs:289-302 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_configuration/src/lib.rs:774 — crates/biome_configuration/src/lib.rs:774-797 | crates/biome_manifest/src/lib.rs:97-136 | crates/biome_manifest/src/lib.rs:156-201 | xtask/codegen/src/promote_rules.rs:564-587 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:135 — crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:135-154 | crates/biome_graphql_analyze/src/lint/style/no_excessive_lines_per_file.rs:135-154 | crates/biome_html_analyze/src/lint/style/no_excessive_lines_per_file.rs:135-154 | crates/biome_js_analyze/src/lint/style/no_excessive_lines_per_file.rs:149-165 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_css_analyze/src/suppression_action.rs:13 — crates/biome_css_analyze/src/suppression_action.rs:13-37 | crates/biome_graphql_analyze/src/suppression_action.rs:17-39 | crates/biome_html_analyze/src/suppression_action.rs:13-39 | crates/biome_yaml_analyze/src/suppression_action.rs:17-39 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_css_formatter/src/css/auxiliary/document_custom_matcher.rs:12 — crates/biome_css_formatter/src/css/auxiliary/document_custom_matcher.rs:12-38 | crates/biome_css_formatter/src/css/auxiliary/keyframes_scope_function.rs:12-38 | crates/biome_css_formatter/src/css/auxiliary/url_function.rs:8-39 | crates/biome_css_formatter/src/css/selectors/attribute_selector.rs:8-34 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_css_formatter/src/scss/auxiliary/media_query.rs:13 — crates/biome_css_formatter/src/scss/auxiliary/media_query.rs:13-23 | crates/biome_html_formatter/src/svelte/auxiliary/await_catch_clause.rs:7-17 | crates/biome_html_formatter/src/svelte/auxiliary/await_then_clause.rs:7-17 | crates/biome_js_formatter/src/js/bindings/array_binding_pattern_element.rs:15-24 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_css_parser/src/lexer/mod.rs:1704 — crates/biome_css_parser/src/lexer/mod.rs:1704-1716 | crates/biome_graphql_parser/src/lexer/mod.rs:311-323 | crates/biome_grit_parser/src/lexer/mod.rs:326-338 | crates/biome_json_parser/src/lexer/mod.rs:371-383 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_formatter/src/builders.rs:636 — crates/biome_formatter/src/builders.rs:636-648 | crates/biome_html_formatter/src/utils/children.rs:81-93 | crates/biome_js_formatter/src/utils/jsx.rs:426-438 | crates/biome_markdown_formatter/src/words.rs:47-59 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_graphql_formatter/src/lib.rs:187 — crates/biome_graphql_formatter/src/lib.rs:187-196 | crates/biome_grit_formatter/src/lib.rs:81-90 | crates/biome_json_formatter/src/lib.rs:189-198 | crates/biome_markdown_formatter/src/lib.rs:232-241 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_grit_formatter/src/grit/patterns/pattern_definition.rs:8 — crates/biome_grit_formatter/src/grit/patterns/pattern_definition.rs:8-41 | crates/biome_js_formatter/src/js/module/export_from_clause.rs:13-41 | crates/biome_js_formatter/src/ts/declarations/enum_declaration.rs:10-48 | crates/biome_js_formatter/src/ts/declarations/import_equals_declaration.rs:16-43 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:129 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:129-139 | crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:229-249 | crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:137-154 | crates/biome_html_analyze/src/lint/nursery/use_tailwind_variables_shorthand.rs:98-108 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_html_parser/src/lexer/mod.rs:123 — crates/biome_html_parser/src/lexer/mod.rs:123-172 | crates/biome_html_parser/src/lexer/mod.rs:177-231 | crates/biome_html_parser/src/lexer/mod.rs:239-298 | crates/biome_html_parser/src/lexer/mod.rs:310-363 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_html_parser/src/lexer/mod.rs:1898 — crates/biome_html_parser/src/lexer/mod.rs:1898-1919 | crates/biome_js_parser/src/lexer/mod.rs:246-270 | crates/biome_markdown_parser/src/lexer/mod.rs:196-217 | crates/biome_tailwind_parser/src/lexer/mod.rs:663-684 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_html_parser/src/lexer/mod.rs:2196 — crates/biome_html_parser/src/lexer/mod.rs:2196-2207 | crates/biome_js_parser/src/lexer/mod.rs:337-348 | crates/biome_markdown_parser/src/lexer/mod.rs:1904-1915 | crates/biome_tailwind_parser/src/lexer/mod.rs:709-720 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_js_analyze/src/lint/complexity/no_adjacent_spaces_in_regex.rs:132 — crates/biome_js_analyze/src/lint/complexity/no_adjacent_spaces_in_regex.rs:132-202 | crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs:278-309 | crates/biome_js_analyze/src/lint/nursery/use_vue_base_import.rs:91-113 | crates/biome_js_analyze/src/lint/suspicious/no_misleading_character_class.rs:143-165 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_js_analyze/src/lint/complexity/no_useless_lone_block_statements.rs:116 — crates/biome_js_analyze/src/lint/complexity/no_useless_lone_block_statements.rs:116-145 | crates/biome_js_analyze/src/lint/complexity/no_useless_undefined_initialization.rs:153-221 | crates/biome_js_analyze/src/lint/nursery/no_useless_await.rs:114-179 | crates/biome_js_analyze/src/lint/nursery/use_unary_minus.rs:110-157 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:286 — crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:286-298 | crates/biome_js_analyze/src/lint/nursery/use_global_regex_in_replace_all.rs:191-204 | crates/biome_js_analyze/src/lint/style/use_named_capture_group.rs:148-161 | crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:300-313 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_js_analyze/src/lint/nursery/no_console_spaces.rs:122 — crates/biome_js_analyze/src/lint/nursery/no_console_spaces.rs:122-139 | crates/biome_js_analyze/src/lint/nursery/use_vue_matching_component_file_name.rs:186-217 | crates/biome_js_analyze/src/lint/style/use_numeric_separators.rs:227-246 | crates/biome_js_analyze/src/lint/suspicious/no_octal_escape.rs:100-127 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_lsp/src/handlers/analysis.rs:58 — crates/biome_lsp/src/handlers/analysis.rs:58-378 | crates/biome_lsp/src/handlers/formatting.rs:25-105 | crates/biome_lsp/src/handlers/formatting.rs:111-212 | crates/biome_lsp/src/handlers/formatting.rs:218-300 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_service/src/file_handlers/css.rs:582 — crates/biome_service/src/file_handlers/css.rs:582-592 | crates/biome_service/src/file_handlers/graphql.rs:469-479 | crates/biome_service/src/file_handlers/grit.rs:407-417 | crates/biome_service/src/file_handlers/json.rs:542-552 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_syntax_codegen/src/generate_node_factory.rs:15 — crates/biome_syntax_codegen/src/generate_node_factory.rs:15-226 | crates/biome_syntax_codegen/src/generate_nodes.rs:12-953 | xtask/codegen/src/generate_node_factory.rs:8-219 | xtask/codegen/src/generate_nodes.rs:9-994 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/biome_tailwind_parser/src/lexer/mod.rs:50 — crates/biome_tailwind_parser/src/lexer/mod.rs:50-88 | crates/biome_tailwind_parser/src/lexer/mod.rs:90-108 | crates/biome_tailwind_parser/src/lexer/mod.rs:142-159 | crates/biome_tailwind_parser/src/lexer/mod.rs:161-203 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×23
  • Edited copy of a member (20 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:124 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:124-146 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:106-125 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_cli/src/reporter/summary.rs:65 — crates/biome_cli/src/reporter/summary.rs:65-85 | crates/biome_cli/src/reporter/terminal.rs:60-79 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_undeclared_env_vars.rs:171 — crates/biome_js_analyze/src/lint/suspicious/no_undeclared_env_vars.rs:171-190 | crates/biome_js_analyze/src/lint/suspicious/no_undeclared_env_vars.rs:196-222 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:118 — crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:118-137 | crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs:119-145 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_css_analyze/src/lint/suspicious/use_baseline.rs:531 — crates/biome_css_analyze/src/lint/suspicious/use_baseline.rs:531-556 | crates/biome_css_analyze/src/lint/suspicious/use_baseline.rs:583-602 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:93 — crates/biome_html_parser/src/syntax/svelte.rs:93-112 | crates/biome_html_parser/src/syntax/svelte.rs:775-798 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_css_formatter/src/scss/lists/import_item_list.rs:19 — crates/biome_css_formatter/src/scss/lists/import_item_list.rs:19-45 | crates/biome_css_formatter/src/utils/media_query_comments.rs:17-36 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_console/src/markup.rs:214 — crates/biome_console/src/markup.rs:214-234 | crates/biome_console/src/markup.rs:236-255 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_analyze/src/lint/a11y/use_html_lang.rs:79 — crates/biome_js_analyze/src/lint/a11y/use_html_lang.rs:79-98 | crates/biome_js_analyze/src/lint/a11y/use_iframe_title.rs:85-104 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_analyze/src/lint/style/use_const.rs:311 — crates/biome_js_analyze/src/lint/style/use_const.rs:311-330 | crates/biome_js_analyze/src/lint/style/use_const.rs:475-494 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_graphql_formatter/src/graphql/auxiliary/union_member_types.rs:51 — crates/biome_graphql_formatter/src/graphql/auxiliary/union_member_types.rs:51-70 | crates/biome_js_formatter/src/ts/types/union_type.rs:163-185 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_type_info/src/inferred_type.rs:1548 — crates/biome_js_type_info/src/inferred_type.rs:1548-1568 | crates/biome_js_type_info/src/inferred_type.rs:1683-1702 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_css_parser/src/syntax/at_rule/media.rs:387 — crates/biome_css_parser/src/syntax/at_rule/media.rs:387-406 | crates/biome_css_parser/src/syntax/scss/at_rule/media.rs:223-242 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_unused_private_class_members.rs:445 — crates/biome_js_analyze/src/lint/correctness/no_unused_private_class_members.rs:445-466 | crates/biome_js_analyze/src/lint/style/use_readonly_class_properties.rs:363-382 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_formatter/src/js/classes/static_initialization_block_class_member.rs:17 — crates/biome_js_formatter/src/js/classes/static_initialization_block_class_member.rs:17-37 | crates/biome_js_formatter/src/ts/auxiliary/module_block.rs:11-30 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_css_analyze/src/lint/nursery/no_unused_classes.rs:98 — crates/biome_css_analyze/src/lint/nursery/no_unused_classes.rs:98-119 | crates/biome_js_analyze/src/lint/nursery/no_return_array_push.rs:150-169 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_analyze/src/lint/correctness/use_parse_int_radix.rs:117 — crates/biome_js_analyze/src/lint/correctness/use_parse_int_radix.rs:117-136 | crates/biome_js_analyze/src/lint/style/use_numeric_separators.rs:202-225 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_parser/src/syntax/object.rs:420 — crates/biome_js_parser/src/syntax/object.rs:420-439 | crates/biome_js_parser/src/syntax/typescript/statement.rs:27-48 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_focusable_interactive.rs:58 — crates/biome_html_analyze/src/lint/a11y/use_focusable_interactive.rs:58-81 | crates/biome_js_analyze/src/lint/a11y/use_focusable_interactive.rs:61-80 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_css_parser/src/syntax/at_rule/charset.rs:52 — crates/biome_css_parser/src/syntax/at_rule/charset.rs:52-71 | crates/biome_css_parser/src/syntax/selector/mod.rs:782-804 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_graphql_parser/src/parser/definitions/field.rs:76 — crates/biome_graphql_parser/src/parser/definitions/field.rs:76-95 | crates/biome_graphql_parser/src/parser/definitions/field.rs:152-172 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_js_analyze/src/lint/complexity/no_excessive_nested_callbacks.rs:142 — crates/biome_js_analyze/src/lint/complexity/no_excessive_nested_callbacks.rs:142-162 | crates/biome_js_analyze/src/lint/nursery/no_excessive_statements_per_function.rs:206-225 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/biome_markdown_parser/src/lexer/mod.rs:1304 — crates/biome_markdown_parser/src/lexer/mod.rs:1304-1323 | crates/biome_markdown_parser/src/lexer/mod.rs:1369-1392 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×23
  • Duplicated block (18 lines × 2) crates/biome_analyze/src/lib.rs:466 — crates/biome_analyze/src/lib.rs:466-483 | crates/biome_analyze/src/lib.rs:511-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_analyze/src/lib.rs:466` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:94 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:94-111 | crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs:86-103 — before extracting anything, compare `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs` and `crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:94` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) crates/biome_cli/src/reporter/summary.rs:341 — crates/biome_cli/src/reporter/summary.rs:341-358 | crates/biome_cli/src/reporter/summary.rs:375-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/reporter/summary.rs:341` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:129 — crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:129-146 | crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:191-208 — before extracting anything, compare `crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs` and `crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:129` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_css_formatter/src/scss/statements/function_at_rule.rs:11 — crates/biome_css_formatter/src/scss/statements/function_at_rule.rs:11-28 | crates/biome_css_formatter/src/scss/statements/mixin_at_rule.rs:11-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/statements/function_at_rule.rs:11` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&ScssFunctionAtRule` in one and `&ScssMixinAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 2) crates/biome_formatter/src/lib.rs:1873 — crates/biome_formatter/src/lib.rs:1873-1890 | crates/biome_formatter/src/lib.rs:1951-1968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_formatter/src/lib.rs:1873` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_aria_props_supported_by_role.rs:99 — crates/biome_html_analyze/src/lint/a11y/use_aria_props_supported_by_role.rs:99-116 | crates/biome_js_analyze/src/lint/a11y/use_aria_props_supported_by_role.rs:100-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:231 — crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:231-248 | crates/biome_js_analyze/src/lint/correctness/no_unused_variables.rs:447-464 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:231` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_js_analyze/src/lint/style/use_export_type.rs:321 — crates/biome_js_analyze/src/lint/style/use_export_type.rs:321-338 | crates/biome_js_analyze/src/lint/style/use_export_type.rs:355-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/biome_js_formatter/src/js/declarations/for_variable_declaration.rs:13 — crates/biome_js_formatter/src/js/declarations/for_variable_declaration.rs:13-30 | crates/biome_js_formatter/src/js/declarations/variable_declaration.rs:13-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/declarations/for_variable_declaration.rs:13` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsForVariableDeclaration` in one and `&JsVariableDeclaration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 2) crates/biome_js_type_info/src/local_inference.rs:993 — crates/biome_js_type_info/src/local_inference.rs:993-1010 | crates/biome_js_type_info/src/local_inference.rs:1024-1041 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/local_inference.rs:993` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `decl` to `&JsClassDeclaration` in one and `&JsClassExpression` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 2) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:736 — crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:736-753 | crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:763-780 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:736` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_module_graph/src/db/type_inference/expressions.rs:2927 — crates/biome_module_graph/src/db/type_inference/expressions.rs:2927-2944 | crates/biome_module_graph/src/db/type_inference/lookup.rs:939-956 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) crates/biome_module_graph/src/db/type_inference/promise_classification.rs:849 — crates/biome_module_graph/src/db/type_inference/promise_classification.rs:849-866 | crates/biome_module_graph/src/db/type_inference/promise_classification.rs:977-994 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/promise_classification.rs:849` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_rowan/src/syntax/token.rs:240 — crates/biome_rowan/src/syntax/token.rs:240-257 | crates/biome_rowan/src/syntax/token.rs:270-287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_rowan/src/syntax/token.rs:240` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_service/src/file_handlers/graphql.rs:370 — crates/biome_service/src/file_handlers/graphql.rs:370-387 | crates/biome_service/src/file_handlers/json.rs:439-456 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/json.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/graphql.rs:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:362 — crates/biome_syntax_codegen/src/generate_nodes.rs:362-379 | xtask/codegen/src/generate_nodes.rs:392-409 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) crates/biome_vue_semantic/src/semantic_model/component.rs:1458 — crates/biome_vue_semantic/src/semantic_model/component.rs:1458-1475 | crates/biome_vue_semantic/src/semantic_model/component.rs:1518-1535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_vue_semantic/src/semantic_model/component.rs:1458` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:112 — crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:112-129 | crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:123-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (18 lines × 2) crates/biome_css_formatter/src/css/statements/document_at_rule.rs:7 — crates/biome_css_formatter/src/css/statements/document_at_rule.rs:7-24 | crates/biome_css_formatter/src/css/statements/keyframes_at_rule.rs:8-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssDocumentAtRule` in one and `&CssKeyframesAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 2) crates/biome_js_formatter/src/js/bindings/rest_parameter.rs:11 — crates/biome_js_formatter/src/js/bindings/rest_parameter.rs:11-28 | crates/biome_js_formatter/src/ts/auxiliary/external_module_reference.rs:15-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/ts/auxiliary/external_module_reference.rs:15` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsRestParameter` in one and `&TsExternalModuleReference` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 2) crates/biome_js_formatter/src/js/statements/try_statement.rs:11 — crates/biome_js_formatter/src/js/statements/try_statement.rs:11-28 | crates/biome_js_formatter/src/ts/declarations/module_declaration.rs:11-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsTryStatement` in one and `&TsModuleDeclaration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 2) crates/biome_service/src/file_handlers/md.rs:656 — crates/biome_service/src/file_handlers/md.rs:656-673 | crates/biome_service/src/file_handlers/yaml.rs:519-536 — before extracting anything, compare `crates/biome_service/src/file_handlers/md.rs` and `crates/biome_service/src/file_handlers/yaml.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 248 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/md.rs:656` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×22
  • Edited copy of a member (19 corresponding lines) crates/biome_js_analyze/src/ast_utils.rs:36 — crates/biome_js_analyze/src/ast_utils.rs:36-54 | crates/biome_js_analyze/src/ast_utils.rs:56-74 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_consistent_json_file_read.rs:397 — crates/biome_js_analyze/src/lint/nursery/use_consistent_json_file_read.rs:397-417 | crates/biome_js_analyze/src/lint/nursery/use_consistent_json_file_read.rs:421-439 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_module_graph/src/type_inference/requests/member.rs:56 — crates/biome_module_graph/src/type_inference/requests/member.rs:56-74 | crates/biome_module_graph/src/type_inference/requests/member.rs:111-131 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_html_analyze/src/lint/nursery/use_vue_v_model.rs:248 — crates/biome_html_analyze/src/lint/nursery/use_vue_v_model.rs:248-266 | crates/biome_html_analyze/src/lint/nursery/use_vue_v_model.rs:270-289 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_configuration_macros/src/lib.rs:11 — crates/biome_configuration_macros/src/lib.rs:11-38 | crates/biome_configuration_macros/src/lib.rs:69-87 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_tailwind_parser/src/syntax/value.rs:56 — crates/biome_tailwind_parser/src/syntax/value.rs:56-74 | crates/biome_tailwind_parser/src/syntax/value.rs:76-98 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_html_analyze/src/lint/style/no_inline_styles.rs:108 — crates/biome_html_analyze/src/lint/style/no_inline_styles.rs:108-126 | crates/biome_js_analyze/src/lint/style/no_inline_styles.rs:102-125 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_focusable_interactive.rs:83 — crates/biome_html_analyze/src/lint/a11y/use_focusable_interactive.rs:83-102 | crates/biome_js_analyze/src/lint/a11y/use_focusable_interactive.rs:82-100 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_markdown_formatter/src/words.rs:296 — crates/biome_markdown_formatter/src/words.rs:296-314 | crates/biome_markdown_formatter/src/words.rs:316-334 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_formatter/src/lib.rs:1237 — crates/biome_formatter/src/lib.rs:1237-1255 | crates/biome_formatter/src/lib.rs:1261-1282 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_css_formatter/src/utils/string_utils.rs:257 — crates/biome_css_formatter/src/utils/string_utils.rs:257-275 | crates/biome_js_formatter/src/utils/string_utils.rs:330-348 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_vue_consistent_prop_name_casing.rs:157 — crates/biome_js_analyze/src/lint/nursery/use_vue_consistent_prop_name_casing.rs:157-175 | crates/biome_js_analyze/src/lint/nursery/use_vue_registered_component_name_casing.rs:134-152 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_yaml_formatter/src/comments.rs:247 — crates/biome_yaml_formatter/src/comments.rs:247-265 | crates/biome_yaml_formatter/src/yaml/auxiliary/root.rs:34-58 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_positive_tabindex.rs:84 — crates/biome_html_analyze/src/lint/a11y/no_positive_tabindex.rs:84-102 | crates/biome_js_analyze/src/lint/a11y/no_positive_tabindex.rs:156-174 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:99 — crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:99-117 | crates/biome_js_analyze/src/lint/a11y/use_valid_autocomplete.rs:104-128 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_console/src/write/termcolor.rs:21 — crates/biome_console/src/write/termcolor.rs:21-41 | crates/biome_console/src/write/termcolor.rs:43-61 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_grit_parser/src/parser/patterns.rs:685 — crates/biome_grit_parser/src/parser/patterns.rs:685-708 | crates/biome_grit_parser/src/parser/predicates.rs:243-261 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_fs/src/fs/os.rs:100 — crates/biome_fs/src/fs/os.rs:100-118 | crates/biome_fs/src/fs/os.rs:120-138 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_grit_formatter/src/grit/auxiliary/files.rs:7 — crates/biome_grit_formatter/src/grit/auxiliary/files.rs:7-25 | crates/biome_js_formatter/src/ts/classes/constructor_signature_class_member.rs:16-34 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_private_imports.rs:335 — crates/biome_js_analyze/src/lint/correctness/no_private_imports.rs:335-353 | crates/biome_js_analyze/src/lint/correctness/no_private_imports.rs:360-380 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_catch_assign.rs:88 — crates/biome_js_analyze/src/lint/suspicious/no_catch_assign.rs:88-106 | crates/biome_js_analyze/src/lint/suspicious/no_ts_ignore.rs:87-108 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/biome_graphql_formatter/src/graphql/extensions/scalar_type_extension.rs:12 — crates/biome_graphql_formatter/src/graphql/extensions/scalar_type_extension.rs:12-31 | crates/biome_html_formatter/src/svelte/auxiliary/key_opening_block.rs:8-26 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 · Cognitive Complexity · biome_module_graph · ×21
  • biome_module_graph::db::type_inference::promise_classification::classify_expression (cognitive 491) crates/biome_module_graph/src/db/type_inference/promise_classification.rs:177 — biome_module_graph::db::type_inference::promise_classification::classify_expression has cognitive complexity 491 (threshold 15). Drivers by points: if/else 76 (341 pts), match/switch 32 (123 pts), loops 4 (16 pts), boolean chains 11 (nesting depth added 368). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::type_inference::calls::implementation::infer_generic_return_type (cognitive 59) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1770 — biome_module_graph::db::queries::type_inference::calls::implementation::infer_generic_return_type has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (43 pts), match/switch 3 (9 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::type_inference::lookup::find_member_key_type_with_resolver (cognitive 41) crates/biome_module_graph/src/db/type_inference/lookup.rs:421 — biome_module_graph::db::type_inference::lookup::find_member_key_type_with_resolver has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (35 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::find_js_exported_symbol (cognitive 37) crates/biome_module_graph/src/db/queries.rs:33 — biome_module_graph::db::queries::find_js_exported_symbol has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 4 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::type_inference::calls::implementation::matched_parameter_types (cognitive 37) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:775 — biome_module_graph::db::queries::type_inference::calls::implementation::matched_parameter_types has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 2, loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::find_jsdoc_for_exported_symbol (cognitive 33) crates/biome_module_graph/src/db/queries.rs:124 — biome_module_graph::db::queries::find_jsdoc_for_exported_symbol has cognitive complexity 33 (threshold 15). Drivers by points: if/else 4 (15 pts), match/switch 4 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::type_inference::calls::implementation::expanded_tuple_sequence (cognitive 32) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:262 — biome_module_graph::db::queries::type_inference::calls::implementation::expanded_tuple_sequence has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 3 (9 pts), loops 3 (7 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::type_inference::inference_scc (cognitive 28) crates/biome_module_graph/src/db/type_inference/mod.rs:188 — biome_module_graph::db::type_inference::inference_scc has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (7 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::type_inference::resolver::cyclic_dependency_ids (cognitive 25) crates/biome_module_graph/src/db/type_inference/resolver.rs:156 — biome_module_graph::db::type_inference::resolver::cyclic_dependency_ids has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::js_scc::compute_sccs (cognitive 24) crates/biome_module_graph/src/db/queries/js_scc.rs:90 — biome_module_graph::db::queries::js_scc::compute_sccs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 6 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::type_inference::calls::implementation::collect_callback_return_replacements (cognitive 24) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1943 — biome_module_graph::db::queries::type_inference::calls::implementation::collect_callback_return_replacements has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_module_graph::db::queries::css::traverse_import_tree_for_html_classes (cognitive 22) crates/biome_module_graph/src/db/queries/css.rs:222 — biome_module_graph::db::queries::css::traverse_import_tree_for_html_classes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::html_module_info::visitor::collect_css_classes (cognitive 21) crates/biome_module_graph/src/html_module_info/visitor.rs:317 — biome_module_graph::html_module_info::visitor::collect_css_classes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::type_inference::calls::implementation::required_structural_member_names (cognitive 20) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1522 — biome_module_graph::db::queries::type_inference::calls::implementation::required_structural_member_names has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::css::is_class_used_in_component_tree (cognitive 19) crates/biome_module_graph/src/db/queries/css.rs:612 — biome_module_graph::db::queries::css::is_class_used_in_component_tree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::queries::type_inference::calls::implementation::lists_every_member (cognitive 19) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1582 — biome_module_graph::db::queries::type_inference::calls::implementation::lists_every_member has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::js_module_info::flow::guards::condition_step (cognitive 19) crates/biome_module_graph/src/js_module_info/flow/guards.rs:659 — biome_module_graph::js_module_info::flow::guards::condition_step has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (5 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::js_module_info::flow::guards::comparison_step (cognitive 17) crates/biome_module_graph/src/js_module_info/flow/guards.rs:745 — biome_module_graph::js_module_info::flow::guards::comparison_step has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 4 (8 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_module_graph::db::queries::css::search_css_class_transitive (cognitive 16) crates/biome_module_graph/src/db/queries/css.rs:660 — biome_module_graph::db::queries::css::search_css_class_transitive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::type_inference::imports::find_export_origin (cognitive 16) crates/biome_module_graph/src/db/type_inference/imports.rs:130 — biome_module_graph::db::type_inference::imports::find_export_origin has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_module_graph::db::type_inference::lookup::find_own_member_type (cognitive 16) crates/biome_module_graph/src/db/type_inference/lookup.rs:859 — biome_module_graph::db::type_inference::lookup::find_own_member_type has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (3 pts) (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×21
  • Edited copy of a member (10 corresponding lines) crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:718 — crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:718-731 | crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:390-399 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:244 — crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:244-253 | crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:294-306 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_vue_deprecated_scoped_slots.rs:116 — crates/biome_js_analyze/src/lint/nursery/no_vue_deprecated_scoped_slots.rs:116-126 | crates/biome_js_analyze/src/lint/suspicious/use_namespace_keyword.rs:79-88 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_grit_patterns/src/pattern_compiler/if_compiler.rs:15 — crates/biome_grit_patterns/src/pattern_compiler/if_compiler.rs:15-24 | crates/biome_grit_patterns/src/pattern_compiler/if_compiler.rs:33-42 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_analyze/src/shared/sort_attributes.rs:20 — crates/biome_analyze/src/shared/sort_attributes.rs:20-29 | crates/biome_analyze/src/shared/sort_attributes.rs:31-40 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_syntax_codegen/src/ast.rs:529 — crates/biome_syntax_codegen/src/ast.rs:529-538 | xtask/codegen/src/js_kinds_src.rs:567-576 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_loop_func.rs:205 — crates/biome_js_analyze/src/lint/suspicious/no_loop_func.rs:205-214 | crates/biome_js_analyze/src/react/hooks.rs:55-64 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_js_syntax/src/stmt_ext.rs:93 — crates/biome_js_syntax/src/stmt_ext.rs:93-102 | crates/biome_js_syntax/src/stmt_ext.rs:121-130 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_yaml_parser/src/lexer/mod.rs:901 — crates/biome_yaml_parser/src/lexer/mod.rs:901-910 | crates/biome_yaml_parser/src/lexer/mod.rs:924-933 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:610 — crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:610-619 | crates/biome_js_analyze/src/lint/correctness/use_hook_at_top_level.rs:648-657 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:3164 — crates/biome_markdown_parser/src/syntax/list.rs:3164-3173 | crates/biome_markdown_parser/src/syntax/mod.rs:656-666 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_graphql_parser/src/parser/argument.rs:72 — crates/biome_graphql_parser/src/parser/argument.rs:72-85 | crates/biome_graphql_parser/src/parser/value.rs:225-234 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_js_syntax/src/parameter_ext.rs:233 — crates/biome_js_syntax/src/parameter_ext.rs:233-242 | crates/biome_js_syntax/src/parameter_ext.rs:334-343 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_html_parser/src/syntax/vue.rs:289 — crates/biome_html_parser/src/syntax/vue.rs:289-298 | crates/biome_html_parser/src/syntax/vue.rs:300-313 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_parser/src/lib.rs:381 — crates/biome_parser/src/lib.rs:381-390 | crates/biome_parser/src/lib.rs:393-402 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_js_parser/src/syntax/class.rs:1227 — crates/biome_js_parser/src/syntax/class.rs:1227-1239 | crates/biome_js_parser/src/syntax/expr.rs:1725-1734 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_service/src/file_handlers/md.rs:487 — crates/biome_service/src/file_handlers/md.rs:487-497 | crates/biome_service/src/file_handlers/yaml.rs:398-407 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_event_hyphenation.rs:278 — crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_event_hyphenation.rs:278-290 | crates/biome_ruledoc/src/lower.rs:262-271 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs:48 — crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs:48-57 | crates/biome_graphql_parser/src/parser/variable.rs:8-18 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_service/src/file_handlers/grit.rs:48 — crates/biome_service/src/file_handlers/grit.rs:48-57 | crates/biome_service/src/file_handlers/md.rs:72-83 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/biome_plugin_loader/src/diagnostics.rs:191 — crates/biome_plugin_loader/src/diagnostics.rs:191-201 | crates/biome_service/src/diagnostics.rs:334-343 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 · Cognitive Complexity · biome_service · ×20
  • biome_service::file_handlers::html::parse_embedded_nodes::parse_embedded_nodes (cognitive 156) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:29 — biome_service::file_handlers::html::parse_embedded_nodes::parse_embedded_nodes has cognitive complexity 156 (threshold 15). Drivers by points: if/else 36 (89 pts), loops 17 (36 pts), boolean chains 27, match/switch 2 (4 pts) (nesting depth added 74). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_service::file_handlers::html::parse_embedded_nodes::parse_svelte_blocks (cognitive 76) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:504 — biome_service::file_handlers::html::parse_embedded_nodes::parse_svelte_blocks has cognitive complexity 76 (threshold 15). Drivers by points: if/else 15 (51 pts), boolean chains 11, loops 3 (7 pts), match/switch 2 (7 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::html::parse_embedded_nodes::parse_matched_embed (cognitive 40) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:1208 — biome_service::file_handlers::html::parse_embedded_nodes::parse_matched_embed has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 5 (13 pts), boolean chains 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_service::workspace_types::generate_type (cognitive 40) crates/biome_service/src/workspace_types.rs:572 — biome_service::workspace_types::generate_type has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::css::go_to::resolve_definition (cognitive 37) crates/biome_service/src/file_handlers/css/go_to.rs:14 — biome_service::file_handlers::css::go_to::resolve_definition has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::javascript::go_to::resolve_binding (cognitive 33) crates/biome_service/src/file_handlers/javascript/go_to.rs:26 — biome_service::file_handlers::javascript::go_to::resolve_binding has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::css::fix_all (cognitive 30) crates/biome_service/src/file_handlers/css.rs:878 — biome_service::file_handlers::css::fix_all has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 3 (5 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::html::go_to::resolve_binding_html (cognitive 30) crates/biome_service/src/file_handlers/html/go_to.rs:25 — biome_service::file_handlers::html::go_to::resolve_binding_html has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::javascript::fix_all (cognitive 30) crates/biome_service/src/file_handlers/javascript.rs:1569 — biome_service::file_handlers::javascript::fix_all has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 3 (5 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::json::fix_all (cognitive 29) crates/biome_service/src/file_handlers/json.rs:832 — biome_service::file_handlers::json::fix_all has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::workspace_types::instance_type (cognitive 25) crates/biome_service/src/workspace_types.rs:95 — biome_service::workspace_types::instance_type has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_service::scanner::scan_dependencies (cognitive 24) crates/biome_service/src/scanner.rs:737 — biome_service::scanner::scan_dependencies has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 6 (8 pts) (nesting depth added 12). Of this number, 21 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::html::format_embedded (cognitive 22) crates/biome_service/src/file_handlers/html.rs:803 — biome_service::file_handlers::html::format_embedded has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 5 (8 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::javascript::go_to::resolve_import_definition (cognitive 19) crates/biome_service/src/file_handlers/javascript/go_to.rs:212 — biome_service::file_handlers::javascript::go_to::resolve_import_definition has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 5 (9 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_service::file_handlers::graphql::fix_all (cognitive 18) crates/biome_service/src/file_handlers/graphql.rs:710 — biome_service::file_handlers::graphql::fix_all has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::html::fix_all (cognitive 18) crates/biome_service/src/file_handlers/html.rs:1366 — biome_service::file_handlers::html::fix_all has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::md::fix_all (cognitive 18) crates/biome_service/src/file_handlers/md.rs:743 — biome_service::file_handlers::md::fix_all has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::yaml::fix_all (cognitive 18) crates/biome_service/src/file_handlers/yaml.rs:605 — biome_service::file_handlers::yaml::fix_all has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::configuration::load_user_config (cognitive 17) crates/biome_service/src/configuration.rs:409 — biome_service::configuration::load_user_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_service::file_handlers::parse_lang_and_setup_from_script_opening_tag (cognitive 16) crates/biome_service/src/file_handlers/mod.rs:1539 — biome_service::file_handlers::parse_lang_and_setup_from_script_opening_tag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×20
  • JavaScript dependencies are not locked crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/package.json:3 — crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/nursery/noRestrictedDependencies/invalid/package.json:2 — crates/biome_json_analyze/tests/specs/nursery/noRestrictedDependencies/invalid/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/nursery/noRestrictedDependencies/valid/package.json:2 — crates/biome_json_analyze/tests/specs/nursery/noRestrictedDependencies/valid/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/source/useSortedPackageJson/already_sorted/package.json:8 — crates/biome_json_analyze/tests/specs/source/useSortedPackageJson/already_sorted/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/source/useSortedPackageJson/basic/package.json:2 — crates/biome_json_analyze/tests/specs/source/useSortedPackageJson/basic/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/dependencies-devDependencies/package.json:3 — crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/dependencies-devDependencies/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/dependencies-optionalDependencies/package.json:3 — crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/dependencies-optionalDependencies/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/dependencies-peerDependencies/package.json:3 — crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/dependencies-peerDependencies/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/dependencies/package.json:3 — crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/dependencies/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/optionalDependencies-peerDependencies/package.json:3 — crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/invalid/optionalDependencies-peerDependencies/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/valid/optionalDependencies-devDependencies/package.json:3 — crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/valid/optionalDependencies-devDependencies/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/valid/peerDependencies-devDependencies/package.json:3 — crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies/valid/peerDependencies-devDependencies/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/allow_option/package.json:2 — crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/allow_option/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/deny_option/package.json:2 — crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/deny_option/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/deprecated_license/package.json:2 — crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/deprecated_license/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/fsf_required/package.json:2 — crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/fsf_required/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/ignore_deprecated/package.json:2 — crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/ignore_deprecated/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/invalid/package.json:2 — crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/invalid/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/osi_required/package.json:2 — crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/osi_required/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/valid/package.json:2 — crates/biome_json_analyze/tests/specs/suspicious/noUntrustedLicenses/valid/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
D2 · Cognitive Complexity · biome_js_parser · ×19
  • biome_js_parser::syntax::expr::parse_binary_or_logical_expression (cognitive 64) crates/biome_js_parser/src/syntax/expr.rs:531 — biome_js_parser::syntax::expr::parse_binary_or_logical_expression has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (47 pts), boolean chains 7, match/switch 2 (7 pts), loops 2 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::function::is_parenthesized_arrow_function_expression_impl (cognitive 38) crates/biome_js_parser/src/syntax/function.rs:727 — biome_js_parser::syntax::function::is_parenthesized_arrow_function_expression_impl has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 7 (19 pts), if/else 10 (18 pts), boolean chains 1 (nesting depth added 20). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_parser::syntax::class::parse_class_member_impl (cognitive 35) crates/biome_js_parser/src/syntax/class.rs:635 — biome_js_parser::syntax::class::parse_class_member_impl has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 3, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::stmt::parse_variable_declarator (cognitive 31) crates/biome_js_parser/src/syntax/stmt.rs:1366 — biome_js_parser::syntax::stmt::parse_variable_declarator has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 11, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::expr::parse_unary_expr (cognitive 26) crates/biome_js_parser/src/syntax/expr.rs:1866 — biome_js_parser::syntax::expr::parse_unary_expr has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::stmt::parse_for_head (cognitive 24) crates/biome_js_parser/src/syntax/stmt.rs:1598 — biome_js_parser::syntax::stmt::parse_for_head has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::expr::parse_member_expression_rest (cognitive 22) crates/biome_js_parser/src/syntax/expr.rs:714 — biome_js_parser::syntax::expr::parse_member_expression_rest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::function::parse_formal_parameter (cognitive 22) crates/biome_js_parser/src/syntax/function.rs:1196 — biome_js_parser::syntax::function::parse_formal_parameter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::expr::parse_call_expression_rest (cognitive 20) crates/biome_js_parser/src/syntax/expr.rs:1752 — biome_js_parser::syntax::expr::parse_call_expression_rest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::stmt::parse_statement (cognitive 20) crates/biome_js_parser/src/syntax/stmt.rs:158 — biome_js_parser::syntax::stmt::parse_statement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, match/switch 3 (5 pts) (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_parser::syntax::function::parse_function (cognitive 19) crates/biome_js_parser/src/syntax/function.rs:206 — biome_js_parser::syntax::function::parse_function has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • biome_js_parser::syntax::object::parse_object_member (cognitive 19) crates/biome_js_parser/src/syntax/object.rs:90 — biome_js_parser::syntax::object::parse_object_member has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_parser::syntax::class::eat_class_heritage_clause (cognitive 17) crates/biome_js_parser/src/syntax/class.rs:331 — biome_js_parser::syntax::class::eat_class_heritage_clause has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::module::specifier_metadata (cognitive 17) crates/biome_js_parser/src/syntax/module.rs:933 — biome_js_parser::syntax::module::specifier_metadata has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::expr::parse_call_arguments (cognitive 16) crates/biome_js_parser/src/syntax/expr.rs:1083 — biome_js_parser::syntax::expr::parse_call_arguments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::expr::parse_primary_expression (cognitive 16) crates/biome_js_parser/src/syntax/expr.rs:1281 — biome_js_parser::syntax::expr::parse_primary_expression has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::module::parse_import_or_import_equals_declaration (cognitive 16) crates/biome_js_parser/src/syntax/module.rs:212 — biome_js_parser::syntax::module::parse_import_or_import_equals_declaration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_parser::syntax::module::parse_import_clause (cognitive 16) crates/biome_js_parser/src/syntax/module.rs:269 — biome_js_parser::syntax::module::parse_import_clause has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_js_parser::syntax::module::parse_any_export_named_specifier (cognitive 16) crates/biome_js_parser/src/syntax/module.rs:833 — biome_js_parser::syntax::module::parse_any_export_named_specifier has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×19
  • Duplicated block (7 lines × 3) crates/biome_analyze/src/utils.rs:99 — crates/biome_analyze/src/utils.rs:99-105 | crates/biome_analyze/src/utils.rs:209-215 | crates/biome_analyze/src/utils.rs:222-228 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_analyze/src/utils.rs:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_graphql_analyze/src/lib.rs:115 — crates/biome_graphql_analyze/src/lib.rs:115-121 | crates/biome_json_analyze/src/lib.rs:169-175 | crates/biome_yaml_analyze/src/lib.rs:115-121 — before extracting anything, compare `crates/biome_graphql_analyze/src/lib.rs` and `crates/biome_yaml_analyze/src/lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/lib.rs:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:137 — crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:137-143 | crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:130-136 | crates/biome_html_analyze/src/lint/a11y/no_redundant_roles.rs:153-159 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:137` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_html_parser/src/lexer/mod.rs:1046 — crates/biome_html_parser/src/lexer/mod.rs:1046-1052 | crates/biome_tailwind_parser/src/lexer/mod.rs:577-583 | crates/biome_yaml_parser/src/lexer/mod.rs:1416-1422 — before extracting anything, compare `crates/biome_html_parser/src/lexer/mod.rs` and `crates/biome_tailwind_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:148 — crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:148-154 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:138-144 | crates/biome_js_analyze/src/lint/a11y/no_redundant_roles.rs:140-146 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:148` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:465 — crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:465-471 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:476-483 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:505-511 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:201 — crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:201-207 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:96-102 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs:97-103 — before extracting anything, compare `crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs` and `crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_markdown_formatter/src/words.rs:1010 — crates/biome_markdown_formatter/src/words.rs:1010-1016 | crates/biome_markdown_formatter/src/words.rs:1047-1053 | crates/biome_markdown_formatter/src/words.rs:1062-1068 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/words.rs:1010` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_markdown_formatter/src/words.rs:1055` calls `format_with`, `fmt_escaped` and `crates/biome_markdown_formatter/src/words.rs:1018` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) crates/biome_markdown_parser/src/to_html.rs:1652 — crates/biome_markdown_parser/src/to_html.rs:1652-1658 | crates/biome_markdown_parser/src/to_html.rs:2090-2096 | crates/biome_markdown_syntax/src/text_ext.rs:148-156 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/to_html.rs:1652` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 3) crates/biome_cli/src/execute/migrate/eslint_react.rs:45 — crates/biome_cli/src/execute/migrate/eslint_react.rs:45-51 | crates/biome_cli/src/execute/migrate/eslint_svelte.rs:52-58 | crates/biome_cli/src/execute/migrate/eslint_vue.rs:55-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_react.rs:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_css_formatter/src/scss/lists/interpolated_identifier_part_list.rs:11 — crates/biome_css_formatter/src/scss/lists/interpolated_identifier_part_list.rs:11-17 | crates/biome_css_formatter/src/scss/lists/interpolated_value_part_list.rs:7-13 | crates/biome_css_formatter/src/scss/lists/parent_selector_suffix_part_list.rs:11-17 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/lists/interpolated_identifier_part_list.rs:11` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&ScssInterpolatedIdentifierPartList` in one and `&ScssInterpolatedValuePartList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 3) crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:155 — crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:155-161 | crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:170-176 | crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:178-184 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlFragmentSpread` in one and `&GraphqlFieldDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 3) crates/biome_css_formatter/src/css/auxiliary/query_feature_boolean.rs:9 — crates/biome_css_formatter/src/css/auxiliary/query_feature_boolean.rs:9-15 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_identifier.rs:13-19 | crates/biome_css_formatter/src/css/pseudo/pseudo_element_identifier.rs:13-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/pseudo/pseudo_class_identifier.rs:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssQueryFeatureBoolean` in one and `&CssPseudoClassIdentifier` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 3) crates/biome_grit_patterns/src/grit_css_parser.rs:22 — crates/biome_grit_patterns/src/grit_css_parser.rs:22-28 | crates/biome_grit_patterns/src/grit_js_parser.rs:22-28 | crates/biome_grit_patterns/src/grit_json_parser.rs:21-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/grit_css_parser.rs:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_html_analyze/src/lint/nursery/no_astro_set_html_directive.rs:63 — crates/biome_html_analyze/src/lint/nursery/no_astro_set_html_directive.rs:63-69 | crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:131-137 | crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs:260-266 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) crates/biome_service/src/file_handlers/css.rs:601 — crates/biome_service/src/file_handlers/css.rs:601-607 | crates/biome_service/src/file_handlers/graphql.rs:488-494 | crates/biome_service/src/file_handlers/grit.rs:427-433 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:601` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_grit_patterns/src/grit_built_in_functions.rs:210 — crates/biome_grit_patterns/src/grit_built_in_functions.rs:210-217 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:416-423 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:570-576 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/grit_built_in_functions.rs:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 3) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:274 — crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:274-280 | crates/biome_js_analyze/src/lint/style/use_exponentiation_operator.rs:171-177 | crates/biome_js_analyze/src/lint/suspicious/no_jsx_leaked_dollar.rs:144-150 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:274` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/biome_js_analyze/src/lint/complexity/no_useless_constructor.rs:249 — crates/biome_js_analyze/src/lint/complexity/no_useless_constructor.rs:249-255 | crates/biome_js_analyze/src/lint/correctness/no_unused_private_class_members.rs:218-224 | crates/biome_js_analyze/src/lint/style/no_inferrable_types.rs:203-209 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_useless_constructor.rs:249` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×18
  • Edited copy of a member (26 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:167 — crates/biome_html_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:167-192 | crates/biome_js_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:134-160 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:81 — crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:81-107 | crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs:84-109 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_base_to_string.rs:290 — crates/biome_js_analyze/src/lint/nursery/no_base_to_string.rs:290-322 | crates/biome_js_analyze/src/lint/nursery/no_unsafe_plus_operands.rs:212-237 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:363 — crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:363-388 | crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:399-428 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:223 — crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:223-248 | crates/biome_js_analyze/src/lint/correctness/no_unused_variables.rs:426-464 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) xtask/codegen/src/generate_global_types/lower/overrides.rs:640 — xtask/codegen/src/generate_global_types/lower/overrides.rs:640-665 | xtask/codegen/src/generate_global_types/lower/overrides.rs:1063-1095 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_vue_ref_object_reactivity_loss.rs:244 — crates/biome_js_analyze/src/lint/nursery/no_vue_ref_object_reactivity_loss.rs:244-269 | crates/biome_js_analyze/src/lint/nursery/no_vue_ref_object_reactivity_loss.rs:299-330 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_analyze/src/lint/style/no_yoda_expression.rs:280 — crates/biome_js_analyze/src/lint/style/no_yoda_expression.rs:280-305 | crates/biome_js_analyze/src/lint/style/no_yoda_expression.rs:323-348 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_module_graph/src/db/type_inference/imports.rs:235 — crates/biome_module_graph/src/db/type_inference/imports.rs:235-260 | crates/biome_module_graph/src/db/type_inference/imports.rs:859-887 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_analyze/src/categories.rs:408 — crates/biome_analyze/src/categories.rs:408-436 | crates/biome_diagnostics/src/serde.rs:394-419 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:563 — crates/biome_js_type_info/src/format_inferred_type_info.rs:563-589 | crates/biome_js_type_info/src/format_type_info.rs:874-899 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_parser/src/syntax/module.rs:534 — crates/biome_js_parser/src/syntax/module.rs:534-559 | crates/biome_js_parser/src/syntax/typescript/types.rs:1700-1727 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_type_info/src/interned_types.rs:1859 — crates/biome_js_type_info/src/interned_types.rs:1859-1887 | crates/biome_js_type_info/src/interned_types.rs:3082-3107 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:536 — crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:536-561 | crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:293-318 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_grit_patterns/src/grit_context.rs:321 — crates/biome_grit_patterns/src/grit_context.rs:321-347 | crates/biome_grit_patterns/src/grit_context.rs:354-379 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:119 — crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:119-144 | crates/biome_js_analyze/src/lint/a11y/no_label_without_control.rs:131-156 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_js_formatter/src/ts/classes/getter_signature_class_member.rs:16 — crates/biome_js_formatter/src/ts/classes/getter_signature_class_member.rs:16-41 | crates/biome_js_formatter/src/ts/classes/setter_signature_class_member.rs:15-42 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/biome_markdown_parser/src/syntax/html_block.rs:329 — crates/biome_markdown_parser/src/syntax/html_block.rs:329-358 | crates/biome_markdown_parser/src/syntax/html_block.rs:370-395 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×17
  • Edited copy of a member (21 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:183 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:183-203 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:161-181 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_module_graph/src/db/type_inference/imports.rs:670 — crates/biome_module_graph/src/db/type_inference/imports.rs:670-691 | crates/biome_module_graph/src/db/type_inference/imports.rs:832-852 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_js_type_info/src/type_data.rs:1185 — crates/biome_js_type_info/src/type_data.rs:1185-1205 | crates/biome_js_type_info/src/type_data.rs:1324-1346 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_css_parser/src/syntax/selector/pseudo_class/identifier.rs:21 — crates/biome_css_parser/src/syntax/selector/pseudo_class/identifier.rs:21-41 | crates/biome_css_parser/src/syntax/selector/pseudo_element.rs:59-79 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_embeds/src/visitor.rs:584 — crates/biome_embeds/src/visitor.rs:584-607 | crates/biome_embeds/src/visitor.rs:628-648 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_json_analyze/src/lint/nursery/use_package_json_cpu.rs:67 — crates/biome_json_analyze/src/lint/nursery/use_package_json_cpu.rs:67-87 | crates/biome_json_analyze/src/lint/nursery/use_package_json_engines.rs:77-97 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:306 — crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:306-330 | crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs:142-162 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_rowan/src/cursor/node.rs:785 — crates/biome_rowan/src/cursor/node.rs:785-805 | crates/biome_rowan/src/cursor/node.rs:854-874 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:96 — crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:96-116 | crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs:94-117 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_js_analyze/src/lint/performance/use_dom_node_text_content.rs:304 — crates/biome_js_analyze/src/lint/performance/use_dom_node_text_content.rs:304-324 | crates/biome_js_analyze/src/lint/performance/use_dom_node_text_content.rs:336-356 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:279 — crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:279-300 | crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:306-326 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_css_parser/src/syntax/scss/identifiers/interpolated_regular.rs:151 — crates/biome_css_parser/src/syntax/scss/identifiers/interpolated_regular.rs:151-171 | crates/biome_css_parser/src/syntax/scss/identifiers/interpolated_selector.rs:151-173 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_js_type_info/src/local_inference.rs:3463 — crates/biome_js_type_info/src/local_inference.rs:3463-3483 | xtask/codegen/src/generate_global_types/collect.rs:686-706 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_module_graph/src/format_module_graph.rs:414 — crates/biome_module_graph/src/format_module_graph.rs:414-438 | crates/biome_module_graph/src/format_module_graph.rs:449-469 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_js_parser/src/syntax/typescript/types.rs:1368 — crates/biome_js_parser/src/syntax/typescript/types.rs:1368-1393 | crates/biome_js_parser/src/syntax/typescript/types.rs:1678-1698 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_evolving_types.rs:109 — crates/biome_js_analyze/src/lint/suspicious/no_evolving_types.rs:109-129 | crates/biome_js_analyze/src/lint/suspicious/no_implicit_any_let.rs:74-94 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/biome_grit_formatter/src/grit/auxiliary/version.rs:7 — crates/biome_grit_formatter/src/grit/auxiliary/version.rs:7-27 | crates/biome_html_formatter/src/svelte/auxiliary/each_opening_block.rs:7-27 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×17
  • Duplicated block (12 lines × 3) crates/biome_cli/src/execute/migrate/eslint.rs:128 — crates/biome_cli/src/execute/migrate/eslint.rs:128-139 | crates/biome_cli/src/execute/migrate/eslint.rs:210-221 | crates/biome_cli/src/execute/migrate/stylelint.rs:141-152 — before extracting anything, compare `crates/biome_cli/src/execute/migrate/eslint.rs` and `crates/biome_cli/src/execute/migrate/stylelint.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/biome_configuration/src/analyzer/mod.rs:68 — crates/biome_configuration/src/analyzer/mod.rs:68-79 | crates/biome_configuration/src/analyzer/mod.rs:177-188 | crates/biome_configuration/src/analyzer/mod.rs:346-357 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 3) crates/biome_embeds/src/visitor.rs:123 — crates/biome_embeds/src/visitor.rs:123-134 | crates/biome_embeds/src/visitor.rs:148-159 | crates/biome_embeds/src/visitor.rs:263-274 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) crates/biome_graphql_formatter/src/graphql/definitions/interface_type_definition.rs:28 — crates/biome_graphql_formatter/src/graphql/definitions/interface_type_definition.rs:28-39 | crates/biome_graphql_formatter/src/graphql/extensions/interface_type_extension.rs:33-44 | crates/biome_graphql_formatter/src/graphql/extensions/object_type_extension.rs:33-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/definitions/interface_type_definition.rs:28` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/biome_html_formatter/src/svelte/auxiliary/await_catch_block.rs:20 — crates/biome_html_formatter/src/svelte/auxiliary/await_catch_block.rs:20-31 | crates/biome_html_formatter/src/svelte/auxiliary/await_opening_block.rs:38-49 | crates/biome_html_formatter/src/svelte/auxiliary/await_then_block.rs:20-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_formatter/src/svelte/auxiliary/await_catch_block.rs:20` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/biome_html_parser/src/syntax/mod.rs:398 — crates/biome_html_parser/src/syntax/mod.rs:398-409 | crates/biome_parser/src/parse_recovery.rs:87-98 | crates/biome_parser/src/parse_recovery.rs:134-145 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/syntax/mod.rs:398` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/biome_js_type_info/src/local_inference.rs:362 — crates/biome_js_type_info/src/local_inference.rs:362-373 | crates/biome_js_type_info/src/local_inference.rs:391-402 | crates/biome_js_type_info/src/local_inference.rs:1078-1089 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/local_inference.rs:362` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:78 — crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:78-89 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:45-56 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:231-242 — before extracting anything, compare `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs` and `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/biome_migrate/src/analyzers/rule_mover.rs:279 — crates/biome_migrate/src/analyzers/rule_mover.rs:279-290 | crates/biome_migrate/src/analyzers/rule_mover.rs:361-372 | crates/biome_migrate/src/analyzers/rule_mover.rs:388-399 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) crates/biome_module_graph/src/db/queries/type_inference/promises.rs:42 — crates/biome_module_graph/src/db/queries/type_inference/promises.rs:42-53 | crates/biome_module_graph/src/db/queries/type_inference/promises.rs:88-99 | crates/biome_module_graph/src/db/queries/type_inference/promises.rs:136-147 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/queries/type_inference/promises.rs:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/biome_module_graph/src/db/type_inference/expressions.rs:587 — crates/biome_module_graph/src/db/type_inference/expressions.rs:587-598 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2370-2381 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2626-2637 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/expressions.rs:587` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:2368` calls `Literal`, `InstanceOf` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:2625` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) crates/biome_module_graph/src/db/type_inference/expressions.rs:2225 — crates/biome_module_graph/src/db/type_inference/expressions.rs:2225-2236 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2365-2376 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2870-2881 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:2869` calls `Union` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:2224` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) crates/biome_module_graph/src/db/type_inference/expressions.rs:2447 — crates/biome_module_graph/src/db/type_inference/expressions.rs:2447-2458 | crates/biome_module_graph/src/db/type_inference/lookup.rs:772-783 | crates/biome_module_graph/src/db/type_inference/lookup.rs:948-959 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/expressions.rs:2447` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:2446` calls `InstanceOf` and `crates/biome_module_graph/src/db/type_inference/lookup.rs:771` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) crates/biome_syntax_codegen/src/generate_nodes.rs:666 — crates/biome_syntax_codegen/src/generate_nodes.rs:666-677 | xtask/codegen/src/generate_nodes.rs:686-697 | xtask/codegen/src/generate_nodes.rs:774-785 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:666` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/biome_grit_patterns/src/grit_node.rs:178 — crates/biome_grit_patterns/src/grit_node.rs:178-190 | crates/biome_grit_patterns/src/grit_node.rs:192-204 | crates/biome_grit_patterns/src/grit_target_node.rs:636-647 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (12 lines × 3) crates/biome_module_graph/src/format_module_graph.rs:55 — crates/biome_module_graph/src/format_module_graph.rs:55-66 | crates/biome_module_graph/src/format_module_graph.rs:609-620 | crates/biome_module_graph/src/format_module_graph.rs:785-796 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/format_module_graph.rs:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/biome_migrate/src/analyzers/organize_imports.rs:120 — crates/biome_migrate/src/analyzers/organize_imports.rs:120-131 | crates/biome_migrate/src/analyzers/schema.rs:73-84 | crates/biome_migrate/src/analyzers/trailing_comma.rs:49-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_migrate/src/analyzers/organize_imports.rs:120` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×17
  • Duplicated block (5 lines × 3) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1070 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1070-1074 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1177-1181 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1257-1262 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1070` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1128 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1128-1132 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1145-1149 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1161-1165 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:1128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/biome_configuration_macros/src/visitors.rs:52 — crates/biome_configuration_macros/src/visitors.rs:52-56 | xtask/codegen/src/generate_configuration.rs:42-48 | xtask/codegen/src/generate_configuration.rs:125-131 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration_macros/src/visitors.rs:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 3) crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:139 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:139-144 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:119-123 | crates/biome_service/src/file_handlers/javascript.rs:799-803 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs` and `crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:244 — crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:244-249 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:356-360 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:476-481 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 3) crates/biome_js_formatter/src/js/auxiliary/default_clause.rs:32 — crates/biome_js_formatter/src/js/auxiliary/default_clause.rs:32-36 | crates/biome_yaml_formatter/src/yaml/auxiliary/folded_scalar.rs:16-21 | crates/biome_yaml_formatter/src/yaml/auxiliary/literal_scalar.rs:16-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut JsFormatter` in one and `&mut YamlFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 3) crates/biome_module_graph/src/js_module_info/flow/builder.rs:430 — crates/biome_module_graph/src/js_module_info/flow/builder.rs:430-434 | crates/biome_module_graph/src/js_module_info/flow/builder.rs:448-452 | crates/biome_module_graph/src/js_module_info/flow/builder.rs:492-496 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/biome_syntax_codegen/src/generate_node_factory.rs:145 — crates/biome_syntax_codegen/src/generate_node_factory.rs:145-149 | crates/biome_syntax_codegen/src/generate_nodes.rs:711-715 | xtask/codegen/src/generate_node_factory.rs:138-142 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_node_factory.rs` and `xtask/codegen/src/generate_node_factory.rs` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_node_factory.rs:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/biome_service/src/file_handlers/graphql.rs:267 — crates/biome_service/src/file_handlers/graphql.rs:267-271 | crates/biome_service/src/file_handlers/md.rs:200-205 | crates/biome_service/src/file_handlers/yaml.rs:155-160 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/md.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 181 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/graphql.rs:267` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/biome_css_formatter/src/css/auxiliary/media_type.rs:8 — crates/biome_css_formatter/src/css/auxiliary/media_type.rs:8-12 | crates/biome_css_formatter/src/css/auxiliary/named_namespace_prefix.rs:8-12 | crates/biome_css_formatter/src/css/auxiliary/value_at_rule_import_specifier.rs:12-16 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/value_at_rule_import_specifier.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssMediaType` in one and `&CssNamedNamespacePrefix` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 3) crates/biome_js_analyze/src/lint/nursery/use_includes.rs:330 — crates/biome_js_analyze/src/lint/nursery/use_includes.rs:330-334 | crates/biome_js_analyze/src/lint/suspicious/no_undeclared_env_vars.rs:174-180 | crates/biome_js_analyze/src/lint/suspicious/no_undeclared_env_vars.rs:199-205 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) crates/biome_js_analyze/src/lint/correctness/no_constant_math_min_max_clamp.rs:164 — crates/biome_js_analyze/src/lint/correctness/no_constant_math_min_max_clamp.rs:164-170 | crates/biome_js_analyze/src/lint/nursery/use_consistent_json_file_read.rs:276-280 | crates/biome_js_analyze/src/lint/nursery/use_set_size.rs:229-233 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (5 lines × 3) crates/biome_js_analyze/src/lint/complexity/use_numeric_literals.rs:175 — crates/biome_js_analyze/src/lint/complexity/use_numeric_literals.rs:175-179 | crates/biome_js_analyze/src/lint/correctness/use_is_nan.rs:318-323 | crates/biome_js_analyze/src/lint/style/use_exponentiation_operator.rs:82-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/use_is_nan.rs:318` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 3) crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:141 — crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:141-145 | crates/biome_js_analyze/src/lint/style/no_restricted_types.rs:107-111 | crates/biome_js_analyze/src/lint/style/use_single_var_declarator.rs:208-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_map_spread.rs:305 — crates/biome_js_analyze/src/lint/nursery/no_map_spread.rs:305-309 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:120-124 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs:121-125 — before extracting anything, compare `crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs` and `crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_map_spread.rs:305` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:257 — crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:257-261 | crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:143-147 | crates/biome_js_analyze/src/lint/nursery/use_vue_prop_type_constructor.rs:172-176 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) crates/biome_js_analyze/src/lint/style/use_test_hooks_in_order.rs:234 — crates/biome_js_analyze/src/lint/style/use_test_hooks_in_order.rs:234-238 | crates/biome_js_analyze/src/lint/style/use_test_hooks_on_top.rs:191-195 | crates/biome_js_analyze/src/lint/suspicious/no_identical_test_title.rs:261-265 — before extracting anything, compare `crates/biome_js_analyze/src/lint/style/use_test_hooks_in_order.rs` and `crates/biome_js_analyze/src/lint/style/use_test_hooks_on_top.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D5 · Coupling · Off the main sequence · ×17
  • Off the main sequence: biome_diagnostics_categories — biome_diagnostics_categories: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: biome_ungrammar — biome_ungrammar: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: xtask_glue — xtask_glue: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: biome_json_syntax — biome_json_syntax: abstractness 0.00, instability 0.06, distance 0.94 — zone of pain — concrete and depended on by 17 project(s), so it's rigid to change.
  • Off the main sequence: biome_yaml_syntax — biome_yaml_syntax: abstractness 0.00, instability 0.07, distance 0.93 — zone of pain — concrete and depended on by 14 project(s), so it's rigid to change.
  • Off the main sequence: biome_markdown_syntax — biome_markdown_syntax: abstractness 0.00, instability 0.08, distance 0.92 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
  • Off the main sequence: biome_graphql_syntax — biome_graphql_syntax: abstractness 0.00, instability 0.08, distance 0.92 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
  • Off the main sequence: biome_text_edit — biome_text_edit: abstractness 0.00, instability 0.11, distance 0.89 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
  • Off the main sequence: biome_suppression — biome_suppression: abstractness 0.00, instability 0.15, distance 0.85 — zone of pain — concrete and depended on by 17 project(s), so it's rigid to change.
  • Off the main sequence: biome_rowan — biome_rowan: abstractness 0.14, instability 0.02, distance 0.84 — zone of pain — concrete and depended on by 82 project(s), so it's rigid to change.
  • Off the main sequence: biome_tailwind_syntax — biome_tailwind_syntax: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: biome_console — biome_console: abstractness 0.15, instability 0.04, distance 0.80 — zone of pain — concrete and depended on by 43 project(s), so it's rigid to change.
  • Off the main sequence: biome_html_syntax — biome_html_syntax: abstractness 0.00, instability 0.21, distance 0.79 — zone of pain — concrete and depended on by 15 project(s), so it's rigid to change.
  • Off the main sequence: biome_diagnostics — biome_diagnostics: abstractness 0.13, instability 0.11, distance 0.76 — zone of pain — concrete and depended on by 48 project(s), so it's rigid to change.
  • Off the main sequence: biome_line_index — biome_line_index: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: biome_languages — biome_languages: abstractness 0.11, instability 0.14, distance 0.75 — zone of pain — concrete and depended on by 37 project(s), so it's rigid to change.
  • Off the main sequence: biome_css_syntax — biome_css_syntax: abstractness 0.00, instability 0.27, distance 0.73 — zone of pain — concrete and depended on by 16 project(s), so it's rigid to change.
D2 · Cognitive Complexity · biome_js_formatter · ×16
  • biome_js_formatter::utils::jsx::jsx_split_children (cognitive 52) crates/biome_js_formatter/src/utils/jsx.rs:221 — biome_js_formatter::utils::jsx::jsx_split_children has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (38 pts), match/switch 3 (10 pts), loops 2 (4 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_js_formatter::comments::handle_class_comment (cognitive 27) crates/biome_js_formatter/src/comments.rs:505 — biome_js_formatter::comments::handle_class_comment has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 7 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_formatter::js::bindings::parameters::should_hug_function_parameters (cognitive 24) crates/biome_js_formatter/src/js/bindings/parameters.rs:213 — biome_js_formatter::js::bindings::parameters::should_hug_function_parameters has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 7 (14 pts), if/else 4 (7 pts), boolean chains 3 (nesting depth added 10). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to one function item inside it that branches (hug_formal_parameter). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • biome_js_formatter::js::expressions::call_arguments::write_grouped_arguments (cognitive 24) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:353 — biome_js_formatter::js::expressions::call_arguments::write_grouped_arguments has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 4, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • biome_js_formatter::comments::handle_if_statement_comment (cognitive 23) crates/biome_js_formatter/src/comments.rs:865 — biome_js_formatter::comments::handle_if_statement_comment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, match/switch 1 (nesting depth added 7). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_formatter::js::expressions::arrow_function_expression::format_signature (cognitive 23) crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:249 — biome_js_formatter::js::expressions::arrow_function_expression::format_signature has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_formatter::js::expressions::call_arguments::is_relatively_short_argument (cognitive 23) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:1109 — biome_js_formatter::js::expressions::call_arguments::is_relatively_short_argument has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_formatter::utils::assignment_like::is_poorly_breakable_member_or_call_chain (cognitive 19) crates/biome_js_formatter/src/utils/assignment_like.rs:1178 — biome_js_formatter::utils::assignment_like::is_poorly_breakable_member_or_call_chain has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 4 (7 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_formatter::comments::handle_parameter_comment (cognitive 18) crates/biome_js_formatter/src/comments.rs:1255 — biome_js_formatter::comments::handle_parameter_comment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_formatter::js::expressions::call_arguments::should_group_last_argument (cognitive 18) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:971 — biome_js_formatter::js::expressions::call_arguments::should_group_last_argument has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_formatter::comments::handle_import_named_clause_comments (cognitive 17) crates/biome_js_formatter/src/comments.rs:1457 — biome_js_formatter::comments::handle_import_named_clause_comments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_formatter::js::expressions::array_expression::should_break (cognitive 17) crates/biome_js_formatter/src/js/expressions/array_expression.rs:90 — biome_js_formatter::js::expressions::array_expression::should_break has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_formatter::utils::assignment_like::should_break_after_operator (cognitive 17) crates/biome_js_formatter/src/utils/assignment_like.rs:985 — biome_js_formatter::utils::assignment_like::should_break_after_operator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_formatter::utils::assignment_like::is_short_argument (cognitive 17) crates/biome_js_formatter/src/utils/assignment_like.rs:1270 — biome_js_formatter::utils::assignment_like::is_short_argument has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 3, boolean chains 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_formatter::js::expressions::call_arguments::can_group_expression_argument (cognitive 16) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:1178 — biome_js_formatter::js::expressions::call_arguments::can_group_expression_argument has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (12 pts), boolean chains 4 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_formatter::utils::array::write_array_node (cognitive 16) crates/biome_js_formatter/src/utils/array.rs:13 — biome_js_formatter::utils::array::write_array_node has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×16
  • Duplicated block (19 lines × 2) crates/biome_css_analyze/src/suppression_action.rs:78 — crates/biome_css_analyze/src/suppression_action.rs:78-96 | crates/biome_html_analyze/src/suppression_action.rs:88-106 — before extracting anything, compare `crates/biome_css_analyze/src/suppression_action.rs` and `crates/biome_html_analyze/src/suppression_action.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/suppression_action.rs:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/biome_formatter/src/lib.rs:1847 — crates/biome_formatter/src/lib.rs:1847-1865 | crates/biome_formatter/src/lib.rs:1924-1942 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_formatter/src/lib.rs:1847` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/biome_grit_formatter/src/grit/patterns/pattern_and.rs:9 — crates/biome_grit_formatter/src/grit/patterns/pattern_and.rs:9-27 | crates/biome_grit_formatter/src/grit/predicates/predicate_rewrite.rs:10-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/patterns/pattern_and.rs:9` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritPatternAnd` in one and `&GritPredicateRewrite` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (19 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:530 — crates/biome_grit_parser/src/lexer/mod.rs:530-548 | crates/biome_json_parser/src/lexer/mod.rs:583-601 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:530` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:120 — crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:120-138 | crates/biome_js_analyze/src/lint/a11y/no_label_without_control.rs:132-150 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:43 — crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:43-61 | crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:64-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:43` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_drizzle_delete_without_where.rs:80 — crates/biome_js_analyze/src/lint/suspicious/no_drizzle_delete_without_where.rs:80-98 | crates/biome_js_analyze/src/lint/suspicious/no_drizzle_update_without_where.rs:80-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_drizzle_delete_without_where.rs:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:228 — crates/biome_js_type_info/src/format_inferred_type_info.rs:228-246 | crates/biome_js_type_info/src/format_type_info.rs:196-214 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:228` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (19 lines × 2) crates/biome_js_type_info/src/local_inference.rs:608 — crates/biome_js_type_info/src/local_inference.rs:608-626 | crates/biome_js_type_info/src/local_inference.rs:632-650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) crates/biome_js_type_info/src/local_inference.rs:2319 — crates/biome_js_type_info/src/local_inference.rs:2319-2337 | crates/biome_js_type_info/src/local_inference.rs:2390-2408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/local_inference.rs:2319` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/biome_module_graph/src/db/type_inference/expressions.rs:2607 — crates/biome_module_graph/src/db/type_inference/expressions.rs:2607-2625 | crates/biome_module_graph/src/db/type_inference/lookup.rs:927-945 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/lookup.rs:946` calls `Extends`, `InstanceOf` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:2626` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (19 lines × 2) crates/biome_service/src/file_handlers/graphql.rs:571 — crates/biome_service/src/file_handlers/graphql.rs:571-589 | crates/biome_service/src/file_handlers/html.rs:1093-1111 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/html.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) crates/biome_service/src/file_handlers/graphql.rs:592 — crates/biome_service/src/file_handlers/graphql.rs:592-610 | crates/biome_service/src/file_handlers/yaml.rs:492-510 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/yaml.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 236 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/graphql.rs:592` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `inspector` to `Option<biome_analyze::EmbeddedSignalInspector<'_, '_>>` in one and `Option<EmbeddedSignalInspector<'_, '_>>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (19 lines × 2) crates/biome_service/src/file_handlers/graphql.rs:792 — crates/biome_service/src/file_handlers/graphql.rs:792-810 | crates/biome_service/src/file_handlers/yaml.rs:687-705 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/yaml.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 236 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/graphql.rs:792` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) crates/biome_service/src/workspace/server.rs:1694 — crates/biome_service/src/workspace/server.rs:1694-1712 | crates/biome_service/src/workspace/server.rs:3855-3873 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:82 — crates/biome_html_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:82-100 | crates/biome_js_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:83-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D2 · Cognitive Complexity · ResolutionCtx · ×15
  • ResolutionCtx::resolve_qualifier (cognitive 52) crates/biome_module_graph/src/db/type_inference/qualifiers.rs:80 — ResolutionCtx::resolve_qualifier has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 14, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::resolve_flow_expression (cognitive 49) crates/biome_module_graph/src/db/type_inference/flow_expressions.rs:30 — ResolutionCtx::resolve_flow_expression has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 7, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::resolve_promise_value_type (cognitive 31) crates/biome_module_graph/src/db/type_inference/expressions.rs:1383 — ResolutionCtx::resolve_promise_value_type has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::infer_constructor_type_parameters (cognitive 30) crates/biome_module_graph/src/db/type_inference/expressions.rs:1276 — ResolutionCtx::infer_constructor_type_parameters has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 5 (11 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::resolve_namespace_import_member_with_steps (cognitive 29) crates/biome_module_graph/src/db/type_inference/qualifiers.rs:308 — ResolutionCtx::resolve_namespace_import_member_with_steps has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::resolve_static_member_expression (cognitive 28) crates/biome_module_graph/src/db/type_inference/expressions.rs:1646 — ResolutionCtx::resolve_static_member_expression has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::resolve_element_type (cognitive 25) crates/biome_module_graph/src/db/type_inference/expressions.rs:2283 — ResolutionCtx::resolve_element_type has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 3 (8 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::solve_flow (cognitive 22) crates/biome_module_graph/src/db/type_inference/flow.rs:322 — ResolutionCtx::solve_flow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::resolve_typeof_expression (cognitive 20) crates/biome_module_graph/src/db/type_inference/expressions.rs:125 — ResolutionCtx::resolve_typeof_expression has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ResolutionCtx::rest_object_from_type (cognitive 19) crates/biome_module_graph/src/db/type_inference/expressions.rs:2523 — ResolutionCtx::rest_object_from_type has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::conditional_type (cognitive 18) crates/biome_module_graph/src/db/type_inference/expressions.rs:2957 — ResolutionCtx::conditional_type has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::resolve_export_name_result_from_tables (cognitive 18) crates/biome_module_graph/src/db/type_inference/imports.rs:904 — ResolutionCtx::resolve_export_name_result_from_tables has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolutionCtx::resolve_const_argument (cognitive 17) crates/biome_module_graph/src/db/type_inference/expressions.rs:625 — ResolutionCtx::resolve_const_argument has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • ResolutionCtx::filter_action (cognitive 16) crates/biome_module_graph/src/db/type_inference/expressions.rs:3126 — ResolutionCtx::filter_action has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (5 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ResolutionCtx::resolve_import_member_with_steps (cognitive 16) crates/biome_module_graph/src/db/type_inference/imports.rs:362 — ResolutionCtx::resolve_import_member_with_steps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 4 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×15
  • Edited copy of a member (24 corresponding lines) crates/biome_module_graph/src/format_module_graph.rs:73 — crates/biome_module_graph/src/format_module_graph.rs:73-101 | crates/biome_module_graph/src/format_module_graph.rs:108-137 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_grit_patterns/src/grit_css_parser.rs:59 — crates/biome_grit_patterns/src/grit_css_parser.rs:59-83 | crates/biome_grit_patterns/src/grit_json_parser.rs:58-81 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:221 — crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:221-244 | crates/biome_js_analyze/src/assist/source/use_sorted_attributes.rs:193-220 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_rowan/src/syntax/token.rs:295 — crates/biome_rowan/src/syntax/token.rs:295-318 | crates/biome_rowan/src/syntax/token.rs:326-349 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_string_case_mismatch.rs:96 — crates/biome_js_analyze/src/lint/correctness/no_string_case_mismatch.rs:96-119 | crates/biome_js_analyze/src/lint/correctness/use_valid_typeof.rs:181-208 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_markdown_parser/src/syntax/table.rs:145 — crates/biome_markdown_parser/src/syntax/table.rs:145-168 | crates/biome_markdown_parser/src/syntax/table.rs:170-193 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_react_compiler/src/convert_ast/expressions.rs:870 — crates/biome_react_compiler/src/convert_ast/expressions.rs:870-893 | crates/biome_react_compiler/src/convert_ast/statements.rs:317-345 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:1268 — crates/biome_html_parser/src/syntax/svelte.rs:1268-1293 | crates/biome_html_parser/src/syntax/svelte.rs:1308-1331 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else.rs:188 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else.rs:188-214 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else_if.rs:244-267 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:193 — crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:193-216 | crates/biome_js_analyze/src/lint/a11y/use_valid_autocomplete.rs:132-155 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_yaml_formatter/src/yaml/auxiliary/flow_mapping.rs:7 — crates/biome_yaml_formatter/src/yaml/auxiliary/flow_mapping.rs:7-30 | crates/biome_yaml_formatter/src/yaml/auxiliary/flow_sequence.rs:7-30 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:92 — crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:92-117 | crates/biome_js_analyze/src/lint/a11y/no_label_without_control.rs:106-129 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_service/src/db/state.rs:764 — crates/biome_service/src/db/state.rs:764-794 | crates/biome_service/src/db/state.rs:796-819 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs:78 — crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs:78-101 | crates/biome_yaml_analyze/src/lint/nursery/no_duplicate_map_keys.rs:82-109 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/biome_css_parser/src/syntax/at_rule/color_profile.rs:32 — crates/biome_css_parser/src/syntax/at_rule/color_profile.rs:32-58 | crates/biome_css_parser/src/syntax/at_rule/counter_style.rs:32-55 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×15
  • Edited copy of a member (23 corresponding lines) crates/biome_cli/src/reporter/json.rs:332 — crates/biome_cli/src/reporter/json.rs:332-354 | crates/biome_cli/src/reporter/rdjson.rs:116-139 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_css_formatter/src/css/auxiliary/legacy_filter_value.rs:23 — crates/biome_css_formatter/src/css/auxiliary/legacy_filter_value.rs:23-45 | crates/biome_css_formatter/src/css/lists/custom_property_component_list.rs:10-33 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_embeds/src/visitor.rs:1009 — crates/biome_embeds/src/visitor.rs:1009-1031 | crates/biome_embeds/src/visitor.rs:1580-1602 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_rowan/src/syntax/token.rs:235 — crates/biome_rowan/src/syntax/token.rs:235-257 | crates/biome_rowan/src/syntax/token.rs:265-287 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_lowercase_test_title.rs:241 — crates/biome_js_analyze/src/lint/nursery/use_lowercase_test_title.rs:241-263 | crates/biome_js_analyze/src/lint/nursery/use_svelte_reactive_classes.rs:478-503 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_cli/src/reporter/json.rs:392 — crates/biome_cli/src/reporter/json.rs:392-414 | crates/biome_lsp/src/utils.rs:327-351 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_void_elements_with_children.rs:359 — crates/biome_js_analyze/src/lint/correctness/no_void_elements_with_children.rs:359-382 | crates/biome_js_analyze/src/lint/correctness/no_void_elements_with_children.rs:384-406 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_vue_ref_object_reactivity_loss.rs:490 — crates/biome_js_analyze/src/lint/nursery/no_vue_ref_object_reactivity_loss.rs:490-512 | crates/biome_js_analyze/src/lint/nursery/no_vue_ref_object_reactivity_loss.rs:515-538 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:135 — crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:135-157 | crates/biome_graphql_analyze/src/utils.rs:93-115 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_html_formatter/src/svelte/auxiliary/await_catch_block.rs:9 — crates/biome_html_formatter/src/svelte/auxiliary/await_catch_block.rs:9-31 | crates/biome_html_formatter/src/svelte/auxiliary/await_then_block.rs:9-31 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_nodejs_modules.rs:57 — crates/biome_js_analyze/src/lint/correctness/no_nodejs_modules.rs:57-79 | crates/biome_js_analyze/src/lint/nursery/no_bun_modules.rs:53-75 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_button_type.rs:137 — crates/biome_html_analyze/src/lint/a11y/use_button_type.rs:137-159 | crates/biome_js_analyze/src/lint/a11y/use_button_type.rs:204-228 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:699 — crates/biome_js_type_info/src/format_inferred_type_info.rs:699-721 | crates/biome_js_type_info/src/format_inferred_type_info.rs:725-749 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_js_formatter/src/js/statements/while_statement.rs:12 — crates/biome_js_formatter/src/js/statements/while_statement.rs:12-37 | crates/biome_js_formatter/src/ts/assignments/type_assertion_assignment.rs:17-39 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/biome_test_utils/src/lib.rs:533 — crates/biome_test_utils/src/lib.rs:533-563 | crates/biome_test_utils/src/lib.rs:603-625 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×15
  • Duplicated block (21 lines × 2) crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:60 — crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:60-80 | crates/biome_css_analyze/src/lint/suspicious/no_duplicate_properties.rs:59-79 — before extracting anything, compare `crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs` and `crates/biome_css_analyze/src/lint/suspicious/no_duplicate_properties.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) crates/biome_deserialize_macros/src/deserializable_derive/enum_variant_attrs.rs:37 — crates/biome_deserialize_macros/src/deserializable_derive/enum_variant_attrs.rs:37-57 | crates/biome_deserialize_macros/src/deserializable_derive/struct_field_attrs.rs:132-152 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_deserialize_macros/src/deserializable_derive/enum_variant_attrs.rs:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) crates/biome_graphql_formatter/src/graphql/extensions/enum_type_extension.rs:14 — crates/biome_graphql_formatter/src/graphql/extensions/enum_type_extension.rs:14-34 | crates/biome_graphql_formatter/src/graphql/extensions/input_object_type_extension.rs:16-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/extensions/enum_type_extension.rs:14` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlEnumTypeExtension` in one and `&GraphqlInputObjectTypeExtension` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (21 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_valid_aria_role.rs:96 — crates/biome_html_analyze/src/lint/a11y/use_valid_aria_role.rs:96-116 | crates/biome_js_analyze/src/lint/a11y/use_valid_aria_role.rs:123-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/use_valid_aria_role.rs:96` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) crates/biome_js_analyze/src/lint/a11y/use_button_type.rs:123 — crates/biome_js_analyze/src/lint/a11y/use_button_type.rs:123-143 | crates/biome_js_analyze/src/lint/a11y/use_button_type.rs:145-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:140 — crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:140-160 | crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs:148-168 — before extracting anything, compare `crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs` and `crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) crates/biome_js_formatter/src/js/module/export_named_specifier.rs:13 — crates/biome_js_formatter/src/js/module/export_named_specifier.rs:13-33 | crates/biome_js_formatter/src/js/module/named_import_specifier.rs:13-33 — before extracting anything, compare `crates/biome_js_formatter/src/js/module/export_named_specifier.rs` and `crates/biome_js_formatter/src/js/module/named_import_specifier.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/module/export_named_specifier.rs:13` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsExportNamedSpecifier` in one and `&JsNamedImportSpecifier` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (21 lines × 2) crates/biome_js_formatter/src/jsx/attribute/spread_attribute.rs:64 — crates/biome_js_formatter/src/jsx/attribute/spread_attribute.rs:64-84 | crates/biome_js_formatter/src/jsx/auxiliary/spread_child.rs:62-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/jsx/attribute/spread_attribute.rs:64` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) crates/biome_js_parser/src/lexer/mod.rs:1422 — crates/biome_js_parser/src/lexer/mod.rs:1422-1442 | crates/biome_js_parser/src/lexer/mod.rs:1468-1488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) crates/biome_js_type_info/src/local_inference.rs:3787 — crates/biome_js_type_info/src/local_inference.rs:3787-3807 | xtask/codegen/src/generate_global_types/lower/generic.rs:1376-1396 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:3142 — crates/biome_markdown_parser/src/syntax/list.rs:3142-3162 | crates/biome_markdown_parser/src/syntax/mod.rs:634-654 — before extracting anything, compare `crates/biome_markdown_parser/src/syntax/list.rs` and `crates/biome_markdown_parser/src/syntax/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) crates/biome_module_graph/src/db/type_inference/expressions.rs:2992 — crates/biome_module_graph/src/db/type_inference/expressions.rs:2992-3012 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3074-3094 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) crates/biome_module_graph/src/format_module_graph.rs:78 — crates/biome_module_graph/src/format_module_graph.rs:78-98 | crates/biome_module_graph/src/format_module_graph.rs:114-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/format_module_graph.rs:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) crates/biome_service/src/file_handlers/css.rs:730 — crates/biome_service/src/file_handlers/css.rs:730-750 | crates/biome_service/src/file_handlers/json.rs:675-695 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/json.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 278 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:730` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (21 lines × 2) crates/biome_cli/src/commands/check.rs:335 — crates/biome_cli/src/commands/check.rs:335-355 | crates/biome_cli/src/commands/format.rs:256-276 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D6 · Cohesion (LCOM4) · Low cohesion · ×15
  • Low cohesion: RuleMetadata (LCOM4 10) crates/biome_analyze/src/rule.rs:28 — RuleMetadata's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SyntaxNode (LCOM4 9) crates/biome_rowan/src/cursor/node.rs:19 — SyntaxNode's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: LintRulesVisitor (LCOM4 8) crates/biome_configuration_macros/src/visitors.rs:20 — LintRulesVisitor's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AssistActionsVisitor (LCOM4 7) crates/biome_configuration_macros/src/visitors.rs:198 — AssistActionsVisitor's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: JsModuleInfo (LCOM4 6) crates/biome_module_graph/src/js_module_info.rs:34 — JsModuleInfo's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: LintVisitor (LCOM4 6) crates/biome_service/src/file_handlers/mod.rs:1712 — LintVisitor's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ManifestVisitor (LCOM4 6) crates/biome_service/src/file_handlers/mod.rs:2036 — ManifestVisitor's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AssistsVisitor (LCOM4 6) crates/biome_service/src/file_handlers/mod.rs:2231 — AssistsVisitor's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RuleDiagnostic (LCOM4 5) crates/biome_analyze/src/rule.rs:1628 — RuleDiagnostic's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SyntaxVisitor (LCOM4 5) crates/biome_service/src/file_handlers/mod.rs:1607 — SyntaxVisitor's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OsFileSystem (LCOM4 4) crates/biome_fs/src/fs/os.rs:28 — OsFileSystem's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: JsonFileSource (LCOM4 4) crates/biome_languages/src/json.rs:17 — JsonFileSource's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MarkdownParserOptions (LCOM4 4) crates/biome_markdown_parser/src/parser.rs:25 — MarkdownParserOptions's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UseNumericSeparatorsOptions (LCOM4 4) crates/biome_rule_options/src/use_numeric_separators.rs:41 — UseNumericSeparatorsOptions's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WorkspaceServerWithDb (LCOM4 4) crates/biome_service/src/workspace/server.rs:182 — WorkspaceServerWithDb's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×14
  • Duplicated block (9 lines × 3) crates/biome_css_formatter/src/lib.rs:200 — crates/biome_css_formatter/src/lib.rs:200-208 | crates/biome_html_formatter/src/lib.rs:234-242 | crates/biome_js_formatter/src/lib.rs:364-372 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut CssFormatter` in one and `&mut HtmlFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 3) crates/biome_grit_patterns/src/pattern_compiler/function_definition_compiler.rs:14 — crates/biome_grit_patterns/src/pattern_compiler/function_definition_compiler.rs:14-22 | crates/biome_grit_patterns/src/pattern_compiler/pattern_definition_compiler.rs:15-23 | crates/biome_grit_patterns/src/pattern_compiler/predicate_definition_compiler.rs:15-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/pattern_compiler/function_definition_compiler.rs:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `biome_grit_syntax::GritFunctionDefinition` in one and `GritPatternDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 3) crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:401 — crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:401-409 | crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:438-446 | crates/biome_js_analyze/src/lint/nursery/use_set_size.rs:213-221 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 3) crates/biome_js_analyze/src/services/vue.rs:158 — crates/biome_js_analyze/src/services/vue.rs:158-166 | crates/biome_js_analyze/src/services/vue.rs:205-213 | crates/biome_js_analyze/src/services/vue.rs:232-240 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) crates/biome_module_graph/src/db/queries/css.rs:199 — crates/biome_module_graph/src/db/queries/css.rs:199-207 | crates/biome_module_graph/src/db/queries/css.rs:246-254 | crates/biome_module_graph/src/db/queries/css.rs:258-266 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/queries/css.rs:199` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) crates/biome_react_compiler/src/convert_ast/expressions.rs:880 — crates/biome_react_compiler/src/convert_ast/expressions.rs:880-888 | crates/biome_react_compiler/src/convert_ast/modules.rs:392-400 | crates/biome_react_compiler/src/convert_ast/statements.rs:329-337 — before extracting anything, compare `crates/biome_react_compiler/src/convert_ast/modules.rs` and `crates/biome_react_compiler/src/convert_ast/statements.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_react_compiler/src/convert_ast/expressions.rs:880` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `class` to `&JsClassExpression` in one and `&JsClassExportDefaultDeclaration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_react_compiler/src/convert_ast/modules.rs:401` calls `abstract_token` and `crates/biome_react_compiler/src/convert_ast/expressions.rs:889` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 3) crates/biome_service/src/settings.rs:1645 — crates/biome_service/src/settings.rs:1645-1653 | crates/biome_service/src/settings.rs:1659-1667 | crates/biome_service/src/settings.rs:1695-1703 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/biome_service/src/settings.rs:2102 — crates/biome_service/src/settings.rs:2102-2110 | crates/biome_service/src/settings.rs:2361-2369 | crates/biome_service/src/settings.rs:2385-2393 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&mut JsFormatOptions` in one and `&mut MdFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_service/src/settings.rs:2099` calls `Some`, `set_indent_style` and `crates/biome_service/src/settings.rs:2383` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 3) crates/biome_service/src/settings.rs:2281 — crates/biome_service/src/settings.rs:2281-2291 | crates/biome_service/src/settings.rs:2365-2373 | crates/biome_service/src/settings.rs:2389-2399 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/settings.rs:2281` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&mut GritFormatOptions` in one and `&mut MdFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 3) crates/biome_html_analyze/src/lint/a11y/use_anchor_content.rs:239 — crates/biome_html_analyze/src/lint/a11y/use_anchor_content.rs:239-249 | crates/biome_html_analyze/src/lint/a11y/use_heading_content.rs:275-285 | crates/biome_html_analyze/src/lint/nursery/use_control_label.rs:219-227 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) crates/biome_js_formatter/src/ts/auxiliary/optional_tuple_type_element.rs:14 — crates/biome_js_formatter/src/ts/auxiliary/optional_tuple_type_element.rs:14-22 | crates/biome_js_formatter/src/ts/auxiliary/rest_tuple_type_element.rs:10-18 | crates/biome_js_formatter/src/ts/bindings/index_signature_parameter.rs:14-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/ts/auxiliary/optional_tuple_type_element.rs:14` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&TsOptionalTupleTypeElement` in one and `&TsRestTupleTypeElement` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 3) crates/biome_yaml_formatter/src/yaml/auxiliary/double_quoted_scalar.rs:8 — crates/biome_yaml_formatter/src/yaml/auxiliary/double_quoted_scalar.rs:8-16 | crates/biome_yaml_formatter/src/yaml/auxiliary/plain_scalar.rs:8-16 | crates/biome_yaml_formatter/src/yaml/auxiliary/single_quoted_scalar.rs:8-16 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&YamlDoubleQuotedScalar` in one and `&YamlPlainScalar` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 3) crates/biome_react_compiler/src/convert_ast/expressions.rs:476 — crates/biome_react_compiler/src/convert_ast/expressions.rs:476-484 | crates/biome_react_compiler/src/convert_ast/expressions.rs:488-496 | crates/biome_react_compiler/src/convert_ast/expressions.rs:511-519 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_react_compiler/src/convert_ast/expressions.rs:476` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:319 — crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:319-327 | crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:405-413 | crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:500-508 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×14
  • Duplicated block (8 lines × 3) crates/biome_configuration/src/overrides.rs:421 — crates/biome_configuration/src/overrides.rs:421-428 | crates/biome_configuration/src/overrides.rs:431-438 | crates/biome_configuration/src/overrides.rs:441-448 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_configuration/src/overrides.rs:418` calls `Some`, `as_ref` and `crates/biome_configuration/src/overrides.rs:428` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1314 — crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1314-1321 | crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1332-1339 | crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1372-1379 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1314` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) crates/biome_html_parser/src/syntax/vue.rs:97 — crates/biome_html_parser/src/syntax/vue.rs:97-104 | crates/biome_html_parser/src/syntax/vue.rs:126-133 | crates/biome_html_parser/src/syntax/vue.rs:155-162 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_html_parser/src/syntax/vue.rs:165` calls `at_ts` and `crates/biome_html_parser/src/syntax/vue.rs:105` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:290 — crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:290-297 | crates/biome_js_analyze/src/lint/nursery/no_svelte_unnecessary_state_wrap.rs:162-170 | crates/biome_js_analyze/src/lint/nursery/no_svelte_useless_derived_by.rs:114-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:290` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:313 — crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:313-320 | crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:327-334 | crates/biome_js_analyze/src/lint/nursery/no_misused_promises.rs:217-224 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_floating_promises.rs:313` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 3) crates/biome_js_formatter/src/js/assignments/array_assignment_pattern.rs:18 — crates/biome_js_formatter/src/js/assignments/array_assignment_pattern.rs:18-25 | crates/biome_js_formatter/src/js/bindings/array_binding_pattern.rs:18-25 | crates/biome_js_formatter/src/ts/types/tuple_type.rs:19-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/assignments/array_assignment_pattern.rs:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsArrayAssignmentPattern` in one and `&JsArrayBindingPattern` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_formatter/src/ts/types/tuple_type.rs:17` calls `options`, `delimiter_spacing`, `value` and `crates/biome_js_formatter/src/js/assignments/array_assignment_pattern.rs:16` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) crates/biome_js_type_info/src/local_inference.rs:95 — crates/biome_js_type_info/src/local_inference.rs:95-102 | crates/biome_js_type_info/src/local_inference.rs:118-125 | crates/biome_js_type_info/src/local_inference.rs:214-221 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/local_inference.rs:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) crates/biome_ruledoc_utils/src/lib.rs:153 — crates/biome_ruledoc_utils/src/lib.rs:153-160 | crates/biome_test_utils/src/lib.rs:336-343 | crates/biome_test_utils/src/lib.rs:383-390 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_ruledoc_utils/src/lib.rs:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) crates/biome_service/src/file_handlers/html.rs:774 — crates/biome_service/src/file_handlers/html.rs:774-781 | crates/biome_service/src/file_handlers/javascript.rs:1074-1081 | crates/biome_service/src/file_handlers/md.rs:519-526 — before extracting anything, compare `crates/biome_service/src/file_handlers/html.rs` and `crates/biome_service/src/file_handlers/javascript.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 3) crates/biome_yaml_parser/src/parser/flow.rs:150 — crates/biome_yaml_parser/src/parser/flow.rs:150-157 | crates/biome_yaml_parser/src/parser/flow.rs:166-173 | crates/biome_yaml_parser/src/parser/flow.rs:178-185 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/biome_graphql_formatter/src/graphql/lists/list_value_element_list.rs:13 — crates/biome_graphql_formatter/src/graphql/lists/list_value_element_list.rs:13-20 | crates/biome_graphql_formatter/src/graphql/lists/object_value_member_list.rs:13-20 | crates/biome_graphql_formatter/src/graphql/lists/variable_definition_list.rs:12-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/lists/list_value_element_list.rs:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlListValueElementList` in one and `&GraphqlObjectValueMemberList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 3) crates/biome_css_semantic/src/semantic_model/db.rs:162 — crates/biome_css_semantic/src/semantic_model/db.rs:162-169 | crates/biome_js_control_flow/src/db.rs:29-36 | crates/biome_js_semantic/src/db.rs:44-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_semantic/src/semantic_model/db.rs:162` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `db` to `&dyn ParseDb` in one and `&dyn LanguageDb` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 3) crates/biome_html_formatter/src/lib.rs:50 — crates/biome_html_formatter/src/lib.rs:50-57 | crates/biome_js_formatter/src/lib.rs:617-624 | crates/biome_markdown_formatter/src/lib.rs:282-289 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_formatter/src/lib.rs:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `HtmlFormatOptions` in one and `JsFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_boolean_sort_comparator.rs:170 — crates/biome_js_analyze/src/lint/nursery/no_boolean_sort_comparator.rs:170-178 | crates/biome_js_analyze/src/lint/nursery/no_negation_in_equality_check.rs:351-359 | crates/biome_js_analyze/src/lint/suspicious/no_empty_interface.rs:104-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_boolean_sort_comparator.rs:170` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · xtask_codegen · ×13
  • xtask_codegen::generate_nodes::generate_nodes (cognitive 74) xtask/codegen/src/generate_nodes.rs:9 — xtask_codegen::generate_nodes::generate_nodes has cognitive complexity 74 (threshold 15). Drivers by points: if/else 53 (65 pts), match/switch 5 (6 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • xtask_codegen::generate_css_baseline::extract_css_features (cognitive 38) xtask/codegen/src/generate_css_baseline.rs:197 — xtask_codegen::generate_css_baseline::extract_css_features has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (33 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::formatter::get_node_concept (cognitive 37) xtask/codegen/src/formatter.rs:740 — xtask_codegen::formatter::get_node_concept has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 8 (23 pts), boolean chains 10, if/else 4 (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • xtask_codegen::generate_schema::rename_references_in_object (cognitive 35) xtask/codegen/src/generate_schema.rs:129 — xtask_codegen::generate_schema::rename_references_in_object has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (10 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::generate_global_types::lower::overrides::lower_promise_globals (cognitive 27) xtask/codegen/src/generate_global_types/lower/overrides.rs:316 — xtask_codegen::generate_global_types::lower::overrides::lower_promise_globals has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 5 (6 pts), match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::generate_global_types::source::parse_lib_entries (cognitive 24) xtask/codegen/src/generate_global_types/source.rs:187 — xtask_codegen::generate_global_types::source::parse_lib_entries has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::generate_global_types::lower::overrides::lower_error_constructor_signatures (cognitive 22) xtask/codegen/src/generate_global_types/lower/overrides.rs:1223 — xtask_codegen::generate_global_types::lower::overrides::lower_error_constructor_signatures has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::generate_js_plugin_ast::generate_typescript (cognitive 22) xtask/codegen/src/generate_js_plugin_ast.rs:194 — xtask_codegen::generate_js_plugin_ast::generate_typescript has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 3 (6 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::generate_schema::rename_references_in_schema (cognitive 20) xtask/codegen/src/generate_schema.rs:87 — xtask_codegen::generate_schema::rename_references_in_schema has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::generate_configuration::generate_for_groups (cognitive 19) xtask/codegen/src/generate_configuration.rs:427 — xtask_codegen::generate_configuration::generate_for_groups has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 2 (3 pts), match/switch 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • xtask_codegen::move_rule::plan_rule_moves (cognitive 18) xtask/codegen/src/move_rule.rs:90 — xtask_codegen::move_rule::plan_rule_moves has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::generate_global_types::lower::overrides::lower_disposable_global (cognitive 17) xtask/codegen/src/generate_global_types/lower/overrides.rs:777 — xtask_codegen::generate_global_types::lower::overrides::lower_disposable_global has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_codegen::ast::check_unions (cognitive 16) xtask/codegen/src/ast.rs:129 — xtask_codegen::ast::check_unions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Collector · ×13
  • Collector::collect_macro (cognitive 28) crates/biome_vue_semantic/src/semantic_model/component.rs:1961 — Collector::collect_macro has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Collector::collect_setup_function (cognitive 27) crates/biome_vue_semantic/src/semantic_model/component.rs:1757 — Collector::collect_setup_function has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Collector::collect_runtime_props (cognitive 20) crates/biome_vue_semantic/src/semantic_model/component.rs:678 — Collector::collect_runtime_props has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Collector::runtime_prop_detail (cognitive 20) crates/biome_vue_semantic/src/semantic_model/component.rs:786 — Collector::runtime_prop_detail has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (6 pts), loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Collector::collect_computed_option (cognitive 20) crates/biome_vue_semantic/src/semantic_model/component.rs:1457 — Collector::collect_computed_option has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 3 (5 pts), loops 2 (5 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Collector::collect_type_emits (cognitive 19) crates/biome_vue_semantic/src/semantic_model/component.rs:1112 — Collector::collect_type_emits has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Collector::collect_component_call (cognitive 18) crates/biome_vue_semantic/src/semantic_model/component.rs:295 — Collector::collect_component_call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Collector::collect_setup_statements (cognitive 18) crates/biome_vue_semantic/src/semantic_model/component.rs:1833 — Collector::collect_setup_statements has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Collector::run (cognitive 17) crates/biome_vue_semantic/src/semantic_model/component.rs:123 — Collector::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Collector::collect_runtime_emits (cognitive 17) crates/biome_vue_semantic/src/semantic_model/component.rs:1038 — Collector::collect_runtime_emits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Collector::record_merged_options (cognitive 16) crates/biome_vue_semantic/src/semantic_model/component.rs:260 — Collector::record_merged_options has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Collector::is_vue_api (cognitive 16) crates/biome_vue_semantic/src/semantic_model/component.rs:377 — Collector::is_vue_api has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Collector::collect_module_bindings (cognitive 16) crates/biome_vue_semantic/src/semantic_model/component.rs:462 — Collector::collect_module_bindings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D35 · Change Coupling · Change coupling · ×13
  • Change coupling: mod.rs ↔ mod.rs crates/biome_css_parser/src/lexer/mod.rs:1 — `crates/biome_css_parser/src/lexer/mod.rs` and `crates/biome_css_parser/src/syntax/at_rule/mod.rs` change together 81% of the time (13 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `6ffd0a11` fix(css): preserve interpolated SCSS at-rule names (#12205); `ecd00e81` feat(css): add support for SCSS `@for` at-rule (#9421); `6742246b` feat(css): add support for SCSS `@each` at-rule (#9418) (#9419) — run `git show` on any of them.
  • Change coupling: client.rs ↔ server.rs crates/biome_service/src/workspace/client.rs:1 — `crates/biome_service/src/workspace/client.rs` and `crates/biome_service/src/workspace/server.rs` change together 75% of the time (12 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `527db7f7` feat(wasm): expose new functions (#6896); `2782175c` fix(lsp): code action error (#6545); `47cc739f` fix(core): don't create a new project when the configuration changes … — run `git show` on any of them.
  • Change coupling: tests.rs ↔ mod.rs crates/biome_html_parser/src/lexer/tests.rs:1 — `crates/biome_html_parser/src/lexer/tests.rs` and `crates/biome_html_parser/src/syntax/mod.rs` change together 75% of the time (12 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `4eadd575` fix(html): lex processing instructions in their own context (#12292); `6a855885` fix(parse/html): stop reading `{{` as an interpolation in Svelte (#11…; `32dad2de` feat(parse/html/svelte): new svelte syntax for comments inside tags (… — run `git show` on any of them.
  • Change coupling: no_private_imports.rs ↔ no_unresolved_imports.rs crates/biome_js_analyze/src/lint/correctness/no_private_imports.rs:1 — `crates/biome_js_analyze/src/lint/correctness/no_private_imports.rs` and `crates/biome_js_analyze/src/lint/correctness/no_unresolved_imports.rs` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `ac6615cd` refactor: removes mutex from salsa db (#10608); `3f06e19c` feat(linter): implement `noDeprecatedImports` (#7520) (at that commit the file was still `crates/biome_js_analyze/src/lint/nursery/no_unresolved_imports.rs`); `490d3555` chore: cleanup file annotations (#7462) (at that commit the file was still `crates/biome_js_analyze/src/lint/nursery/no_unresolved_imports.rs`) — run `git show` on any of them.
  • Change coupling: check.rs ↔ lint.rs crates/biome_cli/src/commands/check.rs:1 — `crates/biome_cli/src/commands/check.rs` and `crates/biome_cli/src/commands/lint.rs` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `de1ad4c4` feat: enable markdown (#11394); `d6d55d04` chore: remove dead code and update CLI comments (#10748); `e7872bff` feat(cli): add watch mode (--watch) to the CLI for check/format/lint … — run `git show` on any of them.
  • Change coupling: formatter.rs ↔ configuration.rs crates/biome_configuration/src/formatter.rs:1 — `crates/biome_configuration/src/formatter.rs` and `crates/biome_service/src/configuration.rs` change together 62% of the time (13 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `0c250ab5` revert: editorconfig not default (#5733); `baf09274` feat(biome_cli): enable .editorconfig by default (#5127); `8b54010c` feat(editorconfig): reenable editorconfig support, add cli flag to di… — run `git show` on any of them.
  • Change coupling: mod.rs ↔ svelte.rs crates/biome_html_parser/src/lexer/mod.rs:1 — `crates/biome_html_parser/src/lexer/mod.rs` and `crates/biome_html_parser/src/syntax/svelte.rs` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `b073c2f6` fix(lint/html/svelte): mark `class:` and `style:` shorthands as varia…; `6a855885` fix(parse/html): stop reading `{{` as an interpolation in Svelte (#11…; `96ef9a4c` fix(html-parser): allow TypeScript as const in Svelte {#each} express… — run `git show` on any of them.
  • Change coupling: check.rs ↔ format.rs crates/biome_cli/src/commands/check.rs:1 — `crates/biome_cli/src/commands/check.rs` and `crates/biome_cli/src/commands/format.rs` change together 58% of the time (19 of the 33 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `de1ad4c4` feat: enable markdown (#11394); `e7872bff` feat(cli): add watch mode (--watch) to the CLI for check/format/lint …; `baf09274` feat(biome_cli): enable .editorconfig by default (#5127) — run `git show` on any of them.
  • Change coupling: ci.rs ↔ format.rs crates/biome_cli/src/commands/ci.rs:1 — `crates/biome_cli/src/commands/ci.rs` and `crates/biome_cli/src/commands/format.rs` change together 54% of the time (14 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `baf09274` feat(biome_cli): enable .editorconfig by default (#5127); `7aae85e0` fix(lsp): apply `.editorconfig` options (#3948); `78bfeef1` fix(cli): prevent overwriting paths when using `--staged` or `--chang… — run `git show` on any of them.
  • Change coupling: mod.rs ↔ parse_error.rs crates/biome_css_parser/src/lexer/mod.rs:1 — `crates/biome_css_parser/src/lexer/mod.rs` and `crates/biome_css_parser/src/syntax/parse_error.rs` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `97c92a1c` feat(css): add scss keyword and arbitrary arguments (#9227); `547c2da0` fix(parse/css): parse tailwind `@source inline(...)` (#7921); `62a7a2b6` feat(css_parser): parse CSS-wide keywords and disallow their usage as… — run `git show` on any of them.
  • Change coupling: mod.rs ↔ server.rs crates/biome_package/src/node_js_package/mod.rs:1 — `crates/biome_package/src/node_js_package/mod.rs` and `crates/biome_service/src/workspace/server.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `13785fc8` feat(lint): support pnpm catalogs (#8396); `01d8c5ac` feat(core): implement resolving path aliases from `tsconfig.json` (#6…; `e0ec141a` perf: faster manifest handling (#5926) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ vue.rs crates/biome_html_parser/src/lexer/mod.rs:1 — `crates/biome_html_parser/src/lexer/mod.rs` and `crates/biome_html_parser/src/syntax/vue.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `ba1d8ea6` feat(parse/html/vue): nested destructuring in v-for (#10136); `32dad2de` feat(parse/html/svelte): new svelte syntax for comments inside tags (…; `426de981` fix(html): parsing of directives in svelte (#9021) — run `git show` on any of them.
  • Change coupling: spec.rs ↔ session.rs crates/biome_formatter_test/src/spec.rs:1 — `crates/biome_formatter_test/src/spec.rs` and `crates/biome_lsp/src/session.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `b86842c2` fix(cli): allow --stdin-file-path outside files.includes (#8508); `6cc84cb5` fix(core): consider extended configs for scan kind (#7099); `e366e75a` fix(service): biome/file_features still should return a map instead o… — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×13
  • Edited copy of a member (28 corresponding lines) crates/biome_markdown_formatter/src/words.rs:184 — crates/biome_markdown_formatter/src/words.rs:184-211 | crates/biome_markdown_formatter/src/words.rs:213-240 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_vue_deprecated_listeners.rs:71 — crates/biome_js_analyze/src/lint/nursery/no_vue_deprecated_listeners.rs:71-98 | crates/biome_js_analyze/src/lint/nursery/no_vue_deprecated_scoped_slots.rs:72-99 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) xtask/codegen/src/generate_migrate_eslint.rs:193 — xtask/codegen/src/generate_migrate_eslint.rs:193-220 | xtask/codegen/src/generate_migrate_stylelint.rs:202-229 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_valid_aria_role.rs:89 — crates/biome_html_analyze/src/lint/a11y/use_valid_aria_role.rs:89-116 | crates/biome_js_analyze/src/lint/a11y/use_valid_aria_role.rs:111-143 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_svelte_useless_derived_by.rs:182 — crates/biome_js_analyze/src/lint/nursery/no_svelte_useless_derived_by.rs:182-209 | crates/biome_js_analyze/src/lint/style/use_collapsed_else_if.rs:142-170 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_module_graph/src/db/type_inference/imports.rs:201 — crates/biome_module_graph/src/db/type_inference/imports.rs:201-228 | crates/biome_module_graph/src/db/type_inference/imports.rs:794-825 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:216 — crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:216-249 | crates/biome_js_analyze/src/lint/a11y/no_label_without_control.rs:214-241 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_is.rs:95 — crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_is.rs:95-122 | crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_memo.rs:81-117 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:946 — crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:946-975 | crates/biome_service/src/file_handlers/javascript.rs:785-812 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_vue_valid_define_emits.rs:303 — crates/biome_js_analyze/src/lint/nursery/use_vue_valid_define_emits.rs:303-331 | crates/biome_js_analyze/src/lint/nursery/use_vue_valid_define_options.rs:356-383 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:52 — crates/biome_html_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:52-79 | crates/biome_js_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:52-80 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:608 — crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:608-635 | crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:315-346 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:390 — crates/biome_js_type_info/src/format_inferred_type_info.rs:390-417 | crates/biome_js_type_info/src/format_inferred_type_info.rs:421-455 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×13
  • Edited copy of a member (6 corresponding lines) crates/biome_css_parser/src/syntax/property/mod.rs:326 — crates/biome_css_parser/src/syntax/property/mod.rs:326-331 | crates/biome_graphql_parser/src/parser/definitions/operation.rs:269-278 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_rowan/src/cursor/node.rs:901 — crates/biome_rowan/src/cursor/node.rs:901-906 | crates/biome_rowan/src/cursor/node.rs:1101-1106 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_js_type_info/src/interned_types.rs:2641 — crates/biome_js_type_info/src/interned_types.rs:2641-2646 | crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:939-947 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_slot_scope.rs:342 — crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_slot_scope.rs:342-348 | crates/biome_tailwind_logic/src/class_category.rs:547-552 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_css_parser/src/syntax/scss/expression/list.rs:181 — crates/biome_css_parser/src/syntax/scss/expression/list.rs:181-186 | crates/biome_markdown_parser/src/syntax/mod.rs:794-799 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_diagnostics/src/location.rs:298 — crates/biome_diagnostics/src/location.rs:298-303 | crates/biome_js_parser/src/span.rs:28-33 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_manifest/src/lib.rs:429 — crates/biome_manifest/src/lib.rs:429-435 | crates/biome_plugin_loader/src/lib.rs:536-541 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_css_formatter/src/scss/lists/map_expression_pair_list.rs:105 — crates/biome_css_formatter/src/scss/lists/map_expression_pair_list.rs:105-110 | crates/biome_css_formatter/src/scss/statements/at_root_at_rule.rs:54-59 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_null.rs:250 — crates/biome_js_analyze/src/lint/nursery/no_null.rs:250-255 | crates/biome_js_formatter/src/utils/member_chain/mod.rs:609-614 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_module_graph/src/css_module_info/tailwind.rs:118 — crates/biome_module_graph/src/css_module_info/tailwind.rs:118-123 | crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/design_system.rs:149-154 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_css_formatter/src/scss/statements/at_root_at_rule.rs:47 — crates/biome_css_formatter/src/scss/statements/at_root_at_rule.rs:47-52 | crates/biome_css_formatter/src/utils/scss_closing_comments.rs:66-71 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_css_analyze/src/lint/a11y/use_generic_font_names.rs:202 — crates/biome_css_analyze/src/lint/a11y/use_generic_font_names.rs:202-207 | crates/biome_js_analyze/src/lint/performance/no_jsx_props_bind.rs:61-68 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_vue_shadow_native_events.rs:208 — crates/biome_js_analyze/src/lint/nursery/no_vue_shadow_native_events.rs:208-213 | crates/biome_js_analyze/src/lint/suspicious/no_unknown_attribute.rs:1093-1098 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D1 · Cyclomatic Complexity · biome_js_parser · ×12
  • biome_js_parser::syntax::stmt::parse_statement (cyclomatic 50) crates/biome_js_parser/src/syntax/stmt.rs:158 — biome_js_parser::syntax::stmt::parse_statement has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_parser::syntax::expr::parse_binary_or_logical_expression (cyclomatic 29) crates/biome_js_parser/src/syntax/expr.rs:531 — biome_js_parser::syntax::expr::parse_binary_or_logical_expression has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_parser::syntax::expr::parse_primary_expression (cyclomatic 26) crates/biome_js_parser/src/syntax/expr.rs:1281 — biome_js_parser::syntax::expr::parse_primary_expression has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_parser::syntax::typescript::types::parse_ts_non_array_type (cyclomatic 26) crates/biome_js_parser/src/syntax/typescript/types.rs:898 — biome_js_parser::syntax::typescript::types::parse_ts_non_array_type has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_parser::syntax::function::is_parenthesized_arrow_function_expression_impl (cyclomatic 25) crates/biome_js_parser/src/syntax/function.rs:727 — biome_js_parser::syntax::function::is_parenthesized_arrow_function_expression_impl has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_parser::syntax::stmt::parse_variable_declarator (cyclomatic 24) crates/biome_js_parser/src/syntax/stmt.rs:1366 — biome_js_parser::syntax::stmt::parse_variable_declarator has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_parser::syntax::class::parse_class_member_impl (cyclomatic 20) crates/biome_js_parser/src/syntax/class.rs:635 — biome_js_parser::syntax::class::parse_class_member_impl has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_parser::syntax::module::parse_import_clause (cyclomatic 18) crates/biome_js_parser/src/syntax/module.rs:269 — biome_js_parser::syntax::module::parse_import_clause has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_js_parser::syntax::module::parse_export_default_clause (cyclomatic 18) crates/biome_js_parser/src/syntax/module.rs:1167 — biome_js_parser::syntax::module::parse_export_default_clause has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_parser::syntax::object::parse_object_member (cyclomatic 17) crates/biome_js_parser/src/syntax/object.rs:90 — biome_js_parser::syntax::object::parse_object_member has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_parser::syntax::expr::parse_member_expression_rest (cyclomatic 16) crates/biome_js_parser/src/syntax/expr.rs:714 — biome_js_parser::syntax::expr::parse_member_expression_rest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_parser::syntax::expr::parse_unary_expr (cyclomatic 16) crates/biome_js_parser/src/syntax/expr.rs:1866 — biome_js_parser::syntax::expr::parse_unary_expr has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×12
  • Duplicated block (10–11 lines × 2) crates/biome_embeds/src/visitor.rs:695 — crates/biome_embeds/src/visitor.rs:695-704 | crates/biome_embeds/src/visitor.rs:716-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_embeds/src/visitor.rs:695` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10–11 lines × 2) crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:186 — crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:186-195 | crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs:190-200 — before extracting anything, compare `crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs` and `crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:186` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10–11 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:154 — crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:154-164 | crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:167-176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) crates/biome_js_analyze/src/lint/correctness/use_valid_for_direction.rs:124 — crates/biome_js_analyze/src/lint/correctness/use_valid_for_direction.rs:124-133 | crates/biome_js_analyze/src/lint/correctness/use_valid_for_direction.rs:135-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10–11 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_object_constructor.rs:155 — crates/biome_js_analyze/src/lint/nursery/no_object_constructor.rs:155-165 | crates/biome_js_analyze/src/lint/nursery/no_zero_fractions.rs:273-282 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_object_constructor.rs:155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) crates/biome_js_formatter/src/jsx/tag/closing_element.rs:22 — crates/biome_js_formatter/src/jsx/tag/closing_element.rs:22-32 | crates/biome_js_formatter/src/jsx/tag/closing_fragment.rs:24-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/jsx/tag/closing_element.rs:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) crates/biome_js_parser/src/syntax/stmt.rs:626 — crates/biome_js_parser/src/syntax/stmt.rs:626-635 | crates/biome_js_parser/src/syntax/stmt.rs:696-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_parser/src/syntax/stmt.rs:626` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:1469 — crates/biome_markdown_parser/src/syntax/list.rs:1469-1479 | crates/biome_markdown_parser/src/syntax/quote.rs:769-778 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10–11 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:2689 — crates/biome_markdown_parser/src/syntax/list.rs:2689-2698 | crates/biome_markdown_parser/src/syntax/quote.rs:116-126 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10–11 lines × 2) crates/biome_service/src/settings.rs:1146 — crates/biome_service/src/settings.rs:1146-1155 | crates/biome_service/src/settings.rs:1168-1178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/settings.rs:1146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) crates/biome_service/src/settings.rs:2098 — crates/biome_service/src/settings.rs:2098-2107 | crates/biome_service/src/settings.rs:2356-2366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&mut JsFormatOptions` in one and `&mut MdFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10–11 lines × 2) crates/biome_service/src/workspace_types.rs:287 — crates/biome_service/src/workspace_types.rs:287-297 | crates/biome_service/src/workspace_types.rs:314-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/workspace_types.rs:287` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D1 · Cyclomatic Complexity · InferredType · ×11
  • InferredType::is_promise_instance_with (cyclomatic 46) crates/biome_js_type_info/src/inferred_type.rs:431 — InferredType::is_promise_instance_with has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • InferredType::object_spread_misuse (cyclomatic 28) crates/biome_js_type_info/src/inferred_type/spread_misuse.rs:61 — InferredType::object_spread_misuse has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • InferredType::has_index_signature (cyclomatic 23) crates/biome_js_type_info/src/inferred_type.rs:1237 — InferredType::has_index_signature has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • InferredType::try_switch_case_variants (cyclomatic 23) crates/biome_js_type_info/src/inferred_type.rs:1403 — InferredType::try_switch_case_variants has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • InferredType::has_overloaded_member (cyclomatic 21) crates/biome_js_type_info/src/inferred_type.rs:693 — InferredType::has_overloaded_member has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • InferredType::conditional_type (cyclomatic 21) crates/biome_js_type_info/src/inferred_type.rs:1570 — InferredType::conditional_type has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • InferredType::has_computed_member (cyclomatic 21) crates/biome_js_type_info/src/inferred_type.rs:1715 — InferredType::has_computed_member has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • InferredType::is_at_least_as_wide_as_object (cyclomatic 19) crates/biome_js_type_info/src/inferred_type.rs:797 — InferredType::is_at_least_as_wide_as_object has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • InferredType::boolean_coercion (cyclomatic 17) crates/biome_js_type_info/src/inferred_type/boolean_coercion.rs:26 — InferredType::boolean_coercion has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • InferredType::function_returns_promise_with (cyclomatic 16) crates/biome_js_type_info/src/inferred_type.rs:971 — InferredType::function_returns_promise_with has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: CallableVisitor::enter (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • InferredType::callable_type_with (cyclomatic 16) crates/biome_js_type_info/src/inferred_type.rs:1035 — InferredType::callable_type_with has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: CallableVisitor::enter (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · biome_css_analyze · ×11
  • biome_css_analyze::lint::correctness::no_unknown_media_feature_name::has_invalid_media_feature_name (cognitive 77) crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:249 — biome_css_analyze::lint::correctness::no_unknown_media_feature_name::has_invalid_media_feature_name has cognitive complexity 77 (threshold 15). Drivers by points: if/else 10 (50 pts), match/switch 5 (18 pts), loops 3 (9 pts) (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_analyze::fonts::find_font_family (cognitive 27) crates/biome_css_analyze/src/fonts.rs:338 — biome_css_analyze::fonts::find_font_family has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_analyze::lint::correctness::no_invalid_grid_areas::check_grid_rows (cognitive 26) crates/biome_css_analyze/src/lint/correctness/no_invalid_grid_areas.rs:226 — biome_css_analyze::lint::correctness::no_invalid_grid_areas::check_grid_rows has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (7 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_analyze::lint::style::no_descending_specificity::find_descending_selector (cognitive 23) crates/biome_css_analyze/src/lint/style/no_descending_specificity.rs:292 — biome_css_analyze::lint::style::no_descending_specificity::find_descending_selector has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_css_analyze::assist::source::use_sorted_properties::contains_property_conflicts (cognitive 22) crates/biome_css_analyze/src/assist/source/use_sorted_properties.rs:528 — biome_css_analyze::assist::source::use_sorted_properties::contains_property_conflicts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_analyze::lint::nursery::use_logical_properties::merge_longhands_violation (cognitive 21) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:850 — biome_css_analyze::lint::nursery::use_logical_properties::merge_longhands_violation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_analyze::lint::nursery::use_logical_properties::make_split_declaration (cognitive 21) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1155 — biome_css_analyze::lint::nursery::use_logical_properties::make_split_declaration has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_analyze::lint::nursery::use_logical_properties::collect_function_expression_violations (cognitive 20) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1626 — biome_css_analyze::lint::nursery::use_logical_properties::collect_function_expression_violations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_analyze::lint::nursery::use_logical_properties::collect_value_violations (cognitive 18) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1540 — biome_css_analyze::lint::nursery::use_logical_properties::collect_value_violations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_analyze::lint::correctness::no_unmatchable_anb_selector::is_unmatchable (cognitive 16) crates/biome_css_analyze/src/lint/correctness/no_unmatchable_anb_selector.rs:110 — biome_css_analyze::lint::correctness::no_unmatchable_anb_selector::is_unmatchable has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 7 (15 pts), boolean chains 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_css_analyze::lint::suspicious::no_useless_escape_in_string::next_useless_escape (cognitive 16) crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:107 — biome_css_analyze::lint::suspicious::no_useless_escape_in_string::next_useless_escape has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_vue_semantic · ×11
  • biome_vue_semantic::semantic_model::references::usage_of (cognitive 51) crates/biome_vue_semantic/src/semantic_model/references.rs:243 — biome_vue_semantic::semantic_model::references::usage_of has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (40 pts), match/switch 4 (9 pts), boolean chains 1, loops 1 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_vue_semantic::semantic_model::sfc_model (cognitive 43) crates/biome_vue_semantic/src/semantic_model/mod.rs:70 — biome_vue_semantic::semantic_model::sfc_model has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 5 (8 pts), boolean chains 5, match/switch 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_vue_semantic::semantic_model::snippets::class_entries_of (cognitive 42) crates/biome_vue_semantic/src/semantic_model/snippets.rs:453 — biome_vue_semantic::semantic_model::snippets::class_entries_of has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 5 (10 pts), match/switch 3 (8 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_vue_semantic::semantic_model::references::collect_markup_references (cognitive 39) crates/biome_vue_semantic/src/semantic_model/references.rs:1249 — biome_vue_semantic::semantic_model::references::collect_markup_references has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 3 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_vue_semantic::semantic_model::references::collect_template_references (cognitive 35) crates/biome_vue_semantic/src/semantic_model/references.rs:821 — biome_vue_semantic::semantic_model::references::collect_template_references has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 5 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_vue_semantic::semantic_model::references::collect_script_references (cognitive 31) crates/biome_vue_semantic/src/semantic_model/references.rs:1005 — biome_vue_semantic::semantic_model::references::collect_script_references has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (5 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_vue_semantic::format_semantic_model::write_symbol (cognitive 29) crates/biome_vue_semantic/src/format_semantic_model.rs:58 — biome_vue_semantic::format_semantic_model::write_symbol has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (25 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_vue_semantic::semantic_model::snippets::expression_shape (cognitive 29) crates/biome_vue_semantic/src/semantic_model/snippets.rs:220 — biome_vue_semantic::semantic_model::snippets::expression_shape has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 7 (14 pts), if/else 4 (11 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_vue_semantic::semantic_model::layout::visit_attribute (cognitive 21) crates/biome_vue_semantic/src/semantic_model/layout.rs:297 — biome_vue_semantic::semantic_model::layout::visit_attribute has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 3 (6 pts), loops 1 (4 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_vue_semantic::semantic_model::snippets::find_host (cognitive 21) crates/biome_vue_semantic/src/semantic_model/snippets.rs:100 — biome_vue_semantic::semantic_model::snippets::find_host has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_vue_semantic::semantic_model::component::returned_objects (cognitive 16) crates/biome_vue_semantic/src/semantic_model/component.rs:2540 — biome_vue_semantic::semantic_model::component::returned_objects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×11
  • Edited copy of a member (25 corresponding lines) crates/biome_js_parser/src/syntax/module.rs:770 — crates/biome_js_parser/src/syntax/module.rs:770-794 | crates/biome_js_parser/src/syntax/module.rs:1055-1085 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:181 — crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:181-210 | crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:212-236 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:153 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:153-177 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:132-159 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_css_parser/src/syntax/scss/at_rule/module_clauses.rs:105 — crates/biome_css_parser/src/syntax/scss/at_rule/module_clauses.rs:105-134 | crates/biome_css_parser/src/syntax/scss/declaration/variable_modifier.rs:49-73 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_rowan/src/cursor/node.rs:645 — crates/biome_rowan/src/cursor/node.rs:645-670 | crates/biome_rowan/src/cursor/node.rs:676-700 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_then_property.rs:172 — crates/biome_js_analyze/src/lint/suspicious/no_then_property.rs:172-196 | crates/biome_js_analyze/src/lint/suspicious/no_then_property.rs:277-301 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_css_analyze/src/fonts.rs:233 — crates/biome_css_analyze/src/fonts.rs:233-260 | crates/biome_css_syntax/src/property_syntax/matcher.rs:124-148 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:162 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:162-186 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:172-196 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_css_formatter/src/css/statements/unknown_block_at_rule.rs:9 — crates/biome_css_formatter/src/css/statements/unknown_block_at_rule.rs:9-33 | crates/biome_css_formatter/src/css/statements/unknown_value_at_rule.rs:10-36 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_bind_style.rs:73 — crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_bind_style.rs:73-97 | crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_on_style.rs:72-96 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) crates/biome_service/src/file_handlers/svelte.rs:73 — crates/biome_service/src/file_handlers/svelte.rs:73-97 | crates/biome_service/src/file_handlers/vue.rs:73-100 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×11
  • Edited copy of a member (22 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:674 — crates/biome_js_type_info/src/format_inferred_type_info.rs:674-695 | crates/biome_js_type_info/src/format_type_info.rs:679-703 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_service/src/settings.rs:2614 — crates/biome_service/src/settings.rs:2614-2635 | crates/biome_service/src/settings.rs:2641-2665 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_service/src/workspace/server.rs:1327 — crates/biome_service/src/workspace/server.rs:1327-1348 | crates/biome_service/src/workspace/server.rs:1354-1375 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:764 — crates/biome_markdown_parser/src/syntax/list.rs:764-790 | crates/biome_markdown_parser/src/syntax/list.rs:793-814 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:610 — crates/biome_markdown_parser/src/syntax/list.rs:610-631 | crates/biome_markdown_parser/src/syntax/list.rs:1132-1153 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_lsp/src/server.rs:828 — crates/biome_lsp/src/server.rs:828-849 | crates/biome_lsp/src/server.rs:864-885 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_css_syntax/src/property_syntax/matcher.rs:26 — crates/biome_css_syntax/src/property_syntax/matcher.rs:26-49 | crates/biome_css_syntax/src/property_syntax/matcher.rs:75-96 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_html_syntax/src/static_value.rs:52 — crates/biome_html_syntax/src/static_value.rs:52-75 | crates/biome_js_syntax/src/static_value.rs:54-75 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_css_parser/src/syntax/at_rule/mod.rs:109 — crates/biome_css_parser/src/syntax/at_rule/mod.rs:109-130 | crates/biome_css_parser/src/syntax/selector/pseudo_class/mod.rs:61-82 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_css_formatter/src/css/auxiliary/function_at_rule_declarator.rs:14 — crates/biome_css_formatter/src/css/auxiliary/function_at_rule_declarator.rs:14-39 | crates/biome_css_formatter/src/css/statements/namespace_at_rule.rs:7-28 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_static_element_interactions.rs:68 — crates/biome_html_analyze/src/lint/a11y/no_static_element_interactions.rs:68-94 | crates/biome_js_analyze/src/lint/a11y/no_static_element_interactions.rs:72-93 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×11
  • Duplicated block (11 lines × 3) crates/biome_graphql_formatter/src/graphql/definitions/field_definition.rs:14 — crates/biome_graphql_formatter/src/graphql/definitions/field_definition.rs:14-28 | crates/biome_graphql_formatter/src/graphql/definitions/interface_type_definition.rs:14-24 | crates/biome_graphql_formatter/src/graphql/definitions/object_type_definition.rs:14-28 — before extracting anything, compare `crates/biome_graphql_formatter/src/graphql/definitions/interface_type_definition.rs` and `crates/biome_graphql_formatter/src/graphql/definitions/object_type_definition.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/definitions/field_definition.rs:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlFieldDefinition` in one and `&GraphqlInterfaceTypeDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_graphql_formatter/src/graphql/definitions/field_definition.rs:30` calls `format` and `crates/biome_graphql_formatter/src/graphql/definitions/object_type_definition.rs:30` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 3) crates/biome_graphql_formatter/src/graphql/definitions/fragment_definition.rs:15 — crates/biome_graphql_formatter/src/graphql/definitions/fragment_definition.rs:15-29 | crates/biome_graphql_formatter/src/graphql/definitions/operation_definition.rs:13-23 | crates/biome_graphql_formatter/src/graphql/definitions/variable_definition.rs:14-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/definitions/fragment_definition.rs:15` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlFragmentDefinition` in one and `&GraphqlOperationDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 3) crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:156 — crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:156-166 | crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs:164-174 | crates/biome_js_analyze/src/lint/style/use_throw_new_error.rs:119-129 — before extracting anything, compare `crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs` and `crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_throw_new_error.rs:119` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:236 — crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:236-246 | crates/biome_js_analyze/src/lint/nursery/no_unnecessary_string_trim.rs:275-285 | crates/biome_js_analyze/src/utils/indexed_collection.rs:36-46 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs` and `crates/biome_js_analyze/src/utils/indexed_collection.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:236` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_unsafe_type_assertion.rs:187 — crates/biome_js_analyze/src/lint/nursery/no_unsafe_type_assertion.rs:187-197 | crates/biome_js_analyze/src/lint/nursery/no_useless_type_assertion.rs:530-540 | crates/biome_js_type_info/src/local_inference.rs:3591-3601 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 3) crates/biome_vue_semantic/src/semantic_model/component.rs:1465 — crates/biome_vue_semantic/src/semantic_model/component.rs:1465-1475 | crates/biome_vue_semantic/src/semantic_model/component.rs:1525-1535 | crates/biome_vue_semantic/src/semantic_model/component.rs:1809-1819 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_vue_semantic/src/semantic_model/component.rs:1465` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) crates/biome_cli/src/commands/check.rs:322 — crates/biome_cli/src/commands/check.rs:322-333 | crates/biome_cli/src/commands/format.rs:244-254 | crates/biome_cli/src/commands/lint.rs:333-344 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/commands/check.rs:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) crates/biome_cli/src/reporter/checkstyle.rs:24 — crates/biome_cli/src/reporter/checkstyle.rs:24-34 | crates/biome_cli/src/reporter/json.rs:244-255 | crates/biome_cli/src/reporter/junit.rs:26-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/reporter/checkstyle.rs:24` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) crates/biome_css_formatter/src/comments.rs:103 — crates/biome_css_formatter/src/comments.rs:103-113 | crates/biome_js_formatter/src/comments.rs:91-101 | crates/biome_json_formatter/src/comments.rs:66-76 — before extracting anything, compare `crates/biome_css_formatter/src/comments.rs` and `crates/biome_js_formatter/src/comments.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `comment` to `&SyntaxTriviaPieceComments<Self::Language>` in one and `&SyntaxTriviaPieceComments<JsLanguage>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 3) crates/biome_css_formatter/src/trivia.rs:59 — crates/biome_css_formatter/src/trivia.rs:59-69 | crates/biome_js_formatter/src/trivia.rs:59-69 | crates/biome_json_formatter/src/trivia.rs:59-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut CssFormatter` in one and `&mut JsFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 3) crates/biome_css_formatter/src/css/auxiliary/attribute_name.rs:8 — crates/biome_css_formatter/src/css/auxiliary/attribute_name.rs:8-18 | crates/biome_css_formatter/src/css/selectors/type_selector.rs:8-18 | crates/biome_css_formatter/src/scss/auxiliary/variable.rs:9-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssAttributeName` in one and `&CssTypeSelector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×11
  • Duplicated block (10 lines × 3) crates/biome_cli/src/execute/migrate.rs:284 — crates/biome_cli/src/execute/migrate.rs:284-293 | crates/biome_cli/src/execute/migrate.rs:361-370 | crates/biome_cli/src/execute/migrate.rs:446-455 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate.rs:284` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) crates/biome_grit_parser/src/parser/patterns.rs:132 — crates/biome_grit_parser/src/parser/patterns.rs:132-141 | crates/biome_grit_parser/src/parser/patterns.rs:201-210 | crates/biome_grit_parser/src/parser/patterns.rs:308-317 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_base_to_string.rs:170 — crates/biome_js_analyze/src/lint/nursery/no_base_to_string.rs:170-179 | crates/biome_js_analyze/src/lint/nursery/no_useless_type_conversion.rs:235-244 | crates/biome_js_analyze/src/lint/style/use_spread_over_apply.rs:75-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_base_to_string.rs:170` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:342 — crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:342-351 | crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:390-399 | crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:485-494 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) crates/biome_js_parser/src/syntax/class.rs:2519 — crates/biome_js_parser/src/syntax/class.rs:2519-2530 | crates/biome_js_parser/src/syntax/class.rs:2569-2578 | crates/biome_js_parser/src/syntax/class.rs:2611-2624 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_parser/src/syntax/class.rs:2519` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) crates/biome_module_graph/src/format_module_graph.rs:591 — crates/biome_module_graph/src/format_module_graph.rs:591-600 | crates/biome_module_graph/src/format_module_graph.rs:700-709 | crates/biome_module_graph/src/format_module_graph.rs:720-729 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/format_module_graph.rs:591` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) crates/biome_ruledoc_utils/src/analyzer.rs:182 — crates/biome_ruledoc_utils/src/analyzer.rs:182-191 | crates/biome_ruledoc_utils/src/analyzer.rs:208-217 | crates/biome_ruledoc_utils/src/analyzer.rs:310-320 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_ruledoc_utils/src/analyzer.rs:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 3) crates/biome_ruledoc_utils/src/analyzer.rs:235 — crates/biome_ruledoc_utils/src/analyzer.rs:235-244 | crates/biome_ruledoc_utils/src/analyzer.rs:257-267 | crates/biome_ruledoc_utils/src/analyzer.rs:336-345 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_ruledoc_utils/src/analyzer.rs:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 3) crates/biome_service/src/file_handlers/css.rs:1024 — crates/biome_service/src/file_handlers/css.rs:1024-1033 | crates/biome_service/src/file_handlers/javascript.rs:1693-1702 | crates/biome_service/src/file_handlers/json.rs:953-962 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/javascript.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:1024` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 3) crates/biome_grit_patterns/src/grit_target_language/css_target_language.rs:112 — crates/biome_grit_patterns/src/grit_target_language/css_target_language.rs:112-121 | crates/biome_grit_patterns/src/grit_target_language/js_target_language.rs:166-175 | crates/biome_grit_patterns/src/grit_target_language/json_target_language.rs:125-134 — before extracting anything, compare `crates/biome_grit_patterns/src/grit_target_language/js_target_language.rs` and `crates/biome_grit_patterns/src/grit_target_language/json_target_language.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/grit_target_language/css_target_language.rs:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) crates/biome_js_type_info/src/format_type_info.rs:71 — crates/biome_js_type_info/src/format_type_info.rs:71-80 | crates/biome_module_graph/src/format_module_graph.rs:17-26 | crates/biome_module_graph/src/format_module_graph.rs:200-209 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut std::fmt::Formatter<'_>` in one and `&mut Formatter<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×11
  • Duplicated block (6 lines × 3) crates/biome_cli/src/execute/migrate.rs:227 — crates/biome_cli/src/execute/migrate.rs:227-232 | crates/biome_cli/src/execute/migrate.rs:306-311 | crates/biome_cli/src/execute/migrate.rs:391-396 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/biome_html_syntax/src/attribute_ext.rs:125 — crates/biome_html_syntax/src/attribute_ext.rs:125-130 | crates/biome_html_syntax/src/attribute_ext.rs:206-211 | crates/biome_html_syntax/src/attribute_ext.rs:455-460 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/biome_js_type_info/src/format_inferred_type_info.rs:1134 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1134-1139 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1154-1159 | crates/biome_js_type_info/src/format_type_info.rs:1032-1037 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:1134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 3) crates/biome_lsp/src/server.rs:532 — crates/biome_lsp/src/server.rs:532-537 | crates/biome_lsp/src/server.rs:558-563 | crates/biome_lsp/src/server.rs:571-576 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_lsp/src/server.rs:532` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/biome_module_graph/src/js_module_info/collector.rs:206 — crates/biome_module_graph/src/js_module_info/collector.rs:206-211 | crates/biome_module_graph/src/js_module_info/collector.rs:238-243 | crates/biome_module_graph/src/js_module_info/collector.rs:299-304 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/js_module_info/collector.rs:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/biome_module_graph/src/js_module_info/collector.rs:239 — crates/biome_module_graph/src/js_module_info/collector.rs:239-244 | crates/biome_module_graph/src/js_module_info/collector.rs:258-263 | crates/biome_module_graph/src/js_module_info/collector.rs:300-305 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/js_module_info/collector.rs:239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/biome_yaml_parser/src/parser/block.rs:219 — crates/biome_yaml_parser/src/parser/block.rs:219-224 | crates/biome_yaml_parser/src/parser/block.rs:228-233 | crates/biome_yaml_parser/src/parser/block.rs:237-242 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_new_array.rs:88 — crates/biome_js_analyze/src/lint/nursery/no_new_array.rs:88-93 | crates/biome_js_analyze/src/lint/nursery/no_uninvoked_array_callback.rs:104-109 | crates/biome_js_analyze/src/lint/style/use_array_literals.rs:78-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) crates/biome_css_syntax/src/scss_ext/expression.rs:154 — crates/biome_css_syntax/src/scss_ext/expression.rs:154-159 | crates/biome_js_analyze/src/lint/suspicious/no_unassigned_variables.rs:136-141 | crates/biome_markdown_formatter/src/markdown/auxiliary/inline_italic.rs:69-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsVariableDeclaration` in one and `&MdInlineItalic` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 3) crates/biome_grit_patterns/src/grit_built_in_functions.rs:277 — crates/biome_grit_patterns/src/grit_built_in_functions.rs:277-282 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:510-515 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:549-554 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/grit_built_in_functions.rs:277` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 3) crates/biome_cli/src/execute/migrate/eslint.rs:156 — crates/biome_cli/src/execute/migrate/eslint.rs:156-161 | crates/biome_cli/src/execute/migrate/prettier.rs:496-501 | crates/biome_cli/src/execute/migrate/stylelint.rs:94-99 — before extracting anything, compare `crates/biome_cli/src/execute/migrate/eslint.rs` and `crates/biome_cli/src/execute/migrate/stylelint.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint.rs:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · InferredType · ×10
  • InferredType::is_promise_instance_with (cognitive 77) crates/biome_js_type_info/src/inferred_type.rs:431 — InferredType::is_promise_instance_with has cognitive complexity 77 (threshold 15). Drivers by points: if/else 22 (56 pts), match/switch 4 (12 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InferredType::object_spread_misuse (cognitive 32) crates/biome_js_type_info/src/inferred_type/spread_misuse.rs:61 — InferredType::object_spread_misuse has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 3 (9 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InferredType::callable_type_with (cognitive 28) crates/biome_js_type_info/src/inferred_type.rs:1035 — InferredType::callable_type_with has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (25 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InferredType::try_switch_case_variants (cognitive 28) crates/biome_js_type_info/src/inferred_type.rs:1403 — InferredType::try_switch_case_variants has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 5 (17 pts), if/else 4 (10 pts), loops 1 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • InferredType::conditional_type (cognitive 26) crates/biome_js_type_info/src/inferred_type.rs:1570 — InferredType::conditional_type has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InferredType::is_at_least_as_wide_as_object (cognitive 24) crates/biome_js_type_info/src/inferred_type.rs:797 — InferredType::is_at_least_as_wide_as_object has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InferredType::function_returns_promise_with (cognitive 22) crates/biome_js_type_info/src/inferred_type.rs:971 — InferredType::function_returns_promise_with has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InferredType::boolean_coercion (cognitive 21) crates/biome_js_type_info/src/inferred_type/boolean_coercion.rs:26 — InferredType::boolean_coercion has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • InferredType::has_computed_member (cognitive 21) crates/biome_js_type_info/src/inferred_type.rs:1715 — InferredType::has_computed_member has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InferredType::has_index_signature (cognitive 19) crates/biome_js_type_info/src/inferred_type.rs:1237 — InferredType::has_index_signature has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×10
  • Edited copy of a member (38 corresponding lines) crates/biome_js_analyze/src/lint/correctness/use_single_js_doc_asterisk.rs:143 — crates/biome_js_analyze/src/lint/correctness/use_single_js_doc_asterisk.rs:143-182 | crates/biome_js_analyze/src/lint/suspicious/no_ts_ignore.rs:110-147 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_js_parser/src/syntax/stmt.rs:601 — crates/biome_js_parser/src/syntax/stmt.rs:601-638 | crates/biome_js_parser/src/syntax/stmt.rs:658-709 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_migrate/src/analyzers/includes.rs:25 — crates/biome_migrate/src/analyzers/includes.rs:25-65 | crates/biome_migrate/src/analyzers/organize_imports.rs:23-60 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_css_parser/src/lexer/scan_cursor.rs:627 — crates/biome_css_parser/src/lexer/scan_cursor.rs:627-664 | crates/biome_css_parser/src/lexer/scan_cursor.rs:671-724 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_regexp_exec.rs:48 — crates/biome_js_analyze/src/lint/nursery/use_regexp_exec.rs:48-86 | crates/biome_js_analyze/src/lint/suspicious/use_array_sort_compare.rs:58-95 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:3102 — crates/biome_markdown_parser/src/syntax/list.rs:3102-3139 | crates/biome_markdown_parser/src/syntax/mod.rs:579-631 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_html.rs:91 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_html.rs:91-128 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_text.rs:92-129 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_service/src/file_handlers/css.rs:211 — crates/biome_service/src/file_handlers/css.rs:211-255 | crates/biome_service/src/file_handlers/grit.rs:121-158 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:70 — crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:70-107 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:75-115 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) crates/biome_test_utils/src/lib.rs:171 — crates/biome_test_utils/src/lib.rs:171-211 | crates/biome_test_utils/src/lib.rs:219-256 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×10
  • Edited copy of a member (29 corresponding lines) crates/biome_js_analyze/src/utils.rs:21 — crates/biome_js_analyze/src/utils.rs:21-49 | crates/biome_tailwind_syntax/src/util.rs:7-40 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_misleading_instantiator.rs:102 — crates/biome_js_analyze/src/lint/suspicious/no_misleading_instantiator.rs:102-138 | crates/biome_js_analyze/src/lint/suspicious/no_misleading_instantiator.rs:141-169 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_parser/src/lexer.rs:641 — crates/biome_parser/src/lexer.rs:641-673 | crates/biome_parser/src/lexer.rs:678-706 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_react_compiler/src/convert_ast/modules.rs:474 — crates/biome_react_compiler/src/convert_ast/modules.rs:474-502 | crates/biome_react_compiler/src/convert_ast/statements.rs:364-396 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_js_analyze/src/lint/complexity/no_flat_map_identity.rs:156 — crates/biome_js_analyze/src/lint/complexity/no_flat_map_identity.rs:156-186 | crates/biome_js_analyze/src/lint/complexity/use_flat_map.rs:108-136 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:69 — crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:69-97 | crates/biome_js_analyze/src/lint/a11y/use_valid_autocomplete.rs:70-102 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_js_formatter/src/js/auxiliary/module.rs:13 — crates/biome_js_formatter/src/js/auxiliary/module.rs:13-41 | crates/biome_js_formatter/src/js/auxiliary/script.rs:12-45 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_js_formatter/src/js/lists/object_assignment_pattern_property_list.rs:17 — crates/biome_js_formatter/src/js/lists/object_assignment_pattern_property_list.rs:17-45 | crates/biome_js_formatter/src/js/lists/object_binding_pattern_property_list.rs:15-43 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:102 — crates/biome_js_analyze/src/lint/a11y/use_anchor_content.rs:102-130 | crates/biome_js_analyze/src/lint/a11y/use_heading_content.rs:82-111 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_rest_destructuring.rs:154 — crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_rest_destructuring.rs:154-186 | crates/biome_yaml_analyze/src/lint/suspicious/no_empty_source.rs:128-156 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×10
  • Duplicated block (25 lines × 2) crates/biome_css_formatter/src/scss/pseudo/interpolated_pseudo_class_function.rs:18 — crates/biome_css_formatter/src/scss/pseudo/interpolated_pseudo_class_function.rs:18-42 | crates/biome_css_formatter/src/scss/pseudo/interpolated_pseudo_element_function.rs:18-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/pseudo/interpolated_pseudo_class_function.rs:18` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&ScssInterpolatedPseudoClassFunction` in one and `&ScssInterpolatedPseudoElementFunction` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (25 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:170 — crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:170-194 | crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:165-189 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs` and `crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:170` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:164` calls `syntax`, `parent`, `and_then` and `crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:169` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (25 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:203 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:203-227 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:202-226 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs` and `crates/biome_js_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (25 lines × 2) crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:106 — crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:106-130 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:106-130 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs` and `crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (25 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:233 — crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:233-257 | crates/biome_js_analyze/src/utils/indexed_collection.rs:33-57 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs` and `crates/biome_js_analyze/src/utils/indexed_collection.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) crates/biome_js_control_flow/src/nodes/break_stmt.rs:55 — crates/biome_js_control_flow/src/nodes/break_stmt.rs:55-79 | crates/biome_js_control_flow/src/nodes/continue_stmt.rs:43-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_control_flow/src/nodes/break_stmt.rs:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) crates/biome_js_formatter/src/js/assignments/array_assignment_pattern.rs:13 — crates/biome_js_formatter/src/js/assignments/array_assignment_pattern.rs:13-37 | crates/biome_js_formatter/src/js/bindings/array_binding_pattern.rs:13-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/assignments/array_assignment_pattern.rs:13` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsArrayAssignmentPattern` in one and `&JsArrayBindingPattern` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_formatter/src/js/assignments/array_assignment_pattern.rs:39` calls `needs_parentheses` and `crates/biome_js_formatter/src/js/bindings/array_binding_pattern.rs:39` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (25 lines × 2) crates/biome_service/src/file_handlers/css.rs:920 — crates/biome_service/src/file_handlers/css.rs:920-944 | crates/biome_service/src/file_handlers/css.rs:980-1004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:920` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_service/src/file_handlers/css.rs:917` calls `syntax`, `text_range_with_trivia`, `into` and `crates/biome_service/src/file_handlers/css.rs:978` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (25 lines × 2) xtask/codegen/src/generate_migrate_eslint.rs:196 — xtask/codegen/src/generate_migrate_eslint.rs:196-220 | xtask/codegen/src/generate_migrate_stylelint.rs:205-229 — before extracting anything, compare `xtask/codegen/src/generate_migrate_eslint.rs` and `xtask/codegen/src/generate_migrate_stylelint.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `xtask/codegen/src/generate_migrate_eslint.rs:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) crates/biome_test_utils/src/lib.rs:178 — crates/biome_test_utils/src/lib.rs:178-202 | crates/biome_test_utils/src/lib.rs:228-252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_test_utils/src/lib.rs:178` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×10
  • Duplicated block (23 lines × 2) crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:14 — crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:14-36 | crates/biome_graphql_formatter/src/graphql/definitions/input_object_type_definition.rs:16-38 — before extracting anything, compare `crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs` and `crates/biome_graphql_formatter/src/graphql/definitions/input_object_type_definition.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:14` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlEnumTypeDefinition` in one and `&GraphqlInputObjectTypeDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (23 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:390 — crates/biome_grit_parser/src/lexer/mod.rs:390-412 | crates/biome_json_parser/src/lexer/mod.rs:434-456 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:390` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (23 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:505 — crates/biome_grit_parser/src/lexer/mod.rs:505-527 | crates/biome_json_parser/src/lexer/mod.rs:559-581 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:505` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (23 lines × 2) crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:137 — crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:137-159 | crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:176-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) crates/biome_js_formatter/src/js/lists/object_assignment_pattern_property_list.rs:23 — crates/biome_js_formatter/src/js/lists/object_assignment_pattern_property_list.rs:23-45 | crates/biome_js_formatter/src/js/lists/object_binding_pattern_property_list.rs:21-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/lists/object_assignment_pattern_property_list.rs:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsObjectAssignmentPatternPropertyList` in one and `&JsObjectBindingPatternPropertyList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (23 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:308 — crates/biome_js_type_info/src/format_inferred_type_info.rs:308-330 | crates/biome_js_type_info/src/format_type_info.rs:235-257 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:308` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (23 lines × 2) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:48 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:48-70 | crates/biome_markdown_formatter/src/quote.rs:107-129 — before extracting anything, compare `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs` and `crates/biome_markdown_formatter/src/quote.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_markdown_formatter/src/quote.rs:130` calls `should_format_quote_paragraph`, `entry` and `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:71` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (23 lines × 2) crates/biome_service/src/file_handlers/svelte.rs:185 — crates/biome_service/src/file_handlers/svelte.rs:185-207 | crates/biome_service/src/file_handlers/vue.rs:176-198 — before extracting anything, compare `crates/biome_service/src/file_handlers/svelte.rs` and `crates/biome_service/src/file_handlers/vue.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:447 — crates/biome_syntax_codegen/src/generate_nodes.rs:447-469 | xtask/codegen/src/generate_nodes.rs:479-501 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:447` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_tailwind_arbitrary_value.rs:120 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_arbitrary_value.rs:120-142 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_arbitrary_value.rs:119-141 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D1 · Cyclomatic Complexity · HtmlLexer · ×9
  • HtmlLexer::consume_identifier (cyclomatic 42) crates/biome_html_parser/src/lexer/mod.rs:1119 — HtmlLexer::consume_identifier has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • HtmlLexer::consume_token_inside_tag_angular (cyclomatic 28) crates/biome_html_parser/src/lexer/mod.rs:235 — HtmlLexer::consume_token_inside_tag_angular has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • HtmlLexer::next_token (cyclomatic 27) crates/biome_html_parser/src/lexer/mod.rs:1804 — HtmlLexer::next_token has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • HtmlLexer::consume_token_inside_tag_directives (cyclomatic 26) crates/biome_html_parser/src/lexer/mod.rs:305 — HtmlLexer::consume_token_inside_tag_directives has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: HtmlLexer::consume_language_identifier (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • HtmlLexer::consume_html_text (cyclomatic 24) crates/biome_html_parser/src/lexer/mod.rs:1677 — HtmlLexer::consume_html_text has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: HtmlLexer::consume_language_identifier (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • HtmlLexer::consume_token_inside_tag_astro (cyclomatic 23) crates/biome_html_parser/src/lexer/mod.rs:177 — HtmlLexer::consume_token_inside_tag_astro has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: HtmlLexer::consume_language_identifier (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • HtmlLexer::consume_token_inside_tag (cyclomatic 21) crates/biome_html_parser/src/lexer/mod.rs:118 — HtmlLexer::consume_token_inside_tag has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: HtmlLexer::consume_language_identifier (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • HtmlLexer::consume_restricted_single_text_expression (cyclomatic 21) crates/biome_html_parser/src/lexer/mod.rs:780 — HtmlLexer::consume_restricted_single_text_expression has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: HtmlLexer::consume_language_identifier (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • HtmlLexer::consume_token (cyclomatic 16) crates/biome_html_parser/src/lexer/mod.rs:484 — HtmlLexer::consume_token has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: HtmlLexer::consume_language_identifier (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · biome_vue_semantic · ×9
  • biome_vue_semantic::semantic_model::snippets::expression_shape (cyclomatic 32) crates/biome_vue_semantic/src/semantic_model/snippets.rs:220 — biome_vue_semantic::semantic_model::snippets::expression_shape has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_vue_semantic::semantic_model::references::usage_of (cyclomatic 30) crates/biome_vue_semantic/src/semantic_model/references.rs:243 — biome_vue_semantic::semantic_model::references::usage_of has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_vue_semantic::semantic_model::sfc_model (cyclomatic 28) crates/biome_vue_semantic/src/semantic_model/mod.rs:70 — biome_vue_semantic::semantic_model::sfc_model has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_vue_semantic::format_semantic_model::write_symbol (cyclomatic 23) crates/biome_vue_semantic/src/format_semantic_model.rs:58 — biome_vue_semantic::format_semantic_model::write_symbol has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_vue_semantic::semantic_model::snippets::class_entries_of (cyclomatic 23) crates/biome_vue_semantic/src/semantic_model/snippets.rs:453 — biome_vue_semantic::semantic_model::snippets::class_entries_of has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_vue_semantic::semantic_model::references::collect_template_references (cyclomatic 22) crates/biome_vue_semantic/src/semantic_model/references.rs:821 — biome_vue_semantic::semantic_model::references::collect_template_references has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • biome_vue_semantic::semantic_model::references::collect_markup_references (cyclomatic 19) crates/biome_vue_semantic/src/semantic_model/references.rs:1249 — biome_vue_semantic::semantic_model::references::collect_markup_references has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_vue_semantic::semantic_model::component::type_set_of (cyclomatic 17) crates/biome_vue_semantic/src/semantic_model/component.rs:2600 — biome_vue_semantic::semantic_model::component::type_set_of has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_vue_semantic::semantic_model::references::collect_script_references (cyclomatic 16) crates/biome_vue_semantic/src/semantic_model/references.rs:1005 — biome_vue_semantic::semantic_model::references::collect_script_references has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_js_formatter · ×9
  • biome_js_formatter::comments::handle_class_comment (cyclomatic 20) crates/biome_js_formatter/src/comments.rs:505 — biome_js_formatter::comments::handle_class_comment has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_formatter::comments::handle_if_statement_comment (cyclomatic 18) crates/biome_js_formatter/src/comments.rs:865 — biome_js_formatter::comments::handle_if_statement_comment has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_formatter::js::bindings::parameters::should_hug_function_parameters (cyclomatic 18) crates/biome_js_formatter/src/js/bindings/parameters.rs:213 — biome_js_formatter::js::bindings::parameters::should_hug_function_parameters has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_formatter::js::classes::property_class_member::needs_semicolon (cyclomatic 18) crates/biome_js_formatter/src/js/classes/property_class_member.rs:94 — biome_js_formatter::js::classes::property_class_member::needs_semicolon has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • biome_js_formatter::js::expressions::call_arguments::is_relatively_short_argument (cyclomatic 18) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:1109 — biome_js_formatter::js::expressions::call_arguments::is_relatively_short_argument has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_formatter::js::expressions::call_arguments::can_group_expression_argument (cyclomatic 18) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:1178 — biome_js_formatter::js::expressions::call_arguments::can_group_expression_argument has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_formatter::js::expressions::call_arguments::write_grouped_arguments (cyclomatic 17) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:353 — biome_js_formatter::js::expressions::call_arguments::write_grouped_arguments has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_js_formatter::utils::assignment_like::is_poorly_breakable_member_or_call_chain (cyclomatic 17) crates/biome_js_formatter/src/utils/assignment_like.rs:1178 — biome_js_formatter::utils::assignment_like::is_poorly_breakable_member_or_call_chain has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_formatter::utils::assignment_like::should_break_after_operator (cyclomatic 16) crates/biome_js_formatter/src/utils/assignment_like.rs:985 — biome_js_formatter::utils::assignment_like::should_break_after_operator has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · biome_tailwind_logic · ×9
  • biome_tailwind_logic::use_tailwind_shorthand_classes::analyze_tailwind_shorthand (cognitive 49) crates/biome_tailwind_logic/src/use_tailwind_shorthand_classes.rs:239 — biome_tailwind_logic::use_tailwind_shorthand_classes::analyze_tailwind_shorthand has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 6 (16 pts), boolean chains 4, match/switch 1 (nesting depth added 27). Of this number, 48 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_tailwind_logic::syntax_service::inspect_string_literal (cognitive 48) crates/biome_tailwind_logic/src/syntax_service.rs:560 — biome_tailwind_logic::syntax_service::inspect_string_literal has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (36 pts), boolean chains 6, match/switch 2 (5 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_tailwind_logic::class_category::utility_category (cognitive 43) crates/biome_tailwind_logic/src/class_category.rs:431 — biome_tailwind_logic::class_category::utility_category has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 12 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_tailwind_logic::syntax_service::is_class_configuration_value (cognitive 31) crates/biome_tailwind_logic/src/syntax_service.rs:459 — biome_tailwind_logic::syntax_service::is_class_configuration_value has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_tailwind_logic::use_tailwind_shorthand_classes::apply_auto_fix (cognitive 29) crates/biome_tailwind_logic/src/use_tailwind_shorthand_classes.rs:458 — biome_tailwind_logic::use_tailwind_shorthand_classes::apply_auto_fix has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 1 (3 pts), loops 2, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_tailwind_logic::use_tailwind_sorted_classes::sort_v4::resolve_named_branch (cognitive 25) crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4.rs:992 — biome_tailwind_logic::use_tailwind_sorted_classes::sort_v4::resolve_named_branch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_tailwind_logic::use_tailwind_sorted_classes::sort_v4::compile_custom_functional (cognitive 22) crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4.rs:704 — biome_tailwind_logic::use_tailwind_sorted_classes::sort_v4::compile_custom_functional has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_tailwind_logic::no_tailwind_restricted_classes::restricted_classes (cognitive 18) crates/biome_tailwind_logic/src/no_tailwind_restricted_classes.rs:131 — biome_tailwind_logic::no_tailwind_restricted_classes::restricted_classes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_tailwind_logic::use_tailwind_sorted_classes::sort_v4_variants::variant_key_from_segments (cognitive 17) crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4_variants.rs:300 — biome_tailwind_logic::use_tailwind_sorted_classes::sort_v4_variants::variant_key_from_segments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (7 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×9
  • Edited copy of a member (27 corresponding lines) crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:161 — crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:161-192 | crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:239-270 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_html.rs:63 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_html.rs:63-89 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_text.rs:63-90 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:27 — crates/biome_html_parser/src/syntax/svelte.rs:27-53 | crates/biome_html_parser/src/syntax/svelte.rs:876-902 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:1454 — crates/biome_markdown_parser/src/syntax/list.rs:1454-1480 | crates/biome_markdown_parser/src/syntax/quote.rs:749-780 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_global_regex_in_match_all.rs:79 — crates/biome_js_analyze/src/lint/nursery/use_global_regex_in_match_all.rs:79-109 | crates/biome_js_analyze/src/lint/nursery/use_global_regex_in_replace_all.rs:82-108 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:693 — crates/biome_html_parser/src/syntax/svelte.rs:693-719 | crates/biome_html_parser/src/syntax/svelte.rs:725-751 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/biome_js_type_info/src/builders.rs:129 — crates/biome_js_type_info/src/builders.rs:129-157 | crates/biome_js_type_info/src/builders.rs:634-660 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/biome_js_analyze/src/lint/style/use_grouped_accessor_pairs.rs:199 — crates/biome_js_analyze/src/lint/style/use_grouped_accessor_pairs.rs:199-227 | crates/biome_js_analyze/src/lint/style/use_grouped_accessor_pairs.rs:279-305 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/biome_markdown_parser/src/syntax/fenced_code_block.rs:557 — crates/biome_markdown_parser/src/syntax/fenced_code_block.rs:557-583 | crates/biome_markdown_parser/src/syntax/mod.rs:669-697 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×9
  • Duplicated block (20 lines × 2) crates/biome_cli/src/commands/check.rs:297 — crates/biome_cli/src/commands/check.rs:297-316 | crates/biome_cli/src/commands/ci.rs:218-237 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/commands/check.rs:297` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) crates/biome_graphql_formatter/src/graphql/lists/argument_definition_list.rs:14 — crates/biome_graphql_formatter/src/graphql/lists/argument_definition_list.rs:14-33 | crates/biome_graphql_formatter/src/graphql/lists/argument_list.rs:10-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlArgumentDefinitionList` in one and `&GraphqlArgumentList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (20 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:415 — crates/biome_grit_parser/src/lexer/mod.rs:415-434 | crates/biome_json_parser/src/lexer/mod.rs:459-478 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:415` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:453 — crates/biome_grit_parser/src/lexer/mod.rs:453-472 | crates/biome_json_parser/src/lexer/mod.rs:504-523 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:453` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) crates/biome_html_analyze/src/lib.rs:308 — crates/biome_html_analyze/src/lib.rs:308-327 | crates/biome_markdown_analyze/src/lib.rs:184-203 — before extracting anything, compare `crates/biome_html_analyze/src/lib.rs` and `crates/biome_markdown_analyze/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lib.rs:308` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:60 — crates/biome_html_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:60-79 | crates/biome_js_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:61-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_unsafe_iframe_sandbox.rs:60` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_nodejs_modules.rs:58 — crates/biome_js_analyze/src/lint/correctness/no_nodejs_modules.rs:58-77 | crates/biome_js_analyze/src/lint/nursery/no_bun_modules.rs:54-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) crates/biome_js_formatter/src/ts/classes/getter_signature_class_member.rs:18 — crates/biome_js_formatter/src/ts/classes/getter_signature_class_member.rs:18-37 | crates/biome_js_formatter/src/ts/classes/setter_signature_class_member.rs:18-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/ts/classes/getter_signature_class_member.rs:18` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&TsGetterSignatureClassMember` in one and `&TsSetterSignatureClassMember` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_formatter/src/ts/classes/setter_signature_class_member.rs:38` calls `format` and `crates/biome_js_formatter/src/ts/classes/getter_signature_class_member.rs:38` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (20 lines × 2) crates/biome_module_graph/src/db/queries.rs:50 — crates/biome_module_graph/src/db/queries.rs:50-69 | crates/biome_module_graph/src/db/queries.rs:149-168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/queries.rs:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×9
  • Duplicated block (12–13 lines × 2) crates/biome_cli/src/runner/impls/process_file/format.rs:78 — crates/biome_cli/src/runner/impls/process_file/format.rs:78-89 | crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:104-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/runner/impls/process_file/format.rs:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:102` calls `Some`, `clone` and `crates/biome_cli/src/runner/impls/process_file/format.rs:77` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12–13 lines × 2) crates/biome_configuration_macros/src/group_struct.rs:222 — crates/biome_configuration_macros/src/group_struct.rs:222-233 | crates/biome_configuration_macros/src/group_struct.rs:327-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration_macros/src/group_struct.rs:222` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12–13 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:287 — crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:287-299 | crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:330-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:287` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:260 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:260-271 | crates/biome_service/src/file_handlers/html/go_to.rs:44-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:260` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs:531 — crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs:531-543 | crates/biome_js_analyze/src/lint/style/use_fragment_syntax.rs:53-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12–13 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_undeclared_env_vars.rs:174 — crates/biome_js_analyze/src/lint/suspicious/no_undeclared_env_vars.rs:174-185 | crates/biome_js_analyze/src/lint/suspicious/no_undeclared_env_vars.rs:199-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) crates/biome_json_analyze/src/lib.rs:160 — crates/biome_json_analyze/src/lib.rs:160-171 | crates/biome_markdown_analyze/src/lib.rs:162-174 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_analyze/src/lib.rs:160` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_markdown_analyze/src/lib.rs:176` calls `insert_service` and `crates/biome_json_analyze/src/lib.rs:173` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12–13 lines × 2) crates/biome_resolver/src/lib.rs:234 — crates/biome_resolver/src/lib.rs:234-245 | crates/biome_resolver/src/lib.rs:289-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_resolver/src/lib.rs:234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) crates/biome_service/src/file_handlers/html.rs:655 — crates/biome_service/src/file_handlers/html.rs:655-667 | crates/biome_service/src/file_handlers/javascript.rs:661-672 — before extracting anything, compare `crates/biome_service/src/file_handlers/html.rs` and `crates/biome_service/src/file_handlers/javascript.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/html.rs:655` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×9
  • Duplicated block (11–12 lines × 2) crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:41 — crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:41-52 | crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:180-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:39` calls `build`, `analyzer_selectors` and `crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:179` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11–12 lines × 2) crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:108 — crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:108-118 | crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:155-166 — before extracting anything, compare `crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs` and `crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) crates/biome_css_parser/src/syntax/at_rule/page.rs:225 — crates/biome_css_parser/src/syntax/at_rule/page.rs:225-235 | crates/biome_css_parser/src/syntax/block/declaration_or_at_rule_list_block.rs:67-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_parser/src/syntax/at_rule/page.rs:225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) crates/biome_js_transform/src/lib.rs:103 — crates/biome_js_transform/src/lib.rs:103-114 | crates/biome_migrate/src/lib.rs:101-111 — before extracting anything, compare `crates/biome_js_transform/src/lib.rs` and `crates/biome_migrate/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_transform/src/lib.rs:116` calls `insert_service` and `crates/biome_migrate/src/lib.rs:113` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11–12 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:3456 — crates/biome_markdown_parser/src/syntax/list.rs:3456-3467 | crates/biome_markdown_parser/src/syntax/mod.rs:349-359 — before extracting anything, compare `crates/biome_markdown_parser/src/syntax/list.rs` and `crates/biome_markdown_parser/src/syntax/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/syntax/list.rs:3456` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1720 — crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1720-1731 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1158-1168 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11–12 lines × 2) crates/biome_service/src/configuration.rs:1700 — crates/biome_service/src/configuration.rs:1700-1711 | crates/biome_service/src/configuration.rs:1721-1731 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/configuration.rs:1700` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) crates/biome_service/src/workspace/server.rs:3836 — crates/biome_service/src/workspace/server.rs:3836-3846 | crates/biome_service/src/workspace/server.rs:3959-3970 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/workspace/server.rs:3836` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `params` to `PullDiagnosticsAndActionsParams` in one and `PullActionsParams` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11–12 lines × 2) crates/biome_tailwind_logic/src/use_tailwind_shorthand_classes.rs:487 — crates/biome_tailwind_logic/src/use_tailwind_shorthand_classes.rs:487-497 | crates/biome_tailwind_logic/src/use_tailwind_shorthand_classes.rs:529-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_tailwind_logic/src/use_tailwind_shorthand_classes.rs:529` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×9
  • Duplicated block (10–12 lines × 2) crates/biome_css_formatter/src/css/lists/attr_name_list.rs:45 — crates/biome_css_formatter/src/css/lists/attr_name_list.rs:45-56 | crates/biome_css_formatter/src/css/lists/syntax_component_list.rs:39-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/lists/attr_name_list.rs:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–12 lines × 2) crates/biome_formatter/src/comments.rs:790 — crates/biome_formatter/src/comments.rs:790-799 | crates/biome_markdown_formatter/src/comments.rs:46-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_formatter/src/comments.rs:790` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–12 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_svelte_unnecessary_state_wrap.rs:162 — crates/biome_js_analyze/src/lint/nursery/no_svelte_unnecessary_state_wrap.rs:162-173 | crates/biome_js_analyze/src/lint/nursery/no_svelte_useless_derived_by.rs:114-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_svelte_unnecessary_state_wrap.rs:162` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–12 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:728 — crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:728-737 | crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:789-800 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:728` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10–12 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_evolving_types.rs:72 — crates/biome_js_analyze/src/lint/suspicious/no_evolving_types.rs:72-83 | crates/biome_js_analyze/src/lint/suspicious/no_implicit_any_let.rs:59-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_evolving_types.rs:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10–12 lines × 2) crates/biome_markdown_parser/src/to_html.rs:1648 — crates/biome_markdown_parser/src/to_html.rs:1648-1659 | crates/biome_markdown_parser/src/to_html.rs:2088-2097 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–12 lines × 2) crates/biome_parser/src/token_set.rs:15 — crates/biome_parser/src/token_set.rs:15-24 | crates/biome_rowan/src/ast/mod.rs:74-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10–12 lines × 2) crates/biome_service/src/file_handlers/css.rs:953 — crates/biome_service/src/file_handlers/css.rs:953-964 | crates/biome_service/src/file_handlers/css.rs:1018-1027 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:953` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–12 lines × 2) crates/biome_service/src/file_handlers/javascript.rs:1636 — crates/biome_service/src/file_handlers/javascript.rs:1636-1647 | crates/biome_service/src/file_handlers/javascript.rs:1687-1696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/javascript.rs:1636` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · biome_service · ×8
  • biome_service::file_handlers::html::parse_embedded_nodes::parse_embedded_nodes (cyclomatic 87) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:29 — biome_service::file_handlers::html::parse_embedded_nodes::parse_embedded_nodes has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_service::file_handlers::html::parse_embedded_nodes::parse_svelte_blocks (cyclomatic 41) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:504 — biome_service::file_handlers::html::parse_embedded_nodes::parse_svelte_blocks has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_service::file_handlers::html::parse_embedded_nodes::parse_matched_embed (cyclomatic 32) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:1208 — biome_service::file_handlers::html::parse_embedded_nodes::parse_matched_embed has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_service::file_handlers::html::format_embedded (cyclomatic 20) crates/biome_service/src/file_handlers/html.rs:803 — biome_service::file_handlers::html::format_embedded has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_service::workspace_types::instance_type (cyclomatic 18) crates/biome_service/src/workspace_types.rs:95 — biome_service::workspace_types::instance_type has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_service::file_handlers::javascript::go_to::resolve_binding (cyclomatic 17) crates/biome_service/src/file_handlers/javascript/go_to.rs:26 — biome_service::file_handlers::javascript::go_to::resolve_binding has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_service::workspace_types::generate_type (cyclomatic 17) crates/biome_service/src/workspace_types.rs:572 — biome_service::workspace_types::generate_type has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_service::file_handlers::html::go_to::resolve_binding_html (cyclomatic 16) crates/biome_service/src/file_handlers/html/go_to.rs:25 — biome_service::file_handlers::html::go_to::resolve_binding_html has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xtask_codegen · ×8
  • xtask_codegen::formatter::get_node_concept (cyclomatic 54) xtask/codegen/src/formatter.rs:740 — xtask_codegen::formatter::get_node_concept has cyclomatic complexity 54 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • xtask_codegen::generate_nodes::generate_nodes (cyclomatic 38) xtask/codegen/src/generate_nodes.rs:9 — xtask_codegen::generate_nodes::generate_nodes has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • xtask_codegen::generate_new_analyzer_rule::generate_new_analyzer_rule (cyclomatic 25) xtask/codegen/src/generate_new_analyzer_rule.rs:728 — xtask_codegen::generate_new_analyzer_rule::generate_new_analyzer_rule has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • xtask_codegen::generate_global_types::lower::overrides::lower_promise_globals (cyclomatic 23) xtask/codegen/src/generate_global_types/lower/overrides.rs:316 — xtask_codegen::generate_global_types::lower::overrides::lower_promise_globals has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • xtask_codegen::generate_schema::rename_references_in_object (cyclomatic 20) xtask/codegen/src/generate_schema.rs:129 — xtask_codegen::generate_schema::rename_references_in_object has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • xtask_codegen::generate_global_types::lower::overrides::lower_error_constructor_signatures (cyclomatic 17) xtask/codegen/src/generate_global_types/lower/overrides.rs:1223 — xtask_codegen::generate_global_types::lower::overrides::lower_error_constructor_signatures has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • xtask_codegen::ast::handle_rule (cyclomatic 16) xtask/codegen/src/ast.rs:363 — xtask_codegen::ast::handle_rule has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • xtask_codegen::generate_global_types::compare::assert_promise_shape (cyclomatic 16) xtask/codegen/src/generate_global_types/compare.rs:191 — xtask_codegen::generate_global_types::compare::assert_promise_shape has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D17 · Explicit Debt · HackComment · ×8
  • HackComment xtask/codegen/src/language_kind.rs:98 — // HACK: workaround for $kind$out adding an extra space between the two — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/biome_text_size/src/range.rs:162 — // HACK for const fn: math on primitives only — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/biome_text_size/src/range.rs:171 — // HACK for const fn: math on primitives only — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4_variants.rs:520 — // HACK: The grammar splits a dashed bare value on every `-`, so — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/biome_parser/src/marker.rs:108 — // Hack for parsing completed markers which have been preceded — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/biome_package/src/node_semver/range.rs:698 — // HACK: Interpret `~>` as `~` — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/biome_js_analyze/src/react/hooks.rs:139 — // HACK: Jest/Vitest have some functions that start with `use` and are not hooks — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/biome_js_analyze/src/lint/style/use_consistent_curly_braces.rs:166 — // HACK: removes the trailing whitespace from the expression — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · biome_js_type_info · ×8
  • biome_js_type_info::return_type_relation::is_only_property_literal_widening (cognitive 101) crates/biome_js_type_info/src/return_type_relation.rs:129 — biome_js_type_info::return_type_relation::is_only_property_literal_widening has cognitive complexity 101 (threshold 15). Drivers by points: if/else 19 (65 pts), match/switch 5 (21 pts), loops 5 (14 pts), boolean chains 1 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_type_info::return_type_relation::is_nonunion_wider (cognitive 34) crates/biome_js_type_info/src/return_type_relation.rs:278 — biome_js_type_info::return_type_relation::is_nonunion_wider has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_type_info::return_type_relation::compare_declared_return_type_owned (cognitive 25) crates/biome_js_type_info/src/return_type_relation.rs:872 — biome_js_type_info::return_type_relation::compare_declared_return_type_owned has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 7 (8 pts), boolean chains 3 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_type_info::type_operations::mapped_type (cognitive 24) crates/biome_js_type_info/src/type_operations.rs:175 — biome_js_type_info::type_operations::mapped_type has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 3 (5 pts), loops 2 (4 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_type_info::type_operations::indexed_access (cognitive 24) crates/biome_js_type_info/src/type_operations.rs:335 — biome_js_type_info::type_operations::indexed_access has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_type_info::narrowing::narrow_type (cognitive 20) crates/biome_js_type_info/src/narrowing.rs:184 — biome_js_type_info::narrowing::narrow_type has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_type_info::type_operations::keyof (cognitive 20) crates/biome_js_type_info/src/type_operations.rs:73 — biome_js_type_info::type_operations::keyof has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_type_info::narrowing::narrow_non_union (cognitive 17) crates/biome_js_type_info/src/narrowing.rs:251 — biome_js_type_info::narrowing::narrow_non_union has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_diagnostics · ×8
  • biome_diagnostics::display::frame::print_frame (cognitive 81) crates/biome_diagnostics/src/display/frame.rs:36 — biome_diagnostics::display::frame::print_frame has cognitive complexity 81 (threshold 15). Drivers by points: if/else 21 (38 pts), loops 9 (25 pts), match/switch 8 (13 pts), boolean chains 5 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_diagnostics::display::diff::print_full_diff (cognitive 40) crates/biome_diagnostics/src/display/diff.rs:482 — biome_diagnostics::display::diff::print_full_diff has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 3 (9 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_diagnostics::display::frame::print_invisibles (cognitive 31) crates/biome_diagnostics/src/display/frame.rs:489 — biome_diagnostics::display::frame::print_invisibles has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 7, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_diagnostics::display::backtrace::print_backtrace (cognitive 30) crates/biome_diagnostics/src/display/backtrace.rs:240 — biome_diagnostics::display::backtrace::print_backtrace has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_diagnostics::display::diff::process_diff_ops (cognitive 18) crates/biome_diagnostics/src/display/diff.rs:109 — biome_diagnostics::display::diff::process_diff_ops has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_diagnostics::display::diff::print_short_diff (cognitive 18) crates/biome_diagnostics/src/display/diff.rs:392 — biome_diagnostics::display::diff::print_short_diff has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 4 (6 pts), match/switch 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_diagnostics::display::print_file_location (cognitive 17) crates/biome_diagnostics/src/display.rs:114 — biome_diagnostics::display::print_file_location has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_diagnostics::display::diff::process_diff_lines (cognitive 17) crates/biome_diagnostics/src/display/diff.rs:267 — biome_diagnostics::display::diff::process_diff_lines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkspaceServerWithDb · ×8
  • WorkspaceServerWithDb::open_file_internal (cognitive 48) crates/biome_service/src/workspace/server.rs:833 — WorkspaceServerWithDb::open_file_internal has cognitive complexity 48 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 12, match/switch 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WorkspaceServerWithDb::update_settings (cognitive 41) crates/biome_service/src/workspace/server.rs:2985 — WorkspaceServerWithDb::update_settings has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (34 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WorkspaceServerWithDb::is_ignored_by_scanner (cognitive 32) crates/biome_service/src/workspace/server.rs:1829 — WorkspaceServerWithDb::is_ignored_by_scanner has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 5 (8 pts), boolean chains 6 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WorkspaceServerWithDb::fix_file_state (cognitive 29) crates/biome_service/src/workspace/server.rs:1377 — WorkspaceServerWithDb::fix_file_state has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WorkspaceServerWithDb::resolve_binding_in_document_or_snippets (cognitive 21) crates/biome_service/src/workspace/server.rs:1097 — WorkspaceServerWithDb::resolve_binding_in_document_or_snippets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WorkspaceServerWithDb::process_file (cognitive 19) crates/biome_service/src/workspace/server.rs:3591 — WorkspaceServerWithDb::process_file has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • WorkspaceServerWithDb::go_to_definition (cognitive 18) crates/biome_service/src/workspace/server.rs:4353 — WorkspaceServerWithDb::go_to_definition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WorkspaceServerWithDb::change_file (cognitive 17) crates/biome_service/src/workspace/server.rs:3454 — WorkspaceServerWithDb::change_file has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×8
  • Edited copy of a member (32 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:600 — crates/biome_js_type_info/src/format_inferred_type_info.rs:600-642 | crates/biome_js_type_info/src/format_type_info.rs:903-934 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:172 — crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:172-203 | crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs:170-215 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_js_restricted_properties.rs:310 — crates/biome_js_analyze/src/lint/nursery/no_js_restricted_properties.rs:310-345 | crates/biome_js_analyze/src/lint/nursery/no_js_restricted_properties.rs:358-389 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/biome_html_parser/src/syntax/astro.rs:66 — crates/biome_html_parser/src/syntax/astro.rs:66-106 | crates/biome_html_parser/src/syntax/svelte.rs:379-410 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_document_import_in_page.rs:52 — crates/biome_js_analyze/src/lint/suspicious/no_document_import_in_page.rs:52-83 | crates/biome_js_analyze/src/lint/suspicious/no_head_import_in_document.rs:65-103 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/biome_analyze/src/diagnostics.rs:457 — crates/biome_analyze/src/diagnostics.rs:457-488 | crates/biome_analyze/src/diagnostics.rs:492-523 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_invalid_this.rs:164 — crates/biome_js_analyze/src/lint/nursery/no_invalid_this.rs:164-195 | crates/biome_js_analyze/src/lint/nursery/no_path_concat.rs:137-168 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_key_with_click_events.rs:72 — crates/biome_html_analyze/src/lint/a11y/use_key_with_click_events.rs:72-109 | crates/biome_js_analyze/src/lint/a11y/use_key_with_click_events.rs:69-100 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×8
  • Edited copy of a member (30 corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:139 — crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:139-168 | crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs:147-176 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:60 — crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/dependencies_meta.rs:60-89 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:27-56 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:156 — crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:156-192 | crates/biome_js_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:146-175 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:116 — crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:116-154 | crates/biome_js_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:115-144 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/eslint_config.rs:65 — crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/eslint_config.rs:65-96 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:213-242 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/biome_parser/src/parse_lists.rs:152 — crates/biome_parser/src/parse_lists.rs:152-186 | crates/biome_tailwind_parser/src/syntax/variant.rs:50-79 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/biome_languages/src/javascript.rs:794 — crates/biome_languages/src/javascript.rs:794-823 | crates/biome_languages/src/lib.rs:306-339 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) crates/biome_graphql_formatter/src/graphql/definitions/directive_definition.rs:14 — crates/biome_graphql_formatter/src/graphql/definitions/directive_definition.rs:14-51 | crates/biome_graphql_formatter/src/graphql/definitions/fragment_definition.rs:12-41 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×8
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/biome_languages/src/lib.rs:458 — crates/biome_languages/src/lib.rs:458-479 | crates/biome_languages/src/lib.rs:487-508 | crates/biome_languages/src/lib.rs:517-537 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/biome_js_syntax/src/expr_ext.rs:1901 — crates/biome_js_syntax/src/expr_ext.rs:1901-1922 | crates/biome_js_syntax/src/expr_ext.rs:1953-1973 | crates/biome_js_syntax/src/expr_ext.rs:2030-2056 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/biome_cli/src/reporter/json.rs:85 — crates/biome_cli/src/reporter/json.rs:85-105 | crates/biome_cli/src/reporter/json.rs:107-134 | crates/biome_cli/src/reporter/json.rs:136-163 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/biome_configuration_macros/src/lib.rs:40 — crates/biome_configuration_macros/src/lib.rs:40-66 | crates/biome_configuration_macros/src/lib.rs:89-115 | crates/biome_service/src/documentation/mod.rs:59-79 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/biome_html_parser/src/syntax/mod.rs:396 — crates/biome_html_parser/src/syntax/mod.rs:396-418 | crates/biome_parser/src/parse_recovery.rs:85-105 | crates/biome_parser/src/parse_recovery.rs:132-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:407 — crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:407-434 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:632-652 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:676-698 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/biome_css_formatter/src/css/pseudo/pseudo_class_nth.rs:8 — crates/biome_css_formatter/src/css/pseudo/pseudo_class_nth.rs:8-30 | crates/biome_html_formatter/src/svelte/value/directive_value.rs:17-37 | crates/biome_markdown_formatter/src/markdown/auxiliary/reference_image.rs:7-31 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) crates/biome_js_formatter/src/ts/auxiliary/getter_signature_type_member.rs:15 — crates/biome_js_formatter/src/ts/auxiliary/getter_signature_type_member.rs:15-37 | crates/biome_js_formatter/src/ts/auxiliary/property_signature_type_member.rs:15-35 | crates/biome_js_formatter/src/ts/auxiliary/setter_signature_type_member.rs:15-39 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×8
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:431 — crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:431-444 | crates/biome_js_analyze/src/lint/nursery/use_atomic_updates.rs:595-606 | crates/biome_js_syntax/src/expr_ext.rs:1422-1434 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/biome_js_analyze/src/services/semantic_class.rs:69 — crates/biome_js_analyze/src/services/semantic_class.rs:69-80 | crates/biome_js_analyze/src/services/turborepo.rs:68-81 | crates/biome_js_analyze/src/services/vue.rs:376-387 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:298 — crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:298-309 | crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:354-366 | crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:369-380 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/biome_rowan/src/cursor/node.rs:244 — crates/biome_rowan/src/cursor/node.rs:244-255 | crates/biome_rowan/src/cursor/node.rs:257-268 | crates/biome_rowan/src/cursor/node.rs:274-285 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/biome_js_parser/src/syntax/expr.rs:1034 — crates/biome_js_parser/src/syntax/expr.rs:1034-1052 | crates/biome_js_parser/src/syntax/jsx/mod.rs:799-810 | crates/biome_js_parser/src/syntax/object.rs:396-411 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/biome_css_formatter/src/context.rs:105 — crates/biome_css_formatter/src/context.rs:105-116 | crates/biome_graphql_formatter/src/context.rs:76-87 | crates/biome_grit_formatter/src/context.rs:73-84 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/keyframes_item.rs:8 — crates/biome_css_formatter/src/css/auxiliary/keyframes_item.rs:8-19 | crates/biome_css_formatter/src/css/auxiliary/nested_qualified_rule.rs:9-23 | crates/biome_css_formatter/src/css/auxiliary/qualified_rule.rs:9-23 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:101 — crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:101-112 | crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:209-220 | crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs:221-232 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×8
  • Duplicated block (22 lines × 2) crates/biome_css_analyze/src/fonts.rs:314 — crates/biome_css_analyze/src/fonts.rs:314-335 | crates/biome_css_syntax/src/property_syntax/matcher.rs:185-206 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22 lines × 2) crates/biome_html_parser/src/syntax/angular.rs:13 — crates/biome_html_parser/src/syntax/angular.rs:13-34 | crates/biome_html_parser/src/syntax/angular.rs:57-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_confusing_array_splice.rs:315 — crates/biome_js_analyze/src/lint/nursery/no_confusing_array_splice.rs:315-336 | crates/biome_js_analyze/src/lint/nursery/no_useless_splice.rs:442-463 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22 lines × 2) crates/biome_project_layout/src/project_layout.rs:181 — crates/biome_project_layout/src/project_layout.rs:181-202 | crates/biome_project_layout/src/project_layout.rs:219-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_project_layout/src/project_layout.rs:181` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_project_layout/src/project_layout.rs:217` calls `default`, `Some`, `clone` and `crates/biome_project_layout/src/project_layout.rs:180` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (22 lines × 2) crates/biome_service/src/workspace_types.rs:123 — crates/biome_service/src/workspace_types.rs:123-144 | crates/biome_service/src/workspace_types.rs:645-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) crates/biome_css_parser/src/lexer/scan_cursor.rs:637 — crates/biome_css_parser/src/lexer/scan_cursor.rs:637-658 | crates/biome_css_parser/src/lexer/scan_cursor.rs:688-709 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) crates/biome_test_utils/src/lib.rs:320 — crates/biome_test_utils/src/lib.rs:320-341 | crates/biome_test_utils/src/lib.rs:367-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_test_utils/src/lib.rs:320` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) crates/biome_js_analyze/src/lint/style/use_test_hooks_in_order.rs:107 — crates/biome_js_analyze/src/lint/style/use_test_hooks_in_order.rs:107-128 | crates/biome_js_analyze/src/lint/style/use_test_hooks_on_top.rs:66-87 — before extracting anything, compare `crates/biome_js_analyze/src/lint/style/use_test_hooks_in_order.rs` and `crates/biome_js_analyze/src/lint/style/use_test_hooks_on_top.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D1 · Cyclomatic Complexity · biome_module_graph · ×7
  • biome_module_graph::db::type_inference::promise_classification::classify_expression (cyclomatic 183) crates/biome_module_graph/src/db/type_inference/promise_classification.rs:177 — biome_module_graph::db::type_inference::promise_classification::classify_expression has cyclomatic complexity 183 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_module_graph::db::queries::type_inference::calls::implementation::infer_generic_return_type (cyclomatic 28) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1770 — biome_module_graph::db::queries::type_inference::calls::implementation::infer_generic_return_type has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_module_graph::db::type_inference::lookup::find_member_key_type_with_resolver (cyclomatic 26) crates/biome_module_graph/src/db/type_inference/lookup.rs:421 — biome_module_graph::db::type_inference::lookup::find_member_key_type_with_resolver has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_module_graph::js_module_info::flow::guards::comparison_step (cyclomatic 19) crates/biome_module_graph/src/js_module_info/flow/guards.rs:745 — biome_module_graph::js_module_info::flow::guards::comparison_step has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_module_graph::db::queries::find_js_exported_symbol (cyclomatic 18) crates/biome_module_graph/src/db/queries.rs:33 — biome_module_graph::db::queries::find_js_exported_symbol has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_module_graph::db::queries::type_inference::calls::implementation::matched_parameter_types (cyclomatic 18) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:775 — biome_module_graph::db::queries::type_inference::calls::implementation::matched_parameter_types has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_module_graph::db::queries::find_jsdoc_for_exported_symbol (cyclomatic 16) crates/biome_module_graph/src/db/queries.rs:124 — biome_module_graph::db::queries::find_jsdoc_for_exported_symbol has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResolutionCtx · ×7
  • ResolutionCtx::resolve_qualifier (cyclomatic 38) crates/biome_module_graph/src/db/type_inference/qualifiers.rs:80 — ResolutionCtx::resolve_qualifier has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ResolutionCtx::resolve_flow_expression (cyclomatic 37) crates/biome_module_graph/src/db/type_inference/flow_expressions.rs:30 — ResolutionCtx::resolve_flow_expression has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ResolutionCtx::resolve_typeof_expression (cyclomatic 34) crates/biome_module_graph/src/db/type_inference/expressions.rs:125 — ResolutionCtx::resolve_typeof_expression has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ResolutionCtx::resolve_static_member_expression (cyclomatic 20) crates/biome_module_graph/src/db/type_inference/expressions.rs:1646 — ResolutionCtx::resolve_static_member_expression has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ResolutionCtx::resolve_inferred_typeof_expression (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • ResolutionCtx::resolve_const_argument (cyclomatic 16) crates/biome_module_graph/src/db/type_inference/expressions.rs:625 — ResolutionCtx::resolve_const_argument has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ResolutionCtx::resolve_inferred_typeof_expression (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • ResolutionCtx::resolve_promise_value_type (cyclomatic 16) crates/biome_module_graph/src/db/type_inference/expressions.rs:1383 — ResolutionCtx::resolve_promise_value_type has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ResolutionCtx::resolve_inferred_typeof_expression (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • ResolutionCtx::rest_object_from_type (cyclomatic 16) crates/biome_module_graph/src/db/type_inference/expressions.rs:2523 — ResolutionCtx::rest_object_from_type has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ResolutionCtx::resolve_inferred_typeof_expression (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · biome_cli · ×7
  • biome_cli::execute::migrate::eslint_to_biome::migrate_eslint_rule (cognitive 188) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:767 — biome_cli::execute::migrate::eslint_to_biome::migrate_eslint_rule has cognitive complexity 188 (threshold 15). Drivers by points: if/else 61 (155 pts), boolean chains 19, match/switch 6 (14 pts) (nesting depth added 102). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_cli::execute::migrate::migrate_file (cognitive 87) crates/biome_cli/src/execute/migrate.rs:177 — biome_cli::execute::migrate::migrate_file has cognitive complexity 87 (threshold 15). Drivers by points: if/else 34 (71 pts), match/switch 4 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_cli::commands::inspect::plugins::inspect_plugins (cognitive 79) crates/biome_cli/src/commands/inspect/plugins/mod.rs:332 — biome_cli::commands::inspect::plugins::inspect_plugins has cognitive complexity 79 (threshold 15). Drivers by points: if/else 20 (47 pts), loops 8 (15 pts), match/switch 4 (14 pts), boolean chains 3 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_cli::runner::impls::finalizers::default::print_to_reporter (cognitive 37) crates/biome_cli/src/runner/impls/finalizers/default.rs:185 — biome_cli::runner::impls::finalizers::default::print_to_reporter has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22 (33 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_cli::execute::migrate::eslint::load_eslint_extends_config (cognitive 23) crates/biome_cli/src/execute/migrate/eslint.rs:241 — biome_cli::execute::migrate::eslint::load_eslint_extends_config has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_cli::service::read_task (cognitive 23) crates/biome_cli/src/service/mod.rs:249 — biome_cli::service::read_task has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4 (11 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_cli::service::unix::purge_old_sockets_in (cognitive 18) crates/biome_cli/src/service/unix.rs:98 — biome_cli::service::unix::purge_old_sockets_in has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticEventExtractor · ×7
  • SemanticEventExtractor::enter_identifier_binding (cognitive 72) crates/biome_js_semantic/src/events.rs:625 — SemanticEventExtractor::enter_identifier_binding has cognitive complexity 72 (threshold 15). Drivers by points: if/else 28 (68 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SemanticEventExtractor::enter (cognitive 51) crates/biome_css_semantic/src/events.rs:85 — SemanticEventExtractor::enter has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (28 pts), match/switch 6 (19 pts), loops 1 (4 pts) (nesting depth added 34). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • SemanticEventExtractor::enter_identifier_reference (cognitive 39) crates/biome_js_semantic/src/events.rs:899 — SemanticEventExtractor::enter_identifier_reference has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (30 pts), match/switch 4 (9 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SemanticEventExtractor::process_at_property (cognitive 30) crates/biome_css_semantic/src/events.rs:266 — SemanticEventExtractor::process_at_property has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (8 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SemanticEventExtractor::resolve_variables_references (cognitive 30) crates/biome_graphql_semantic/src/events.rs:387 — SemanticEventExtractor::resolve_variables_references has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 5 (12 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • SemanticEventExtractor::pop_scope (cognitive 28) crates/biome_js_semantic/src/events.rs:1201 — SemanticEventExtractor::pop_scope has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (9 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SemanticEventExtractor::resolve_references_in_scope (cognitive 23) crates/biome_js_semantic/src/events.rs:1279 — SemanticEventExtractor::resolve_references_in_scope has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyFunctions · ×7
  • TooManyFunctions: biome_js_parser::syntax::js_parse_error crates/biome_js_parser/src/syntax/js_parse_error.rs:10 — TooManyFunctions — 49 free functions. The bar is 30 free functions; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: biome_tailwind_parser::syntax::css_value crates/biome_tailwind_parser/src/syntax/css_value.rs:11 — TooManyFunctions — 39 free functions. The bar is 30 free functions; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: biome_tailwind_logic::use_tailwind_sorted_classes::arbitrary_value_match crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/arbitrary_value_match.rs:217 — TooManyFunctions — 35 free functions. The bar is 30 free functions; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: biome_css_parser::syntax::at_rule::feature crates/biome_css_parser/src/syntax/at_rule/feature.rs:34 — TooManyFunctions — 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: biome_css_parser::syntax::at_rule::container crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:45 — TooManyFunctions — 33 free functions. The bar is 30 free functions; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: biome_html_parser::syntax::parse_error crates/biome_html_parser/src/syntax/parse_error.rs:8 — TooManyFunctions — 33 free functions. The bar is 30 free functions; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: biome_css_parser::syntax::at_rule::media crates/biome_css_parser/src/syntax/at_rule/media.rs:27 — TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×7
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/biome_css_formatter/src/comments.rs:50 — crates/biome_css_formatter/src/comments.rs:50-84 | crates/biome_graphql_formatter/src/comments.rs:22-56 | crates/biome_grit_formatter/src/comments.rs:38-72 | crates/biome_js_formatter/src/comments.rs:37-72 | crates/biome_json_formatter/src/comments.rs:23-57 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/biome_css_formatter/src/css/auxiliary/container_style_query_in_parens.rs:12 — crates/biome_css_formatter/src/css/auxiliary/container_style_query_in_parens.rs:12-33 | crates/biome_css_formatter/src/css/auxiliary/if_function.rs:9-33 | crates/biome_css_formatter/src/css/auxiliary/import_named_layer.rs:8-29 | crates/biome_css_formatter/src/css/auxiliary/import_supports.rs:8-32 | crates/biome_css_formatter/src/scss/auxiliary/legacy_if_function.rs:9-33 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/biome_css_formatter/src/verbatim.rs:344 — crates/biome_css_formatter/src/verbatim.rs:344-359 | crates/biome_graphql_formatter/src/verbatim.rs:216-231 | crates/biome_grit_formatter/src/verbatim.rs:215-230 | crates/biome_js_formatter/src/verbatim.rs:224-239 | crates/biome_json_formatter/src/verbatim.rs:214-229 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/biome_deserialize_macros/src/deserializable_derive.rs:235 — crates/biome_deserialize_macros/src/deserializable_derive.rs:235-291 | crates/biome_deserialize_macros/src/deserializable_derive.rs:297-324 | crates/biome_deserialize_macros/src/deserializable_derive.rs:330-532 | crates/biome_deserialize_macros/src/deserializable_derive.rs:538-565 | crates/biome_deserialize_macros/src/deserializable_derive.rs:571-607 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:50 — crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:50-56 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_field_definition_names.rs:142-148 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_field_definition_names.rs:150-156 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_input_field_names.rs:50-56 | crates/biome_graphql_analyze/src/lint/suspicious/no_duplicate_fields.rs:211-218 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/biome_html_syntax/src/attribute_ext.rs:115 — crates/biome_html_syntax/src/attribute_ext.rs:115-143 | crates/biome_html_syntax/src/attribute_ext.rs:186-229 | crates/biome_html_syntax/src/attribute_ext.rs:231-283 | crates/biome_html_syntax/src/attribute_ext.rs:413-443 | crates/biome_html_syntax/src/attribute_ext.rs:450-481 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/biome_service/src/file_handlers/css.rs:616 — crates/biome_service/src/file_handlers/css.rs:616-661 | crates/biome_service/src/file_handlers/graphql.rs:503-559 | crates/biome_service/src/file_handlers/grit.rs:443-496 | crates/biome_service/src/file_handlers/javascript.rs:1787-1831 | crates/biome_service/src/file_handlers/json.rs:576-621 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×7
  • Edited copy of a member (47 corresponding lines) crates/biome_js_control_flow/src/nodes/break_stmt.rs:24 — crates/biome_js_control_flow/src/nodes/break_stmt.rs:24-79 | crates/biome_js_control_flow/src/nodes/continue_stmt.rs:21-67 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) crates/biome_js_analyze/src/assist/source/no_duplicate_classes.rs:125 — crates/biome_js_analyze/src/assist/source/no_duplicate_classes.rs:125-180 | crates/biome_js_analyze/src/tailwind.rs:23-69 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:154 — crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:154-200 | crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:150-196 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:68 — crates/biome_html_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:68-114 | crates/biome_js_analyze/src/lint/nursery/no_invalid_file_input_accept.rs:65-113 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:240 — crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:240-288 | crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:76-122 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) crates/biome_service/src/file_handlers/html.rs:395 — crates/biome_service/src/file_handlers/html.rs:395-441 | crates/biome_service/src/file_handlers/json.rs:217-278 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else.rs:130 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_else.rs:130-185 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_if.rs:121-167 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:736 — crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:736-757 | crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:759-779 | crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:783-799 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:125 — crates/biome_js_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:125-141 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:139-161 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_variables_shorthand.rs:97-113 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/biome_embeds/src/visitor.rs:119 — crates/biome_embeds/src/visitor.rs:119-137 | crates/biome_embeds/src/visitor.rs:144-162 | crates/biome_embeds/src/visitor.rs:261-277 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_definitions.rs:118 — crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_definitions.rs:118-134 | crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:94-117 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json.rs:308-327 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/biome_diagnostics_macros/src/generate.rs:54 — crates/biome_diagnostics_macros/src/generate.rs:54-70 | crates/biome_diagnostics_macros/src/generate.rs:72-88 | crates/biome_diagnostics_macros/src/generate.rs:235-254 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/biome_css_parser/src/syntax/scss/at_rule/extend_at_rule.rs:26 — crates/biome_css_parser/src/syntax/scss/at_rule/extend_at_rule.rs:26-46 | crates/biome_css_parser/src/syntax/scss/at_rule/forward_at_rule.rs:25-43 | crates/biome_css_parser/src/syntax/scss/at_rule/use_at_rule.rs:26-42 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:119 — crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:119-136 | crates/biome_css_analyze/src/lint/correctness/no_unmatchable_anb_selector.rs:91-107 | crates/biome_css_analyze/src/lint/suspicious/no_empty_block.rs:73-90 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_xor_as_exponentiation.rs:93 — crates/biome_js_analyze/src/lint/nursery/no_xor_as_exponentiation.rs:93-103 | crates/biome_js_analyze/src/lint/style/use_const.rs:166-183 | crates/biome_js_analyze/src/lint/style/use_node_assert_strict.rs:73-88 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_is.rs:182 — crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_is.rs:182-192 | crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_model.rs:367-377 | crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_show.rs:161-171 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/biome_embeds/src/bindings.rs:55 — crates/biome_embeds/src/bindings.rs:55-65 | crates/biome_embeds/src/bindings.rs:71-82 | crates/biome_embeds/src/bindings.rs:88-99 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:307 — crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:307-321 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:623-639 | crates/biome_css_parser/src/syntax/value/if.rs:528-538 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/biome_html_parser/src/syntax/vue.rs:400 — crates/biome_html_parser/src/syntax/vue.rs:400-410 | crates/biome_html_parser/src/syntax/vue.rs:412-422 | crates/biome_html_parser/src/syntax/vue.rs:456-468 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/biome_markdown_parser/src/parser.rs:1389 — crates/biome_markdown_parser/src/parser.rs:1389-1399 | crates/biome_markdown_parser/src/syntax/list.rs:1402-1414 | crates/biome_markdown_parser/src/syntax/table.rs:402-412 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/biome_graphql_parser/src/token_source.rs:83 — crates/biome_graphql_parser/src/token_source.rs:83-93 | crates/biome_json_parser/src/token_source.rs:105-115 | crates/biome_yaml_parser/src/token_source.rs:97-107 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:894 — crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:894-902 | crates/biome_js_analyze/src/lint/complexity/use_math_min_max.rs:905-914 | crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:906-915 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:717 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:717-725 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:748-756 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:762-770 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/biome_package/src/node_js_package/mod.rs:36 — crates/biome_package/src/node_js_package/mod.rs:36-44 | crates/biome_package/src/node_js_package/mod.rs:50-58 | crates/biome_package/src/node_js_package/mod.rs:88-96 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/media_type_query.rs:13 — crates/biome_css_formatter/src/css/auxiliary/media_type_query.rs:13-24 | crates/biome_css_formatter/src/scss/selectors/partial_combinator_selector.rs:13-21 | crates/biome_js_formatter/src/js/module/export_named_shorthand_specifier.rs:15-23 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/biome_grit_patterns/src/grit_css_parser.rs:44 — crates/biome_grit_patterns/src/grit_css_parser.rs:44-52 | crates/biome_grit_patterns/src/grit_js_parser.rs:52-60 | crates/biome_grit_patterns/src/grit_json_parser.rs:43-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/biome_cli/src/commands/inspect/plugins/mod.rs:105 — crates/biome_cli/src/commands/inspect/plugins/mod.rs:105-113 | crates/biome_js_analyze/src/lint/nursery/no_js_restricted_properties.rs:266-274 | crates/biome_js_analyze/src/lint/nursery/use_consistent_boolean_name.rs:371-379 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/biome_service/src/file_handlers/css.rs:524 — crates/biome_service/src/file_handlers/css.rs:524-534 | crates/biome_service/src/file_handlers/html.rs:719-727 | crates/biome_service/src/file_handlers/json.rs:495-504 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×7
  • Duplicated block (17 lines × 3) crates/biome_grit_patterns/src/grit_target_language/css_target_language.rs:90 — crates/biome_grit_patterns/src/grit_target_language/css_target_language.rs:90-106 | crates/biome_grit_patterns/src/grit_target_language/js_target_language.rs:144-160 | crates/biome_grit_patterns/src/grit_target_language/json_target_language.rs:103-119 — before extracting anything, compare `crates/biome_grit_patterns/src/grit_target_language/js_target_language.rs` and `crates/biome_grit_patterns/src/grit_target_language/json_target_language.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 3) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:69 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:69-85 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_once.rs:70-86 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_pre.rs:70-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:69` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 3) crates/biome_js_formatter/src/js/objects/getter_object_member.rs:13 — crates/biome_js_formatter/src/js/objects/getter_object_member.rs:13-29 | crates/biome_js_formatter/src/ts/auxiliary/getter_signature_type_member.rs:17-33 | crates/biome_js_formatter/src/ts/auxiliary/setter_signature_type_member.rs:18-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/objects/getter_object_member.rs:13` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsGetterObjectMember` in one and `&TsGetterSignatureTypeMember` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_formatter/src/ts/auxiliary/setter_signature_type_member.rs:35` calls `format` and `crates/biome_js_formatter/src/ts/auxiliary/getter_signature_type_member.rs:34` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 3) crates/biome_service/src/file_handlers/graphql.rs:222 — crates/biome_service/src/file_handlers/graphql.rs:222-238 | crates/biome_service/src/file_handlers/html.rs:397-413 | crates/biome_service/src/file_handlers/md.rs:159-175 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/html.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_service/src/file_handlers/html.rs:396` calls `to_html_file_source`, `unwrap_or_default` and `crates/biome_service/src/file_handlers/graphql.rs:221` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 3) crates/biome_css_formatter/src/css/auxiliary/font_feature_values_item.rs:12 — crates/biome_css_formatter/src/css/auxiliary/font_feature_values_item.rs:12-28 | crates/biome_css_formatter/src/css/statements/margin_at_rule.rs:8-24 | crates/biome_css_formatter/src/scss/auxiliary/else_clause.rs:9-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/font_feature_values_item.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssFontFeatureValuesItem` in one and `&CssMarginAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 3) crates/biome_css_formatter/src/css/statements/charset_at_rule.rs:8 — crates/biome_css_formatter/src/css/statements/charset_at_rule.rs:8-24 | crates/biome_css_formatter/src/tailwind/statements/config_at_rule.rs:8-24 | crates/biome_css_formatter/src/tailwind/statements/reference_at_rule.rs:8-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssCharsetAtRule` in one and `&TwConfigAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 3) crates/biome_js_formatter/src/js/module/export_default_expression_clause.rs:17 — crates/biome_js_formatter/src/js/module/export_default_expression_clause.rs:17-33 | crates/biome_js_formatter/src/js/module/import.rs:13-29 | crates/biome_js_formatter/src/ts/module/export_assignment_clause.rs:12-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/module/export_default_expression_clause.rs:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsExportDefaultExpressionClause` in one and `&JsImport` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×7
  • Duplicated block (13 lines × 3) crates/biome_grit_formatter/src/grit/auxiliary/within.rs:10 — crates/biome_grit_formatter/src/grit/auxiliary/within.rs:10-22 | crates/biome_grit_formatter/src/grit/patterns/pattern_contains.rs:10-22 | crates/biome_js_formatter/src/ts/types/infer_type.rs:13-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/auxiliary/within.rs:10` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritWithin` in one and `&GritPatternContains` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 3) crates/biome_html_parser/src/lexer/mod.rs:136 — crates/biome_html_parser/src/lexer/mod.rs:136-148 | crates/biome_html_parser/src/lexer/mod.rs:196-208 | crates/biome_html_parser/src/lexer/mod.rs:266-278 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/lexer/mod.rs:136` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 3) crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:301 — crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:301-313 | crates/biome_js_analyze/src/lint/style/use_named_capture_group.rs:166-178 | crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:316-328 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:341 — crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:341-353 | crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs:154-166 | crates/biome_js_analyze/src/lint/suspicious/no_fallthrough_switch_clause.rs:265-277 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs` and `crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:341` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:213 — crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:213-225 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:107-119 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs:108-120 — before extracting anything, compare `crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs` and `crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:213` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) crates/biome_module_graph/src/db/type_inference/expressions.rs:873 — crates/biome_module_graph/src/db/type_inference/expressions.rs:873-885 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1498-1510 | crates/biome_module_graph/src/db/type_inference/lookup.rs:581-593 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) crates/biome_service/src/file_handlers/css.rs:1006 — crates/biome_service/src/file_handlers/css.rs:1006-1018 | crates/biome_service/src/file_handlers/javascript.rs:1675-1687 | crates/biome_service/src/file_handlers/json.rs:936-948 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/javascript.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:1006` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×7
  • Duplicated block (11 lines × 4) crates/biome_cli/src/execute/migrate/eslint.rs:129 — crates/biome_cli/src/execute/migrate/eslint.rs:129-139 | crates/biome_cli/src/execute/migrate/eslint.rs:211-221 | crates/biome_cli/src/execute/migrate/prettier.rs:549-559 | crates/biome_cli/src/execute/migrate/stylelint.rs:142-152 — before extracting anything, compare `crates/biome_cli/src/execute/migrate/eslint.rs` and `crates/biome_cli/src/execute/migrate/stylelint.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_cli/src/execute/migrate/prettier.rs:548` calls `is_none`, `extension` and `crates/biome_cli/src/execute/migrate/eslint.rs:210` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 4) crates/biome_html_parser/src/lexer/mod.rs:2197 — crates/biome_html_parser/src/lexer/mod.rs:2197-2207 | crates/biome_js_parser/src/lexer/mod.rs:338-348 | crates/biome_markdown_parser/src/lexer/mod.rs:1905-1915 | crates/biome_tailwind_parser/src/lexer/mod.rs:710-720 — before extracting anything, compare `crates/biome_html_parser/src/lexer/mod.rs` and `crates/biome_tailwind_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 4) crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:288 — crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:288-298 | crates/biome_js_analyze/src/lint/nursery/use_global_regex_in_replace_all.rs:194-204 | crates/biome_js_analyze/src/lint/style/use_named_capture_group.rs:151-161 | crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:303-313 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) crates/biome_js_formatter/src/js/module/export_named_specifier.rs:19 — crates/biome_js_formatter/src/js/module/export_named_specifier.rs:19-30 | crates/biome_js_formatter/src/js/module/import_default_clause.rs:25-35 | crates/biome_js_formatter/src/js/module/import_namespace_clause.rs:25-35 | crates/biome_js_formatter/src/js/module/named_import_specifier.rs:19-30 — before extracting anything, compare `crates/biome_js_formatter/src/js/module/export_named_specifier.rs` and `crates/biome_js_formatter/src/js/module/named_import_specifier.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/module/export_named_specifier.rs:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_formatter/src/js/module/import_default_clause.rs:21` calls `Some`, `format`, `space` and `crates/biome_js_formatter/src/js/module/export_named_specifier.rs:17` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 4) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:443 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:443-453 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:465-475 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:487-497 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:580-590 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:443` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) crates/biome_css_parser/src/syntax/at_rule/document.rs:141 — crates/biome_css_parser/src/syntax/at_rule/document.rs:141-151 | crates/biome_css_parser/src/syntax/at_rule/import.rs:75-85 | crates/biome_css_parser/src/syntax/at_rule/namespace.rs:97-107 | crates/biome_tailwind_parser/src/syntax/css_value.rs:196-206 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
  • Duplicated block (11 lines × 4) crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:85 — crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:85-95 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_page_pause.rs:81-91 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_navigation.rs:80-90 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_timeout.rs:80-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×7
  • Duplicated block (9–10 lines × 2) crates/biome_cli/src/commands/rage.rs:141 — crates/biome_cli/src/commands/rage.rs:141-150 | crates/biome_cli/src/commands/rage.rs:173-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/commands/rage.rs:141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) crates/biome_embeds/src/visitor.rs:1460 — crates/biome_embeds/src/visitor.rs:1460-1468 | crates/biome_embeds/src/visitor.rs:1609-1618 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_embeds/src/visitor.rs:1460` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–10 lines × 2) crates/biome_html_parser/src/syntax/svelte.rs:801 — crates/biome_html_parser/src/syntax/svelte.rs:801-810 | crates/biome_html_parser/src/syntax/svelte.rs:816-824 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:280 — crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:280-288 | crates/biome_js_analyze/src/lint/nursery/no_eager_array_methods_in_loops.rs:415-424 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:280` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) crates/biome_js_parser/src/syntax/module.rs:771 — crates/biome_js_parser/src/syntax/module.rs:771-779 | crates/biome_js_parser/src/syntax/module.rs:1056-1065 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:81 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:81-90 | crates/biome_markdown_formatter/src/quote.rs:144-152 — before extracting anything, compare `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs` and `crates/biome_markdown_formatter/src/quote.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–10 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:894 — crates/biome_syntax_codegen/src/generate_nodes.rs:894-903 | xtask/codegen/src/generate_nodes.rs:933-941 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:894` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×7
  • Duplicated block (9 lines × 4) crates/biome_graphql_formatter/src/lib.rs:188 — crates/biome_graphql_formatter/src/lib.rs:188-196 | crates/biome_grit_formatter/src/lib.rs:82-90 | crates/biome_json_formatter/src/lib.rs:190-198 | crates/biome_markdown_formatter/src/lib.rs:233-241 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut GraphqlFormatter` in one and `&mut GritFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_graphql_formatter/src/lib.rs:198` calls `fmt_fields` and `crates/biome_markdown_formatter/src/lib.rs:244` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 4) crates/biome_module_graph/src/db/type_inference/expressions.rs:1079 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1079-1087 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1791-1799 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2356-2364 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2431-2439 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1088` calls `Union` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:2365` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 4) crates/biome_js_semantic/src/semantic_model/builder.rs:297 — crates/biome_js_semantic/src/semantic_model/builder.rs:297-305 | crates/biome_js_semantic/src/semantic_model/builder.rs:319-327 | crates/biome_js_semantic/src/semantic_model/builder.rs:339-347 | crates/biome_js_semantic/src/semantic_model/builder.rs:357-365 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_semantic/src/semantic_model/builder.rs:297` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 4) crates/biome_css_semantic/src/format_semantic_model.rs:35 — crates/biome_css_semantic/src/format_semantic_model.rs:35-43 | crates/biome_js_semantic/src/format_semantic_model.rs:33-41 | crates/biome_js_type_info/src/format_type_info.rs:44-52 | crates/biome_jsdoc_comment/src/format_jsdoc_comment.rs:48-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
  • Duplicated block (9 lines × 4) crates/biome_service/src/file_handlers/css.rs:555 — crates/biome_service/src/file_handlers/css.rs:555-563 | crates/biome_service/src/file_handlers/graphql.rs:452-460 | crates/biome_service/src/file_handlers/grit.rs:390-398 | crates/biome_service/src/file_handlers/yaml.rs:428-436 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:555` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) crates/biome_graphql_formatter/src/graphql/auxiliary/directive.rs:8 — crates/biome_graphql_formatter/src/graphql/auxiliary/directive.rs:8-16 | crates/biome_graphql_formatter/src/graphql/auxiliary/fragment_spread.rs:12-23 | crates/biome_js_formatter/src/jsx/attribute/shorthand_attribute.rs:9-24 | crates/biome_js_formatter/src/jsx/auxiliary/namespace_name.rs:10-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/auxiliary/fragment_spread.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlDirective` in one and `&GraphqlFragmentSpread` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 4) crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:74 — crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:74-82 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_page_pause.rs:69-78 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_navigation.rs:69-77 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_timeout.rs:69-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:74` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×7
  • Duplicated block (7–8 lines × 2) crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:106 — crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:106-113 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json.rs:316-322 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:139 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:139-146 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:119-125 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs` and `crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:198 — crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:198-204 | crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:211-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:198` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) crates/biome_js_analyze/src/lint/correctness/use_single_js_doc_asterisk.rs:164 — crates/biome_js_analyze/src/lint/correctness/use_single_js_doc_asterisk.rs:164-171 | crates/biome_js_analyze/src/lint/suspicious/no_ts_ignore.rs:129-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/use_single_js_doc_asterisk.rs:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) crates/biome_module_graph/src/html_module_info/visitor.rs:217 — crates/biome_module_graph/src/html_module_info/visitor.rs:217-224 | crates/biome_module_graph/src/html_module_info/visitor.rs:255-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/html_module_info/visitor.rs:217` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/html_module_info/visitor.rs:213` calls `Ok`, `opening_element` and `crates/biome_module_graph/src/html_module_info/visitor.rs:253` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7–8 lines × 2) crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:21 — crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:21-28 | xtask/codegen/src/generate_syntax_kinds.rs:24-30 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_syntax_kinds.rs` and `xtask/codegen/src/generate_syntax_kinds.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:21` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) crates/biome_configuration/src/overrides.rs:261 — crates/biome_configuration/src/overrides.rs:261-267 | crates/biome_configuration/src/overrides.rs:341-348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:261` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · YamlLexer · ×6
  • YamlLexer::consume_flow_collection (cyclomatic 30) crates/biome_yaml_parser/src/lexer/mod.rs:516 — YamlLexer::consume_flow_collection has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • YamlLexer::consume_tokens (cyclomatic 20) crates/biome_yaml_parser/src/lexer/mod.rs:111 — YamlLexer::consume_tokens has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • YamlLexer::consume_block_properties (cyclomatic 20) crates/biome_yaml_parser/src/lexer/mod.rs:1108 — YamlLexer::consume_block_properties has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • YamlLexer::consume_plain_literal (cyclomatic 19) crates/biome_yaml_parser/src/lexer/mod.rs:639 — YamlLexer::consume_plain_literal has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • YamlLexer::consume_tag_property (cyclomatic 19) crates/biome_yaml_parser/src/lexer/mod.rs:1290 — YamlLexer::consume_tag_property has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • YamlLexer::report_over_indented_leading_empty_line (cyclomatic 16) crates/biome_yaml_parser/src/lexer/mod.rs:1515 — YamlLexer::report_over_indented_leading_empty_line has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D17 · Explicit Debt · XxxComment · ×6
  • XxxComment crates/biome_rowan/src/green/node.rs:260 — // XXX: this handles empty ranges — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment crates/biome_rowan/src/green/node.rs:390 — // XXX: fix up aggregate data after construction, because we can't — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment crates/biome_rowan/src/green/node_cache.rs:294 — // XXX: the impl is a bit tricky. As usual when writing interners, we want to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment crates/biome_js_analyze/src/lint/suspicious/no_misleading_character_class.rs:358 — // "\u{XXX}" — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment crates/biome_js_analyze/src/lint/suspicious/no_misleading_character_class.rs:361 — // /\u{XXX}/ and "\\u{XXX}" — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment crates/biome_cli/src/logging.rs:274 — /// XXX: Remove after [PR](https://github.com/tokio-rs/tracing/pull/3196) is merged.
D2 · Cognitive Complexity · JsLexer · ×6
  • JsLexer::read_regex (cognitive 89) crates/biome_js_parser/src/lexer/mod.rs:1674 — JsLexer::read_regex has cognitive complexity 89 (threshold 15). Drivers by points: if/else 17 (74 pts), match/switch 3 (10 pts), loops 2 (5 pts) (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JsLexer::lex_token (cognitive 36) crates/biome_js_parser/src/lexer/mod.rs:2065 — JsLexer::lex_token has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • JsLexer::read_slash (cognitive 28) crates/biome_js_parser/src/lexer/mod.rs:1589 — JsLexer::read_slash has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • JsLexer::lex_template (cognitive 24) crates/biome_js_parser/src/lexer/mod.rs:2216 — JsLexer::lex_template has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JsLexer::read_number (cognitive 20) crates/biome_js_parser/src/lexer/mod.rs:1398 — JsLexer::read_number has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JsLexer::read_zero (cognitive 17) crates/biome_js_parser/src/lexer/mod.rs:1290 — JsLexer::read_zero has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AssignabilityCheck · ×6
  • AssignabilityCheck::is_assignable (cognitive 46) crates/biome_js_type_info/src/type_relation.rs:744 — AssignabilityCheck::is_assignable has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (29 pts), match/switch 6 (9 pts), boolean chains 8 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • AssignabilityCheck::find_member (cognitive 23) crates/biome_js_type_info/src/type_relation.rs:2056 — AssignabilityCheck::find_member has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 6 (10 pts), if/else 8 (9 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AssignabilityCheck::is_structurally_assignable (cognitive 21) crates/biome_js_type_info/src/type_relation.rs:1783 — AssignabilityCheck::is_structurally_assignable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 3 (6 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • AssignabilityCheck::is_assignable_with_bare_infer (cognitive 20) crates/biome_js_type_info/src/type_relation.rs:1145 — AssignabilityCheck::is_assignable_with_bare_infer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 4 (9 pts), loops 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • AssignabilityCheck::are_parameters_assignable (cognitive 20) crates/biome_js_type_info/src/type_relation.rs:1578 — AssignabilityCheck::are_parameters_assignable has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 6 (8 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • AssignabilityCheck::is_tuple_assignable (cognitive 19) crates/biome_js_type_info/src/type_relation.rs:1428 — AssignabilityCheck::is_tuple_assignable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · biome_grit_patterns · ×6
  • biome_grit_patterns::grit_binding::are_equivalent (cognitive 39) crates/biome_grit_patterns/src/grit_binding.rs:320 — biome_grit_patterns::grit_binding::are_equivalent has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 4 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_grit_patterns::pattern_compiler::auto_wrap::auto_wrap_pattern (cognitive 24) crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:12 — biome_grit_patterns::pattern_compiler::auto_wrap::auto_wrap_pattern has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_grit_patterns::linearization::linearize_binding (cognitive 20) crates/biome_grit_patterns/src/linearization.rs:17 — biome_grit_patterns::linearization::linearize_binding has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (4 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_grit_patterns::grit_built_in_functions::distinct_fn (cognitive 19) crates/biome_grit_patterns/src/grit_built_in_functions.rs:222 — biome_grit_patterns::grit_built_in_functions::distinct_fn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts), match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_grit_patterns::pattern_compiler::snippet_compiler::node_from_tree (cognitive 19) crates/biome_grit_patterns/src/pattern_compiler/snippet_compiler.rs:152 — biome_grit_patterns::pattern_compiler::snippet_compiler::node_from_tree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_grit_patterns::pattern_compiler::node_like_compiler::node_pattern_from_node_with_name_and_kind (cognitive 17) crates/biome_grit_patterns/src/pattern_compiler/node_like_compiler.rs:35 — biome_grit_patterns::pattern_compiler::node_like_compiler::node_pattern_from_node_with_name_and_kind has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×6
  • Edited copy of a member (33 corresponding lines) crates/biome_html_parser/src/syntax/mod.rs:1357 — crates/biome_html_parser/src/syntax/mod.rs:1357-1396 | crates/biome_html_parser/src/syntax/mod.rs:1430-1462 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/biome_syntax_codegen/src/generate_nodes.rs:958 — crates/biome_syntax_codegen/src/generate_nodes.rs:958-990 | xtask/codegen/src/generate_nodes.rs:996-1040 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/biome_module_graph/src/type_inference/profiling.rs:569 — crates/biome_module_graph/src/type_inference/profiling.rs:569-601 | crates/biome_module_graph/src/type_inference/profiling.rs:658-691 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:55 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:55-95 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:48-80 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/biome_embeds/src/visitor.rs:1459 — crates/biome_embeds/src/visitor.rs:1459-1491 | crates/biome_embeds/src/visitor.rs:1607-1643 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) crates/biome_markdown_parser/src/syntax/mod.rs:2333 — crates/biome_markdown_parser/src/syntax/mod.rs:2333-2377 | crates/biome_markdown_parser/src/syntax/mod.rs:2384-2416 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×6
  • Edited copy of a member (37 corresponding lines) crates/biome_markdown_formatter/src/words.rs:346 — crates/biome_markdown_formatter/src/words.rs:346-382 | crates/biome_markdown_formatter/src/words.rs:384-420 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_drizzle_delete_without_where.rs:62 — crates/biome_js_analyze/src/lint/suspicious/no_drizzle_delete_without_where.rs:62-98 | crates/biome_js_analyze/src/lint/suspicious/no_drizzle_update_without_where.rs:62-98 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:215 — crates/biome_js_type_info/src/format_inferred_type_info.rs:215-252 | crates/biome_js_type_info/src/format_type_info.rs:184-220 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) crates/biome_css_formatter/src/css/properties/generic_property.rs:112 — crates/biome_css_formatter/src/css/properties/generic_property.rs:112-150 | crates/biome_css_formatter/src/scss/auxiliary/variable_declaration.rs:96-132 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) crates/biome_css_formatter/src/comments.rs:663 — crates/biome_css_formatter/src/comments.rs:663-699 | crates/biome_css_formatter/src/comments.rs:806-845 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) crates/biome_analyze/src/rule.rs:1536 — crates/biome_analyze/src/rule.rs:1536-1572 | crates/biome_analyze/src/rule.rs:1584-1624 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×6
  • Edited copy of a member (31 corresponding lines) crates/biome_css_parser/src/syntax/value/function/call.rs:114 — crates/biome_css_parser/src/syntax/value/function/call.rs:114-152 | crates/biome_css_parser/src/syntax/value/function/call.rs:162-192 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:158 — crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:158-188 | crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:169-199 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) crates/biome_js_analyze/src/lint/style/use_export_type.rs:642 — crates/biome_js_analyze/src/lint/style/use_export_type.rs:642-672 | crates/biome_js_analyze/src/lint/style/use_export_type.rs:679-718 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:105 — crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:105-135 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:105-137 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:177 — crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:177-208 | crates/biome_js_analyze/src/lint/a11y/no_label_without_control.rs:180-210 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) crates/biome_graphql_analyze/src/lint/suspicious/no_duplicate_fields.rs:92 — crates/biome_graphql_analyze/src/lint/suspicious/no_duplicate_fields.rs:92-129 | crates/biome_js_analyze/src/lint/suspicious/no_identical_test_title.rs:125-155 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×6
  • Edited copy of a member (34 corresponding lines) crates/biome_js_analyze/src/frameworks/mod.rs:19 — crates/biome_js_analyze/src/frameworks/mod.rs:19-54 | crates/biome_js_analyze/src/react.rs:213-246 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/biome_yaml_parser/src/lexer/mod.rs:775 — crates/biome_yaml_parser/src/lexer/mod.rs:775-808 | crates/biome_yaml_parser/src/lexer/mod.rs:811-847 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:1011 — crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:1011-1044 | crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:1046-1079 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:268 — crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:268-308 | crates/biome_js_analyze/src/lint/nursery/use_string_starts_ends_with.rs:319-352 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/biome_markdown_parser/src/to_html.rs:242 — crates/biome_markdown_parser/src/to_html.rs:242-284 | crates/biome_ruledoc/src/lower.rs:144-177 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/biome_css_formatter/src/tailwind/auxiliary/source_inline.rs:8 — crates/biome_css_formatter/src/tailwind/auxiliary/source_inline.rs:8-41 | crates/biome_js_formatter/src/ts/classes/index_signature_class_member.rs:16-57 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×6
  • Duplicated block (26 lines × 2) crates/biome_grit_formatter/src/grit/patterns/pattern_if_else.rs:9 — crates/biome_grit_formatter/src/grit/patterns/pattern_if_else.rs:9-34 | crates/biome_grit_formatter/src/grit/predicates/predicate_if_else.rs:9-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/patterns/pattern_if_else.rs:9` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritPatternIfElse` in one and `&GritPredicateIfElse` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (26 lines × 2) crates/biome_js_semantic/src/events.rs:426 — crates/biome_js_semantic/src/events.rs:426-451 | crates/biome_js_semantic/src/events.rs:516-541 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_semantic/src/events.rs:426` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:942 — crates/biome_markdown_parser/src/syntax/list.rs:942-967 | crates/biome_markdown_parser/src/syntax/list.rs:1338-1363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/syntax/list.rs:942` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:714 — crates/biome_syntax_codegen/src/generate_nodes.rs:714-739 | xtask/codegen/src/generate_nodes.rs:757-782 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:714` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) crates/biome_service/src/file_handlers/mod.rs:1418 — crates/biome_service/src/file_handlers/mod.rs:1418-1443 | crates/biome_service/src/file_handlers/mod.rs:1450-1475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/mod.rs:1418` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) crates/biome_service/src/workspace_types.rs:67 — crates/biome_service/src/workspace_types.rs:67-92 | xtask/codegen/src/generate_schema.rs:57-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×6
  • Duplicated block (16–17 lines × 2) crates/biome_cli/src/runner/impls/process_file/format.rs:149 — crates/biome_cli/src/runner/impls/process_file/format.rs:149-164 | crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:154-170 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/runner/impls/process_file/format.rs:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16–17 lines × 2) crates/biome_css_formatter/src/scss/auxiliary/module_configuration.rs:11 — crates/biome_css_formatter/src/scss/auxiliary/module_configuration.rs:11-26 | crates/biome_css_formatter/src/scss/auxiliary/supports_declaration.rs:11-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/auxiliary/module_configuration.rs:11` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&ScssModuleConfiguration` in one and `&ScssSupportsDeclaration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16–17 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_block_statement_over_iife.rs:355 — crates/biome_js_analyze/src/lint/nursery/use_block_statement_over_iife.rs:355-371 | crates/biome_js_analyze/src/lint/nursery/use_set_size.rs:337-352 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16–17 lines × 2) crates/biome_json_analyze/src/lint/suspicious/no_quickfix_biome.rs:149 — crates/biome_json_analyze/src/lint/suspicious/no_quickfix_biome.rs:149-164 | crates/biome_json_analyze/src/lint/suspicious/no_quickfix_biome.rs:180-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_analyze/src/lint/suspicious/no_quickfix_biome.rs:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16–17 lines × 2) crates/biome_module_graph/src/db/type_inference/promise_classification.rs:873 — crates/biome_module_graph/src/db/type_inference/promise_classification.rs:873-888 | crates/biome_module_graph/src/db/type_inference/promise_classification.rs:1011-1027 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/promise_classification.rs:873` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–17 lines × 2) crates/biome_service/src/settings.rs:1112 — crates/biome_service/src/settings.rs:1112-1128 | crates/biome_service/src/settings.rs:1236-1251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×6
  • Duplicated block (16 lines × 3) crates/biome_js_formatter/src/js/module/export_named_specifier.rs:13 — crates/biome_js_formatter/src/js/module/export_named_specifier.rs:13-28 | crates/biome_js_formatter/src/js/module/named_import_specifier.rs:13-28 | crates/biome_js_formatter/src/ts/types/constructor_type.rs:16-31 — before extracting anything, compare `crates/biome_js_formatter/src/js/module/export_named_specifier.rs` and `crates/biome_js_formatter/src/js/module/named_import_specifier.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/module/export_named_specifier.rs:13` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsExportNamedSpecifier` in one and `&JsNamedImportSpecifier` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_formatter/src/ts/types/constructor_type.rs:32` calls `format`, `space` and `crates/biome_js_formatter/src/js/module/export_named_specifier.rs:29` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 3) crates/biome_js_syntax/src/expr_ext.rs:1902 — crates/biome_js_syntax/src/expr_ext.rs:1902-1917 | crates/biome_js_syntax/src/expr_ext.rs:1954-1969 | crates/biome_js_syntax/src/expr_ext.rs:2031-2046 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_syntax/src/expr_ext.rs:1902` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_syntax/src/expr_ext.rs:1895` calls `Some`, `inner_string_text`, `name_token` and `crates/biome_js_syntax/src/expr_ext.rs:1953` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 3) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:438 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:438-453 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:460-475 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:575-590 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:566` calls `next_content_block_is_list` and `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:458` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 3) crates/biome_service/src/file_handlers/html.rs:1127 — crates/biome_service/src/file_handlers/html.rs:1127-1142 | crates/biome_service/src/file_handlers/javascript.rs:1344-1359 | crates/biome_service/src/file_handlers/md/lint_embedded_nodes.rs:16-31 — before extracting anything, compare `crates/biome_service/src/file_handlers/html.rs` and `crates/biome_service/src/file_handlers/javascript.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/html.rs:1127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) crates/biome_graphql_formatter/src/graphql/auxiliary/arguments.rs:8 — crates/biome_graphql_formatter/src/graphql/auxiliary/arguments.rs:8-23 | crates/biome_graphql_formatter/src/graphql/auxiliary/variable_definitions.rs:12-27 | crates/biome_graphql_formatter/src/graphql/definitions/arguments_definition.rs:12-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/auxiliary/variable_definitions.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlArguments` in one and `&GraphqlVariableDefinitions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 3) crates/biome_yaml_formatter/src/yaml/auxiliary/block_mapping.rs:7 — crates/biome_yaml_formatter/src/yaml/auxiliary/block_mapping.rs:7-22 | crates/biome_yaml_formatter/src/yaml/auxiliary/block_sequence.rs:7-22 | crates/biome_yaml_formatter/src/yaml/auxiliary/flow_in_block_node.rs:7-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&YamlBlockMapping` in one and `&YamlBlockSequence` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×6
  • Duplicated block (14–15 lines × 2) crates/biome_css_formatter/src/css/auxiliary/query_feature_range_interval.rs:17 — crates/biome_css_formatter/src/css/auxiliary/query_feature_range_interval.rs:17-30 | crates/biome_css_formatter/src/css/auxiliary/query_feature_reverse_range.rs:15-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/query_feature_range_interval.rs:17` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssQueryFeatureRangeInterval` in one and `&CssQueryFeatureReverseRange` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14–15 lines × 2) crates/biome_markdown_formatter/src/gfm/auxiliary/table.rs:201 — crates/biome_markdown_formatter/src/gfm/auxiliary/table.rs:201-215 | crates/biome_markdown_formatter/src/gfm/auxiliary/table.rs:228-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/gfm/auxiliary/table.rs:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) crates/biome_markdown_parser/src/syntax/mod.rs:1661 — crates/biome_markdown_parser/src/syntax/mod.rs:1661-1674 | crates/biome_ruledoc/src/lower.rs:189-203 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/syntax/mod.rs:1661` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) crates/biome_migrate/src/analyzers/includes.rs:101 — crates/biome_migrate/src/analyzers/includes.rs:101-115 | crates/biome_migrate/src/analyzers/use_naming_convention_enum_member_case.rs:112-125 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_migrate/src/analyzers/includes.rs:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) crates/biome_parser/src/lexer.rs:659 — crates/biome_parser/src/lexer.rs:659-673 | crates/biome_parser/src/lexer.rs:693-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_parser/src/lexer.rs:659` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:171 — crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:171-184 | xtask/codegen/src/generate_syntax_kinds.rs:284-298 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_syntax_kinds.rs` and `xtask/codegen/src/generate_syntax_kinds.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:171` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×6
  • Duplicated block (12 lines × 4) crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:136 — crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:136-147 | crates/biome_graphql_analyze/src/lint/style/no_excessive_lines_per_file.rs:136-147 | crates/biome_html_analyze/src/lint/style/no_excessive_lines_per_file.rs:136-147 | crates/biome_js_analyze/src/lint/style/no_excessive_lines_per_file.rs:150-161 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:150` calls `note` and `crates/biome_js_analyze/src/lint/style/no_excessive_lines_per_file.rs:163` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 4) crates/biome_formatter/src/builders.rs:637 — crates/biome_formatter/src/builders.rs:637-648 | crates/biome_html_formatter/src/utils/children.rs:82-93 | crates/biome_js_formatter/src/utils/jsx.rs:427-438 | crates/biome_markdown_formatter/src/words.rs:48-59 — before extracting anything, compare `crates/biome_html_formatter/src/utils/children.rs` and `crates/biome_js_formatter/src/utils/jsx.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<Context>` in one and `&mut Formatter<HtmlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 4) crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:117 — crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:117-128 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:181-192 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:275-286 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:339-350 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:116` calls `Contains` and `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:180` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 4) crates/biome_html_parser/src/lexer/mod.rs:136 — crates/biome_html_parser/src/lexer/mod.rs:136-147 | crates/biome_html_parser/src/lexer/mod.rs:196-207 | crates/biome_html_parser/src/lexer/mod.rs:266-277 | crates/biome_html_parser/src/lexer/mod.rs:325-336 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/lexer/mod.rs:136` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 4) crates/biome_service/src/file_handlers/graphql.rs:650 — crates/biome_service/src/file_handlers/graphql.rs:650-661 | crates/biome_service/src/file_handlers/json.rs:758-769 | crates/biome_service/src/file_handlers/md.rs:684-695 | crates/biome_service/src/file_handlers/yaml.rs:547-558 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/json.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_service/src/file_handlers/graphql.rs:663` calls `diagnostic_offset` and `crates/biome_service/src/file_handlers/md.rs:697` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 4) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:518 — crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:518-529 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:622-633 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:650-661 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:677-688 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×6
  • Duplicated block (9–11 lines × 2) crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:214 — crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:214-222 | crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:320-330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:214` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–11 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:429 — crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:429-437 | crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:446-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9–11 lines × 2) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/eslint_config.rs:143 — crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/eslint_config.rs:143-151 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:153-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/eslint_config.rs:143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–11 lines × 2) crates/biome_service/src/file_handlers/json.rs:896 — crates/biome_service/src/file_handlers/json.rs:896-906 | crates/biome_service/src/file_handlers/json.rs:948-956 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/json.rs:896` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–11 lines × 2) crates/biome_service/src/file_handlers/md.rs:793 — crates/biome_service/src/file_handlers/md.rs:793-801 | crates/biome_service/src/file_handlers/md.rs:826-836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/md.rs:793` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–11 lines × 2) crates/biome_service/src/settings.rs:2129 — crates/biome_service/src/settings.rs:2129-2137 | crates/biome_service/src/settings.rs:2181-2191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&mut JsFormatOptions` in one and `&mut JsonFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_service/src/settings.rs:2179` calls `set_expand`, `Some` and `crates/biome_service/src/settings.rs:2129` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×6
  • Duplicated block (8 lines × 4) crates/biome_configuration/src/lib.rs:778 — crates/biome_configuration/src/lib.rs:778-785 | crates/biome_manifest/src/lib.rs:101-109 | crates/biome_manifest/src/lib.rs:163-171 | xtask/codegen/src/promote_rules.rs:568-576 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/lib.rs:778` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) crates/biome_configuration/src/overrides.rs:351 — crates/biome_configuration/src/overrides.rs:351-358 | crates/biome_configuration/src/overrides.rs:361-368 | crates/biome_configuration/src/overrides.rs:371-378 | crates/biome_configuration/src/overrides.rs:398-405 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 4) crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:91 — crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:91-98 | crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:87-94 | crates/biome_js_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:100-107 | crates/biome_json_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:87-94 — before extracting anything, compare `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` and `crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:441 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:441-448 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:463-470 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:506-513 | crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:578-585 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:441` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) crates/biome_service/src/file_handlers/css.rs:585 — crates/biome_service/src/file_handlers/css.rs:585-592 | crates/biome_service/src/file_handlers/graphql.rs:472-479 | crates/biome_service/src/file_handlers/grit.rs:410-417 | crates/biome_service/src/file_handlers/json.rs:545-552 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:585` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) crates/biome_configuration/src/overrides.rs:359 — crates/biome_configuration/src/overrides.rs:359-366 | crates/biome_configuration/src/overrides.rs:369-376 | crates/biome_configuration/src/overrides.rs:379-386 | crates/biome_configuration/src/overrides.rs:406-413 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:359` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×6
  • Duplicated block (7 lines × 4) crates/biome_css_formatter/src/scss/auxiliary/media_query.rs:16 — crates/biome_css_formatter/src/scss/auxiliary/media_query.rs:16-23 | crates/biome_html_formatter/src/svelte/auxiliary/await_catch_clause.rs:10-17 | crates/biome_html_formatter/src/svelte/auxiliary/await_then_clause.rs:10-17 | crates/biome_js_formatter/src/js/bindings/array_binding_pattern_element.rs:18-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/auxiliary/media_query.rs:16` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut CssFormatter` in one and `&mut HtmlFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 4) crates/biome_tailwind_parser/src/lexer/mod.rs:51 — crates/biome_tailwind_parser/src/lexer/mod.rs:51-57 | crates/biome_tailwind_parser/src/lexer/mod.rs:91-97 | crates/biome_tailwind_parser/src/lexer/mod.rs:143-149 | crates/biome_tailwind_parser/src/lexer/mod.rs:162-168 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_tailwind_parser/src/lexer/mod.rs:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_tailwind_parser/src/lexer/mod.rs:98` calls `consume_bracketed_thing` and `crates/biome_tailwind_parser/src/lexer/mod.rs:150` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 4) crates/biome_html_factory/src/make.rs:30 — crates/biome_html_factory/src/make.rs:30-36 | crates/biome_js_factory/src/make.rs:81-87 | crates/biome_json_factory/src/make.rs:10-16 | crates/biome_markdown_factory/src/make.rs:5-11 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `kind` to `HtmlSyntaxKind` in one and `JsSyntaxKind` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 4) crates/biome_js_formatter/src/js/auxiliary/finally_clause.rs:11 — crates/biome_js_formatter/src/js/auxiliary/finally_clause.rs:11-18 | crates/biome_js_formatter/src/js/expressions/yield_argument.rs:11-18 | crates/biome_js_formatter/src/js/module/export_as_clause.rs:11-18 | crates/biome_js_formatter/src/ts/statements/declare_statement.rs:11-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsFinallyClause` in one and `&JsYieldArgument` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 4) crates/biome_js_analyze/src/lint/nursery/use_valid_test_title.rs:365 — crates/biome_js_analyze/src/lint/nursery/use_valid_test_title.rs:365-371 | crates/biome_js_analyze/src/lint/style/no_implicit_boolean.rs:133-139 | crates/biome_js_analyze/src/lint/style/use_spread_over_apply.rs:145-151 | crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:139-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_valid_test_title.rs:365` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:71 — crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:71-77 | crates/biome_js_analyze/src/lint/security/no_global_eval.rs:72-78 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:51-57 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs:52-58 — before extracting anything, compare `crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs` and `crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:71` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · MarkdownLexer · ×5
  • MarkdownLexer::consume_token_impl (cyclomatic 52) crates/biome_markdown_parser/src/lexer/mod.rs:353 — MarkdownLexer::consume_token_impl has cyclomatic complexity 52 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • MarkdownLexer::consume_textual_impl (cyclomatic 46) crates/biome_markdown_parser/src/lexer/mod.rs:1451 — MarkdownLexer::consume_textual_impl has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • MarkdownLexer::consume_thematic_break_or_emphasis (cyclomatic 29) crates/biome_markdown_parser/src/lexer/mod.rs:1090 — MarkdownLexer::consume_thematic_break_or_emphasis has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • MarkdownLexer::is_in_list_marker_whitespace (cyclomatic 28) crates/biome_markdown_parser/src/lexer/mod.rs:963 — MarkdownLexer::is_in_list_marker_whitespace has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • MarkdownLexer::is_after_block_quote_marker (cyclomatic 16) crates/biome_markdown_parser/src/lexer/mod.rs:900 — MarkdownLexer::is_after_block_quote_marker has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SemanticEventExtractor · ×5
  • SemanticEventExtractor::enter_identifier_binding (cyclomatic 39) crates/biome_js_semantic/src/events.rs:625 — SemanticEventExtractor::enter_identifier_binding has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • SemanticEventExtractor::enter (cyclomatic 29) crates/biome_css_semantic/src/events.rs:85 — SemanticEventExtractor::enter has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • SemanticEventExtractor::enter (cyclomatic 21) crates/biome_js_semantic/src/events.rs:386 — SemanticEventExtractor::enter has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • SemanticEventExtractor::enter_identifier_reference (cyclomatic 19) crates/biome_js_semantic/src/events.rs:899 — SemanticEventExtractor::enter_identifier_reference has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • SemanticEventExtractor::process_at_property (cyclomatic 17) crates/biome_css_semantic/src/events.rs:266 — SemanticEventExtractor::process_at_property has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_tailwind_logic · ×5
  • biome_tailwind_logic::syntax_service::inspect_string_literal (cyclomatic 36) crates/biome_tailwind_logic/src/syntax_service.rs:560 — biome_tailwind_logic::syntax_service::inspect_string_literal has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_tailwind_logic::class_category::utility_category (cyclomatic 33) crates/biome_tailwind_logic/src/class_category.rs:431 — biome_tailwind_logic::class_category::utility_category has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_tailwind_logic::no_tailwind_legacy_utilities::classify (cyclomatic 22) crates/biome_tailwind_logic/src/no_tailwind_legacy_utilities.rs:149 — biome_tailwind_logic::no_tailwind_legacy_utilities::classify has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_tailwind_logic::syntax_service::is_class_configuration_value (cyclomatic 22) crates/biome_tailwind_logic/src/syntax_service.rs:459 — biome_tailwind_logic::syntax_service::is_class_configuration_value has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_tailwind_logic::use_tailwind_shorthand_classes::analyze_tailwind_shorthand (cyclomatic 22) crates/biome_tailwind_logic/src/use_tailwind_shorthand_classes.rs:239 — biome_tailwind_logic::use_tailwind_shorthand_classes::analyze_tailwind_shorthand has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_js_type_info · ×5
  • biome_js_type_info::return_type_relation::is_only_property_literal_widening (cyclomatic 33) crates/biome_js_type_info/src/return_type_relation.rs:129 — biome_js_type_info::return_type_relation::is_only_property_literal_widening has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_type_info::narrowing::narrow_non_union (cyclomatic 23) crates/biome_js_type_info/src/narrowing.rs:251 — biome_js_type_info::narrowing::narrow_non_union has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_type_info::return_type_relation::compare_declared_return_type_owned (cyclomatic 21) crates/biome_js_type_info/src/return_type_relation.rs:872 — biome_js_type_info::return_type_relation::compare_declared_return_type_owned has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_type_info::type_operations::indexed_access (cyclomatic 21) crates/biome_js_type_info/src/type_operations.rs:335 — biome_js_type_info::type_operations::indexed_access has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • biome_js_type_info::return_type_relation::is_nonunion_wider (cyclomatic 20) crates/biome_js_type_info/src/return_type_relation.rs:278 — biome_js_type_info::return_type_relation::is_nonunion_wider has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · MarkdownLexer · ×5
  • MarkdownLexer::consume_textual_impl (cognitive 80) crates/biome_markdown_parser/src/lexer/mod.rs:1451 — MarkdownLexer::consume_textual_impl has cognitive complexity 80 (threshold 15). Drivers by points: if/else 18 (46 pts), loops 7 (20 pts), boolean chains 12, match/switch 1 (2 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • MarkdownLexer::consume_token_impl (cognitive 50) crates/biome_markdown_parser/src/lexer/mod.rs:353 — MarkdownLexer::consume_token_impl has cognitive complexity 50 (threshold 15). Drivers by points: if/else 29 (38 pts), boolean chains 11, match/switch 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • MarkdownLexer::is_in_list_marker_whitespace (cognitive 42) crates/biome_markdown_parser/src/lexer/mod.rs:963 — MarkdownLexer::is_in_list_marker_whitespace has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 4 (6 pts), boolean chains 4, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • MarkdownLexer::is_after_block_quote_marker (cognitive 28) crates/biome_markdown_parser/src/lexer/mod.rs:900 — MarkdownLexer::is_after_block_quote_marker has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, loops 2, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • MarkdownLexer::consume_thematic_break_or_emphasis (cognitive 27) crates/biome_markdown_parser/src/lexer/mod.rs:1090 — MarkdownLexer::consume_thematic_break_or_emphasis has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 6 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HtmlLexer · ×5
  • HtmlLexer::consume_identifier (cognitive 74) crates/biome_html_parser/src/lexer/mod.rs:1119 — HtmlLexer::consume_identifier has cognitive complexity 74 (threshold 15). Drivers by points: if/else 23 (59 pts), boolean chains 11, match/switch 2 (3 pts), loops 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • HtmlLexer::consume_html_text (cognitive 48) crates/biome_html_parser/src/lexer/mod.rs:1677 — HtmlLexer::consume_html_text has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (39 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 28). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • HtmlLexer::consume_restricted_single_text_expression (cognitive 34) crates/biome_html_parser/src/lexer/mod.rs:780 — HtmlLexer::consume_restricted_single_text_expression has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 8, match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • HtmlLexer::consume_tag_name (cognitive 18) crates/biome_html_parser/src/lexer/mod.rs:1258 — HtmlLexer::consume_tag_name has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 1, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • HtmlLexer::next_token (cognitive 16) crates/biome_html_parser/src/lexer/mod.rs:1804 — HtmlLexer::next_token has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 3 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_js_syntax · ×5
  • biome_js_syntax::unescape::unescape_js_string (cognitive 50) crates/biome_js_syntax/src/unescape.rs:90 — biome_js_syntax::unescape::unescape_js_string has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (28 pts), match/switch 6 (20 pts), loops 1 (2 pts) (nesting depth added 33). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_js_syntax::parentheses::expression::is_first_in_statement (cognitive 40) crates/biome_js_syntax/src/parentheses/expression.rs:1047 — biome_js_syntax::parentheses::expression::is_first_in_statement has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_syntax::numbers::canonicalize_js_bigint_literal (cognitive 36) crates/biome_js_syntax/src/numbers.rs:111 — biome_js_syntax::numbers::canonicalize_js_bigint_literal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 5, loops 3, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_syntax::parentheses::expression::binary_like_needs_parens (cognitive 21) crates/biome_js_syntax/src/parentheses/expression.rs:877 — biome_js_syntax::parentheses::expression::binary_like_needs_parens has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_js_syntax::unescape::decode_unicode_escape (cognitive 17) crates/biome_js_syntax/src/unescape.rs:36 — biome_js_syntax::unescape::decode_unicode_escape has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · YamlLexer · ×5
  • YamlLexer::consume_tag_property (cognitive 49) crates/biome_yaml_parser/src/lexer/mod.rs:1290 — YamlLexer::consume_tag_property has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (39 pts), loops 4 (9 pts), match/switch 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • YamlLexer::consume_plain_literal (cognitive 29) crates/biome_yaml_parser/src/lexer/mod.rs:639 — YamlLexer::consume_plain_literal has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • YamlLexer::report_over_indented_leading_empty_line (cognitive 28) crates/biome_yaml_parser/src/lexer/mod.rs:1515 — YamlLexer::report_over_indented_leading_empty_line has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • YamlLexer::consume_flow_collection (cognitive 26) crates/biome_yaml_parser/src/lexer/mod.rs:516 — YamlLexer::consume_flow_collection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • YamlLexer::consume_block_properties (cognitive 25) crates/biome_yaml_parser/src/lexer/mod.rs:1108 — YamlLexer::consume_block_properties has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmbeddedBindingsBuilder · ×5
  • EmbeddedBindingsBuilder::visit_js_export (cognitive 40) crates/biome_embeds/src/visitor.rs:1171 — EmbeddedBindingsBuilder::visit_js_export has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EmbeddedBindingsBuilder::visit_define_props_call (cognitive 31) crates/biome_embeds/src/visitor.rs:1503 — EmbeddedBindingsBuilder::visit_define_props_call has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EmbeddedBindingsBuilder::visit_svelte_html_root (cognitive 24) crates/biome_embeds/src/visitor.rs:535 — EmbeddedBindingsBuilder::visit_svelte_html_root has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 3, match/switch 1 (3 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EmbeddedBindingsBuilder::visit_js_import (cognitive 21) crates/biome_embeds/src/visitor.rs:1092 — EmbeddedBindingsBuilder::visit_js_import has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EmbeddedBindingsBuilder::visit_js_source_snippet (cognitive 18) crates/biome_embeds/src/visitor.rs:737 — EmbeddedBindingsBuilder::visit_js_source_snippet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GritLexer · ×5
  • GritLexer::consume_name (cognitive 24) crates/biome_grit_parser/src/lexer/mod.rs:769 — GritLexer::consume_name has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 7 (11 pts), loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • GritLexer::consume_string_literal (cognitive 23) crates/biome_grit_parser/src/lexer/mod.rs:474 — GritLexer::consume_string_literal has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 2 (8 pts), loops 1 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • GritLexer::consume_number (cognitive 22) crates/biome_grit_parser/src/lexer/mod.rs:341 — GritLexer::consume_number has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 8 (20 pts), if/else 1, loops 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • GritLexer::consume_comment_or_slash (cognitive 19) crates/biome_grit_parser/src/lexer/mod.rs:984 — GritLexer::consume_comment_or_slash has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (7 pts), loops 2 (4 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • GritLexer::consume_backtick_snippet (cognitive 18) crates/biome_grit_parser/src/lexer/mod.rs:641 — GritLexer::consume_backtick_snippet has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 2 (8 pts), loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×5
  • Edited copy of a member (35 corresponding lines) crates/biome_js_formatter/src/js/module/import_assertion.rs:11 — crates/biome_js_formatter/src/js/module/import_assertion.rs:11-47 | crates/biome_js_formatter/src/ts/module/import_type_assertion.rs:9-49 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:431 — crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:431-470 | crates/biome_js_analyze/src/lint/nursery/use_set_size.rs:207-241 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:1511 — crates/biome_markdown_parser/src/syntax/list.rs:1511-1545 | crates/biome_markdown_parser/src/syntax/list.rs:1547-1589 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) crates/biome_js_formatter/src/js/module/import_default_clause.rs:11 — crates/biome_js_formatter/src/js/module/import_default_clause.rs:11-45 | crates/biome_js_formatter/src/js/module/import_namespace_clause.rs:11-45 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) crates/biome_test_utils/src/lib.rs:940 — crates/biome_test_utils/src/lib.rs:940-975 | crates/biome_test_utils/src/lib.rs:984-1018 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 19+ corresponding lines) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1300 — crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1300-1321 | crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1348-1379 | crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1384-1402 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) crates/biome_service/src/settings.rs:500 — crates/biome_service/src/settings.rs:500-518 | crates/biome_service/src/settings.rs:562-581 | crates/biome_service/src/settings.rs:598-616 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:108 — crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:108-133 | crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:173-191 | crates/biome_css_parser/src/syntax/at_rule/tailwind.rs:194-224 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:84 — crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:84-102 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_navigation.rs:79-97 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_timeout.rs:79-100 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) crates/biome_js_control_flow/src/nodes/do_while.rs:26 — crates/biome_js_control_flow/src/nodes/do_while.rs:26-48 | crates/biome_js_control_flow/src/nodes/switch_stmt.rs:28-46 | crates/biome_js_control_flow/src/nodes/while_stmt.rs:26-48 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 20+ corresponding lines) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:66 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:66-85 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_once.rs:67-86 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_pre.rs:67-86 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) crates/biome_css_semantic/src/semantic_model/mod.rs:13 — crates/biome_css_semantic/src/semantic_model/mod.rs:13-32 | crates/biome_graphql_semantic/src/semantic_model/mod.rs:18-38 | crates/biome_js_semantic/src/semantic_model.rs:54-82 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) crates/biome_service/src/settings.rs:1111 — crates/biome_service/src/settings.rs:1111-1139 | crates/biome_service/src/settings.rs:1165-1187 | crates/biome_service/src/settings.rs:1235-1254 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_vue_expose_after_await.rs:136 — crates/biome_js_analyze/src/lint/nursery/no_vue_expose_after_await.rs:136-156 | crates/biome_js_analyze/src/lint/nursery/no_vue_lifecycle_after_await.rs:95-114 | crates/biome_js_analyze/src/lint/nursery/no_vue_watch_after_await.rs:95-114 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/query_feature_range.rs:9 — crates/biome_css_formatter/src/css/auxiliary/query_feature_range.rs:9-28 | crates/biome_css_formatter/src/css/auxiliary/query_feature_range_interval.rs:13-38 | crates/biome_css_formatter/src/css/auxiliary/query_feature_reverse_range.rs:13-32 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/biome_markdown_parser/src/syntax/header.rs:304 — crates/biome_markdown_parser/src/syntax/header.rs:304-317 | crates/biome_markdown_parser/src/syntax/inline/emphasis.rs:821-835 | crates/biome_markdown_parser/src/syntax/mod.rs:1713-1727 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/biome_react_compiler/src/convert_ast/statements.rs:441 — crates/biome_react_compiler/src/convert_ast/statements.rs:441-454 | crates/biome_react_compiler/src/convert_ast/statements.rs:459-473 | crates/biome_react_compiler/src/convert_ast/statements.rs:478-493 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:585 — crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:585-598 | crates/biome_js_analyze/src/lint/nursery/no_array_sort_for_min_max.rs:602-620 | crates/biome_vue_semantic/src/semantic_model/component.rs:2579-2597 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/biome_service/src/settings.rs:2671 — crates/biome_service/src/settings.rs:2671-2684 | crates/biome_service/src/settings.rs:2689-2702 | crates/biome_service/src/settings.rs:2707-2723 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/biome_css_parser/src/syntax/scss/expression/list.rs:249 — crates/biome_css_parser/src/syntax/scss/expression/list.rs:249-265 | crates/biome_css_parser/src/syntax/scss/identifiers/interpolated_identifier.rs:83-96 | crates/biome_css_parser/src/syntax/scss/value/interpolated_value.rs:232-247 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_aria_hidden_on_focusable.rs:119 — crates/biome_html_analyze/src/lint/a11y/no_aria_hidden_on_focusable.rs:119-129 | crates/biome_js_analyze/src/lint/a11y/no_redundant_roles.rs:137-146 | crates/biome_js_analyze/src/lint/complexity/no_useless_empty_export.rs:104-113 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/biome_js_type_info/src/inferred_type.rs:1491 — crates/biome_js_type_info/src/inferred_type.rs:1491-1500 | crates/biome_js_type_info/src/inferred_type.rs:1502-1511 | crates/biome_js_type_info/src/inferred_type.rs:1513-1522 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/biome_graphql_parser/src/parser/value.rs:104 — crates/biome_graphql_parser/src/parser/value.rs:104-113 | crates/biome_js_parser/src/syntax/jsx/mod.rs:812-833 | crates/biome_js_parser/src/syntax/typescript/types.rs:563-572 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/biome_css_parser/src/syntax/scss/selector/parent_selector.rs:181 — crates/biome_css_parser/src/syntax/scss/selector/parent_selector.rs:181-190 | crates/biome_css_parser/src/syntax/selector/mod.rs:410-419 | crates/biome_css_parser/src/syntax/selector/nested_selector.rs:96-106 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/biome_migrate/src/analyzers/ignore_scanner.rs:38 — crates/biome_migrate/src/analyzers/ignore_scanner.rs:38-47 | crates/biome_migrate/src/analyzers/monorepo.rs:48-57 | crates/biome_migrate/src/analyzers/recommended.rs:36-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×5
  • Edited copy of a member (5 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_vue_single_event_payload.rs:209 — crates/biome_js_analyze/src/lint/nursery/use_vue_single_event_payload.rs:209-213 | crates/biome_js_analyze/src/lint/nursery/no_shared_branch_code.rs:283-287 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/biome_js_semantic/src/semantic_model/binding.rs:557 — crates/biome_js_semantic/src/semantic_model/binding.rs:557-561 | crates/biome_js_semantic/src/semantic_model/reference.rs:200-204 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/biome_graphql_formatter/src/graphql/value/default_value.rs:8 — crates/biome_graphql_formatter/src/graphql/value/default_value.rs:8-12 | crates/biome_grit_formatter/src/grit/patterns/pattern_where.rs:8-26 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/biome_js_analyze/src/services/react_compiler.rs:57 — crates/biome_js_analyze/src/services/react_compiler.rs:57-61 | crates/biome_js_analyze/src/services/vue.rs:410-414 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/biome_cli/src/service/unix.rs:312 — crates/biome_cli/src/service/unix.rs:312-316 | crates/biome_cli/src/service/windows.rs:217-221 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×5
  • Edited copy of a member (4 corresponding lines) crates/biome_js_runtime/src/semantic.rs:37 — crates/biome_js_runtime/src/semantic.rs:37-40 | crates/biome_js_runtime/src/token.rs:34-39 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/biome_rowan/src/syntax/node.rs:1484 — crates/biome_rowan/src/syntax/node.rs:1484-1487 | crates/biome_rowan/src/syntax/token.rs:692-695 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/biome_rowan/src/syntax/node.rs:1478 — crates/biome_rowan/src/syntax/node.rs:1478-1481 | crates/biome_rowan/src/syntax/token.rs:698-701 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_v_is.rs:59 — crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_v_is.rs:59-62 | crates/biome_html_analyze/src/lint/nursery/no_vue_v_text.rs:54-57 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/biome_grit_patterns/src/pattern_compiler/after_compiler.rs:12 — crates/biome_grit_patterns/src/pattern_compiler/after_compiler.rs:12-15 | crates/biome_grit_patterns/src/pattern_compiler/before_compiler.rs:12-15 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×5
  • Duplicated block (28 lines × 2) crates/biome_cli/src/execute/migrate.rs:349 — crates/biome_cli/src/execute/migrate.rs:349-376 | crates/biome_cli/src/execute/migrate.rs:434-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate.rs:349` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (28 lines × 2) crates/biome_cli/src/lib.rs:92 — crates/biome_cli/src/lib.rs:92-119 | crates/biome_cli/src/lib.rs:151-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/lib.rs:92` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_cli/src/lib.rs:89` calls `start`, `stop` and `crates/biome_cli/src/lib.rs:150` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (28 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_interactions.rs:86 — crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_interactions.rs:86-113 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_element_interactions.rs:94-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) crates/biome_package/src/node_js_package/package_json.rs:286 — crates/biome_package/src/node_js_package/package_json.rs:286-313 | crates/biome_package/src/node_js_package/package_json.rs:317-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:199 — crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:199-226 | crates/biome_graphql_analyze/src/utils.rs:180-207 — before extracting anything, compare `crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs` and `crates/biome_graphql_analyze/src/utils.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×5
  • Duplicated block (24 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:364 — crates/biome_grit_parser/src/lexer/mod.rs:364-387 | crates/biome_json_parser/src/lexer/mod.rs:408-431 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:364` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (24 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_tailwind_raw_colors.rs:140 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_raw_colors.rs:140-163 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_raw_colors.rs:139-162 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_tailwind_raw_colors.rs` and `crates/biome_js_analyze/src/lint/nursery/no_tailwind_raw_colors.rs` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) crates/biome_js_control_flow/src/nodes/do_while.rs:56 — crates/biome_js_control_flow/src/nodes/do_while.rs:56-79 | crates/biome_js_control_flow/src/nodes/while_stmt.rs:56-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:1106 — crates/biome_syntax_codegen/src/generate_nodes.rs:1106-1129 | xtask/codegen/src/generate_nodes.rs:1146-1169 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:1106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `language_kind` to `&K` in one and `LanguageKind` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (24 lines × 2) crates/biome_syntax_codegen/src/generate_syntax_factory.rs:18 — crates/biome_syntax_codegen/src/generate_syntax_factory.rs:18-41 | xtask/codegen/src/generate_syntax_factory.rs:11-34 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_syntax_factory.rs` and `xtask/codegen/src/generate_syntax_factory.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_syntax_factory.rs:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×5
  • Duplicated block (13 lines × 4) crates/biome_cli/src/execute/migrate.rs:265 — crates/biome_cli/src/execute/migrate.rs:265-277 | crates/biome_cli/src/execute/migrate.rs:345-357 | crates/biome_cli/src/execute/migrate.rs:430-442 | crates/biome_cli/src/execute/migrate.rs:519-531 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 4) crates/biome_css_analyze/src/lib.rs:282 — crates/biome_css_analyze/src/lib.rs:282-294 | crates/biome_graphql_analyze/src/lib.rs:131-143 | crates/biome_json_analyze/src/lib.rs:205-217 | crates/biome_yaml_analyze/src/lib.rs:131-143 — before extracting anything, compare `crates/biome_graphql_analyze/src/lib.rs` and `crates/biome_yaml_analyze/src/lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lib.rs:282` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 4) crates/biome_graphql_analyze/src/lib.rs:124 — crates/biome_graphql_analyze/src/lib.rs:124-136 | crates/biome_html_analyze/src/lib.rs:307-319 | crates/biome_markdown_analyze/src/lib.rs:183-195 | crates/biome_yaml_analyze/src/lib.rs:124-136 — before extracting anything, compare `crates/biome_graphql_analyze/src/lib.rs` and `crates/biome_yaml_analyze/src/lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/lib.rs:124` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 4) crates/biome_service/src/file_handlers/css.rs:719 — crates/biome_service/src/file_handlers/css.rs:719-731 | crates/biome_service/src/file_handlers/css.rs:924-936 | crates/biome_service/src/file_handlers/css.rs:984-996 | crates/biome_service/src/file_handlers/css.rs:1054-1066 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:719` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 4) crates/biome_service/src/file_handlers/graphql.rs:789 — crates/biome_service/src/file_handlers/graphql.rs:789-801 | crates/biome_service/src/file_handlers/html.rs:1512-1524 | crates/biome_service/src/file_handlers/md.rs:830-842 | crates/biome_service/src/file_handlers/yaml.rs:684-696 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/html.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/graphql.rs:789` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×5
  • Duplicated block (12–13 lines × 3) crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:157 — crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:157-168 | crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:170-181 | crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:184-196 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/use_react_async_server_function.rs:184` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 3) crates/biome_js_analyze/src/lint/style/use_export_type.rs:324 — crates/biome_js_analyze/src/lint/style/use_export_type.rs:324-336 | crates/biome_js_analyze/src/lint/style/use_export_type.rs:358-370 | crates/biome_js_analyze/src/lint/style/use_import_type.rs:505-516 — before extracting anything, compare `crates/biome_js_analyze/src/lint/style/use_export_type.rs` and `crates/biome_js_analyze/src/lint/style/use_import_type.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_export_type.rs:324` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 3) crates/biome_js_analyze/src/lint/style/use_import_type.rs:559 — crates/biome_js_analyze/src/lint/style/use_import_type.rs:559-571 | crates/biome_js_analyze/src/lint/style/use_import_type.rs:582-593 | crates/biome_js_analyze/src/lint/style/use_import_type.rs:698-710 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_import_type.rs:559` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 3) crates/biome_markdown_parser/src/syntax/header.rs:306 — crates/biome_markdown_parser/src/syntax/header.rs:306-317 | crates/biome_markdown_parser/src/syntax/inline/emphasis.rs:823-835 | crates/biome_markdown_parser/src/syntax/mod.rs:1715-1727 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/syntax/header.rs:306` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 3) crates/biome_service/src/settings.rs:507 — crates/biome_service/src/settings.rs:507-518 | crates/biome_service/src/settings.rs:569-581 | crates/biome_service/src/settings.rs:605-616 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/settings.rs:507` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×5
  • Duplicated block (10 lines × 4) crates/biome_css_parser/src/lexer/mod.rs:1707 — crates/biome_css_parser/src/lexer/mod.rs:1707-1716 | crates/biome_graphql_parser/src/lexer/mod.rs:314-323 | crates/biome_grit_parser/src/lexer/mod.rs:329-338 | crates/biome_json_parser/src/lexer/mod.rs:374-383 — before extracting anything, compare `crates/biome_graphql_parser/src/lexer/mod.rs` and `crates/biome_grit_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_parser/src/lexer/mod.rs:1707` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) crates/biome_cli/src/reporter/github.rs:22 — crates/biome_cli/src/reporter/github.rs:22-31 | crates/biome_cli/src/reporter/gitlab.rs:32-41 | crates/biome_cli/src/reporter/rdjson.rs:24-33 | crates/biome_cli/src/reporter/sarif.rs:30-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/reporter/github.rs:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) crates/biome_css_parser/src/lib.rs:204 — crates/biome_css_parser/src/lib.rs:204-213 | crates/biome_graphql_parser/src/lib.rs:225-234 | crates/biome_js_parser/src/parse.rs:130-139 | crates/biome_json_parser/src/lib.rs:127-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `parse` to `CssOffsetParse` in one and `GraphqlOffsetParse` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 4) crates/biome_js_formatter/src/js/lists/export_named_from_specifier_list.rs:11 — crates/biome_js_formatter/src/js/lists/export_named_from_specifier_list.rs:11-20 | crates/biome_js_formatter/src/js/lists/export_named_specifier_list.rs:11-20 | crates/biome_js_formatter/src/js/lists/import_assertion_entry_list.rs:11-20 | crates/biome_js_formatter/src/js/lists/named_import_specifier_list.rs:11-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsExportNamedFromSpecifierList` in one and `&JsExportNamedSpecifierList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 4) crates/biome_module_graph/src/format_module_graph.rs:54 — crates/biome_module_graph/src/format_module_graph.rs:54-63 | crates/biome_module_graph/src/format_module_graph.rs:608-617 | crates/biome_module_graph/src/format_module_graph.rs:772-781 | crates/biome_module_graph/src/format_module_graph.rs:784-793 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×5
  • Duplicated block (5 lines × 4) crates/biome_js_analyze/src/lint/complexity/no_adjacent_spaces_in_regex.rs:194 — crates/biome_js_analyze/src/lint/complexity/no_adjacent_spaces_in_regex.rs:194-198 | crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs:301-305 | crates/biome_js_analyze/src/lint/nursery/use_vue_base_import.rs:101-106 | crates/biome_js_analyze/src/lint/suspicious/no_misleading_character_class.rs:157-161 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_adjacent_spaces_in_regex.rs:194` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) crates/biome_js_analyze/src/lint/complexity/no_useless_lone_block_statements.rs:136 — crates/biome_js_analyze/src/lint/complexity/no_useless_lone_block_statements.rs:136-141 | crates/biome_js_analyze/src/lint/complexity/no_useless_undefined_initialization.rs:212-217 | crates/biome_js_analyze/src/lint/nursery/no_useless_await.rs:171-175 | crates/biome_js_analyze/src/lint/nursery/use_unary_minus.rs:148-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_useless_lone_block_statements.rs:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) crates/biome_grit_parser/src/lib.rs:195 — crates/biome_grit_parser/src/lib.rs:195-199 | crates/biome_html_parser/src/lib.rs:203-207 | crates/biome_markdown_parser/src/lib.rs:297-301 | crates/biome_yaml_parser/src/lib.rs:190-194 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `parse` to `GritOffsetParse` in one and `HtmlOffsetParse` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 4) crates/biome_html_parser/src/token_source.rs:332 — crates/biome_html_parser/src/token_source.rs:332-336 | crates/biome_js_parser/src/token_source.rs:133-137 | crates/biome_markdown_parser/src/token_source.rs:289-293 | crates/biome_tailwind_parser/src/token_source.rs:92-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `checkpoint` to `HtmlTokenSourceCheckpoint` in one and `JsTokenSourceCheckpoint` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_tailwind_parser/src/token_source.rs:98` calls `re_lex_current_in_context`, `force_relex_in_context` and `crates/biome_markdown_parser/src/token_source.rs:294` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 4) crates/biome_css_formatter/src/css/auxiliary/composes_property_value.rs:12 — crates/biome_css_formatter/src/css/auxiliary/composes_property_value.rs:12-16 | crates/biome_js_formatter/src/jsx/attribute/attribute.rs:10-14 | crates/biome_js_formatter/src/jsx/attribute/attribute_initializer_clause.rs:14-18 | crates/biome_js_formatter/src/ts/module/import_type_qualifier.rs:11-15 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/composes_property_value.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut CssFormatter` in one and `&mut JsFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D1 · Cyclomatic Complexity · biome_cli · ×4
  • biome_cli::execute::migrate::eslint_to_biome::migrate_eslint_rule (cyclomatic 118) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:767 — biome_cli::execute::migrate::eslint_to_biome::migrate_eslint_rule has cyclomatic complexity 118 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_cli::execute::migrate::migrate_file (cyclomatic 37) crates/biome_cli/src/execute/migrate.rs:177 — biome_cli::execute::migrate::migrate_file has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_cli::commands::inspect::plugins::inspect_plugins (cyclomatic 35) crates/biome_cli/src/commands/inspect/plugins/mod.rs:332 — biome_cli::commands::inspect::plugins::inspect_plugins has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_cli::runner::impls::finalizers::default::print_to_reporter (cyclomatic 23) crates/biome_cli/src/runner/impls/finalizers/default.rs:185 — biome_cli::runner::impls::finalizers::default::print_to_reporter has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AssignabilityCheck · ×4
  • AssignabilityCheck::is_assignable (cyclomatic 53) crates/biome_js_type_info/src/type_relation.rs:744 — AssignabilityCheck::is_assignable has cyclomatic complexity 53 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • AssignabilityCheck::find_member (cyclomatic 23) crates/biome_js_type_info/src/type_relation.rs:2056 — AssignabilityCheck::find_member has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • AssignabilityCheck::is_structurally_assignable (cyclomatic 20) crates/biome_js_type_info/src/type_relation.rs:1783 — AssignabilityCheck::is_structurally_assignable has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • AssignabilityCheck::is_tuple_assignable (cyclomatic 17) crates/biome_js_type_info/src/type_relation.rs:1428 — AssignabilityCheck::is_tuple_assignable has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WorkspaceServerWithDb · ×4
  • WorkspaceServerWithDb::open_file_internal (cyclomatic 35) crates/biome_service/src/workspace/server.rs:833 — WorkspaceServerWithDb::open_file_internal has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • WorkspaceServerWithDb::is_ignored_by_scanner (cyclomatic 24) crates/biome_service/src/workspace/server.rs:1829 — WorkspaceServerWithDb::is_ignored_by_scanner has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • WorkspaceServerWithDb::update_settings (cyclomatic 20) crates/biome_service/src/workspace/server.rs:2985 — WorkspaceServerWithDb::update_settings has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • WorkspaceServerWithDb::process_file (cyclomatic 18) crates/biome_service/src/workspace/server.rs:3591 — WorkspaceServerWithDb::process_file has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · biome_css_analyze · ×4
  • biome_css_analyze::lint::correctness::no_unknown_media_feature_name::has_invalid_media_feature_name (cyclomatic 22) crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:249 — biome_css_analyze::lint::correctness::no_unknown_media_feature_name::has_invalid_media_feature_name has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_css_analyze::fonts::find_font_family (cyclomatic 17) crates/biome_css_analyze/src/fonts.rs:338 — biome_css_analyze::fonts::find_font_family has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_css_analyze::lint::nursery::use_logical_properties::merge_longhands_violation (cyclomatic 17) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:850 — biome_css_analyze::lint::nursery::use_logical_properties::merge_longhands_violation has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_css_analyze::lint::nursery::use_logical_properties::make_split_declaration (cyclomatic 16) crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:1155 — biome_css_analyze::lint::nursery::use_logical_properties::make_split_declaration has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · biome_html_formatter · ×4
  • biome_html_formatter::utils::children::html_split_children (cognitive 186) crates/biome_html_formatter/src/utils/children.rs:257 — biome_html_formatter::utils::children::html_split_children has cognitive complexity 186 (threshold 15). Drivers by points: if/else 43 (139 pts), loops 8 (22 pts), match/switch 5 (20 pts), boolean chains 5 (nesting depth added 125). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_html_formatter::utils::srcset::parse_srcset (cognitive 27) crates/biome_html_formatter/src/utils/srcset.rs:60 — biome_html_formatter::utils::srcset::parse_srcset has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (10 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_html_formatter::html::auxiliary::string::requote (cognitive 18) crates/biome_html_formatter/src/html/auxiliary/string.rs:84 — biome_html_formatter::html::auxiliary::string::requote has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • biome_html_formatter::utils::srcset::is_valid_non_negative_float (cognitive 17) crates/biome_html_formatter/src/utils/srcset.rs:175 — biome_html_formatter::utils::srcset::is_valid_non_negative_float has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OrganizeImports · ×4
  • OrganizeImports::action (cognitive 107) crates/biome_js_analyze/src/assist/source/organize_imports.rs:1108 — OrganizeImports::action has cognitive complexity 107 (threshold 15). Drivers by points: if/else 24 (81 pts), boolean chains 10, loops 4 (8 pts), match/switch 3 (8 pts) (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • OrganizeImports::run (cognitive 46) crates/biome_js_analyze/src/assist/source/organize_imports.rs:967 — OrganizeImports::run has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 11, loops 1 (nesting depth added 17). Of this number, 44 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • OrganizeImports::diagnostic (cognitive 38) crates/biome_js_analyze/src/assist/source/organize_imports.rs:829 — OrganizeImports::diagnostic has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 3 (7 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • OrganizeImports::run (cognitive 30) crates/biome_migrate/src/analyzers/organize_imports.rs:23 — OrganizeImports::run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 3 (8 pts), match/switch 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_lsp · ×4
  • biome_lsp::handlers::analysis::code_actions (cognitive 62) crates/biome_lsp/src/handlers/analysis.rs:55 — biome_lsp::handlers::analysis::code_actions has cognitive complexity 62 (threshold 15). Drivers by points: if/else 36 (45 pts), boolean chains 9, match/switch 3 (5 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • biome_lsp::utils::code_fix_to_lsp (cognitive 39) crates/biome_lsp/src/utils.rs:98 — biome_lsp::utils::code_fix_to_lsp has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 5 (13 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_lsp::handlers::analysis::fix_all (cognitive 28) crates/biome_lsp/src/handlers/analysis.rs:541 — biome_lsp::handlers::analysis::fix_all has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (21 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_lsp::handlers::text_document::ensure_project_for_opened_document (cognitive 16) crates/biome_lsp/src/handlers/text_document.rs:82 — biome_lsp::handlers::text_document::ensure_project_for_opened_document has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_formatter · ×4
  • biome_formatter::format_range (cognitive 56) crates/biome_formatter/src/lib.rs:2021 — biome_formatter::format_range has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (37 pts), match/switch 8 (14 pts), boolean chains 4, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_formatter::token::number::format_trimmed_number (cognitive 27) crates/biome_formatter/src/token/number.rs:40 — biome_formatter::token::number::format_trimmed_number has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 4 (8 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_formatter::token::string::normalize_string (cognitive 26) crates/biome_formatter/src/token/string.rs:47 — biome_formatter::token::string::normalize_string has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_formatter::buffer::clean_interned (cognitive 16) crates/biome_formatter/src/buffer.rs:548 — biome_formatter::buffer::clean_interned has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 2 (4 pts), loops 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatMdInlineItemList · ×4
  • FormatMdInlineItemList::fmt_inside_list (cognitive 38) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:373 — FormatMdInlineItemList::fmt_inside_list has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FormatMdInlineItemList::fmt (cognitive 32) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:216 — FormatMdInlineItemList::fmt has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FormatMdInlineItemList::fmt_fenced_code_block (cognitive 28) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:787 — FormatMdInlineItemList::fmt_fenced_code_block has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (8 pts), match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FormatMdInlineItemList::fmt_prose_preserve (cognitive 19) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:923 — FormatMdInlineItemList::fmt_prose_preserve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_css_formatter · ×4
  • biome_css_formatter::utils::component_value_list::write_component_value_list (cognitive 27) crates/biome_css_formatter/src/utils/component_value_list.rs:87 — biome_css_formatter::utils::component_value_list::write_component_value_list has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (4 pts), boolean chains 2, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_formatter::utils::component_value_list::get_value_list_layout (cognitive 23) crates/biome_css_formatter/src/utils/component_value_list.rs:412 — biome_css_formatter::utils::component_value_list::get_value_list_layout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_formatter::utils::scss_interpolated_string::raw_interpolation::normalize_numbers_in_string_token (cognitive 20) crates/biome_css_formatter/src/utils/scss_interpolated_string/raw_interpolation.rs:188 — biome_css_formatter::utils::scss_interpolated_string::raw_interpolation::normalize_numbers_in_string_token has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_formatter::utils::scss_include_comments::place_map_separator_comment (cognitive 16) crates/biome_css_formatter/src/utils/scss_include_comments.rs:52 — biome_css_formatter::utils::scss_include_comments::place_map_separator_comment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · biome_react_compiler · ×4
  • biome_react_compiler::prefilter::has_react_like_functions (cognitive 25) crates/biome_react_compiler/src/prefilter.rs:39 — biome_react_compiler::prefilter::has_react_like_functions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (19 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_react_compiler::convert_ast::modules::convert_export (cognitive 23) crates/biome_react_compiler/src/convert_ast/modules.rs:126 — biome_react_compiler::convert_ast::modules::convert_export has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 4 (8 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_react_compiler::convert_scope::convert_scope_info (cognitive 23) crates/biome_react_compiler/src/convert_scope.rs:10 — biome_react_compiler::convert_scope::convert_scope_info has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 7 (9 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_react_compiler::convert_ast::expressions::convert_expression (cognitive 16) crates/biome_react_compiler/src/convert_ast/expressions.rs:3 — biome_react_compiler::convert_ast::expressions::convert_expression has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 4 (7 pts) (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (8 members, 50+ identical tokens) crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:12 — crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:12-36 | crates/biome_graphql_formatter/src/graphql/definitions/enum_value_definition.rs:12-24 | crates/biome_graphql_formatter/src/graphql/definitions/field_definition.rs:12-37 | crates/biome_graphql_formatter/src/graphql/definitions/input_object_type_definition.rs:14-38 | crates/biome_graphql_formatter/src/graphql/definitions/interface_type_definition.rs:12-39 | crates/biome_graphql_formatter/src/graphql/definitions/object_type_definition.rs:12-39 | crates/biome_graphql_formatter/src/graphql/definitions/scalar_type_definition.rs:12-33 | crates/biome_graphql_formatter/src/graphql/definitions/schema_definition.rs:12-33 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) crates/biome_js_formatter/src/js/classes/setter_class_member.rs:11 — crates/biome_js_formatter/src/js/classes/setter_class_member.rs:11-55 | crates/biome_js_formatter/src/js/declarations/catch_declaration.rs:11-69 | crates/biome_js_formatter/src/js/expressions/call_arguments.rs:27-170 | crates/biome_js_formatter/src/js/expressions/parenthesized_expression.rs:17-63 | crates/biome_js_formatter/src/js/objects/computed_member_name.rs:11-35 | crates/biome_js_formatter/src/js/objects/setter_object_member.rs:11-52 | crates/biome_js_formatter/src/js/statements/for_in_statement.rs:12-54 | crates/biome_js_formatter/src/js/statements/for_of_statement.rs:12-66 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) crates/biome_service/src/file_handlers/css.rs:759 — crates/biome_service/src/file_handlers/css.rs:759-875 | crates/biome_service/src/file_handlers/graphql.rs:619-707 | crates/biome_service/src/file_handlers/html.rs:1246-1363 | crates/biome_service/src/file_handlers/javascript.rs:1450-1566 | crates/biome_service/src/file_handlers/javascript.rs:2008-2084 | crates/biome_service/src/file_handlers/json.rs:727-829 | crates/biome_service/src/file_handlers/md.rs:654-740 | crates/biome_service/src/file_handlers/yaml.rs:517-602 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) crates/biome_service/src/settings.rs:2096 — crates/biome_service/src/settings.rs:2096-2157 | crates/biome_service/src/settings.rs:2159-2197 | crates/biome_service/src/settings.rs:2200-2231 | crates/biome_service/src/settings.rs:2237-2268 | crates/biome_service/src/settings.rs:2270-2292 | crates/biome_service/src/settings.rs:2295-2351 | crates/biome_service/src/settings.rs:2354-2378 | crates/biome_service/src/settings.rs:2381-2407 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:87 — crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:87-99 | crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:83-95 | crates/biome_html_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:81-87 | crates/biome_js_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:91-108 | crates/biome_json_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:83-95 | crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:81-87 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:101 — crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:101-116 | crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:97-112 | crates/biome_html_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:89-104 | crates/biome_js_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:110-125 | crates/biome_json_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:97-112 | crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:89-104 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/biome_css_analyze/src/suppression.rs:14 — crates/biome_css_analyze/src/suppression.rs:14-27 | crates/biome_graphql_analyze/src/suppression.rs:14-27 | crates/biome_html_analyze/src/suppression.rs:14-27 | crates/biome_js_analyze/src/suppression.rs:14-27 | crates/biome_json_analyze/src/suppression.rs:14-27 | crates/biome_yaml_analyze/src/suppression.rs:14-27 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:185 — crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:185-330 | crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:114-144 | crates/biome_js_analyze/src/lint/nursery/no_null.rs:138-157 | crates/biome_js_analyze/src/lint/nursery/no_useless_fallback_in_spread.rs:109-125 | crates/biome_js_analyze/src/lint/nursery/use_flat_math_min_max.rs:89-143 | crates/biome_js_analyze/src/lint/style/use_trim_start_end.rs:124-242 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×4
  • Edited copy of a member (41 corresponding lines) crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:249 — crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs:249-289 | crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs:268-324 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_redundant_type_constituents.rs:214 — crates/biome_js_analyze/src/lint/nursery/no_redundant_type_constituents.rs:214-254 | crates/biome_js_analyze/src/lint/nursery/no_redundant_type_constituents.rs:256-297 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:519 — crates/biome_js_type_info/src/format_inferred_type_info.rs:519-559 | crates/biome_js_type_info/src/format_type_info.rs:830-870 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) crates/biome_graphql_parser/src/lexer/mod.rs:196 — crates/biome_graphql_parser/src/lexer/mod.rs:196-239 | crates/biome_grit_parser/src/lexer/mod.rs:223-263 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×4
  • Edited copy of a member (39 corresponding lines) crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:59 — crates/biome_css_analyze/src/lint/suspicious/no_duplicate_custom_properties.rs:59-97 | crates/biome_css_analyze/src/lint/suspicious/no_duplicate_properties.rs:58-106 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:156 — crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:156-194 | crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:149-189 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) crates/biome_js_parser/src/syntax/module.rs:466 — crates/biome_js_parser/src/syntax/module.rs:466-516 | crates/biome_js_parser/src/syntax/module.rs:1127-1165 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) crates/biome_js_formatter/src/jsx/tag/closing_element.rs:10 — crates/biome_js_formatter/src/jsx/tag/closing_element.rs:10-50 | crates/biome_js_formatter/src/jsx/tag/closing_fragment.rs:10-48 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×4
  • Edited copy of a member (36 corresponding lines) crates/biome_graphql_analyze/src/lib.rs:108 — crates/biome_graphql_analyze/src/lib.rs:108-143 | crates/biome_yaml_analyze/src/lib.rs:108-143 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) crates/biome_js_analyze/src/utils/batch.rs:115 — crates/biome_js_analyze/src/utils/batch.rs:115-150 | crates/biome_js_analyze/src/utils/batch.rs:156-191 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_bind_style.rs:99 — crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_bind_style.rs:99-134 | crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_on_style.rs:98-133 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_duplicate_class_members.rs:113 — crates/biome_js_analyze/src/lint/suspicious/no_duplicate_class_members.rs:113-148 | crates/biome_js_analyze/src/syntax/correctness/no_duplicate_private_class_members.rs:38-78 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 24+ corresponding lines) crates/biome_grit_patterns/src/pattern_compiler/function_definition_compiler.rs:13 — crates/biome_grit_patterns/src/pattern_compiler/function_definition_compiler.rs:13-42 | crates/biome_grit_patterns/src/pattern_compiler/pattern_definition_compiler.rs:14-37 | crates/biome_grit_patterns/src/pattern_compiler/predicate_definition_compiler.rs:14-43 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:43 — crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:43-66 | crates/biome_module_graph/src/db/queries/type_inference/promises.rs:35-59 | crates/biome_module_graph/src/db/queries/type_inference/promises.rs:81-109 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/font_palette_values.rs:36 — crates/biome_css_parser/src/syntax/at_rule/font_palette_values.rs:36-59 | crates/biome_css_parser/src/syntax/at_rule/position_try.rs:36-59 | crates/biome_css_parser/src/syntax/at_rule/property.rs:35-58 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) crates/biome_js_formatter/src/js/classes/getter_class_member.rs:11 — crates/biome_js_formatter/src/js/classes/getter_class_member.rs:11-37 | crates/biome_js_formatter/src/js/objects/getter_object_member.rs:11-34 | crates/biome_js_formatter/src/ts/types/constructor_type.rs:12-39 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/biome_configuration/src/analyzer/mod.rs:666 — crates/biome_configuration/src/analyzer/mod.rs:666-681 | crates/biome_configuration/src/analyzer/mod.rs:935-950 | crates/biome_configuration/src/analyzer/mod.rs:1003-1018 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/biome_css_formatter/src/css/lists/attr_name_list.rs:35 — crates/biome_css_formatter/src/css/lists/attr_name_list.rs:35-56 | crates/biome_css_formatter/src/css/lists/syntax_component_list.rs:33-48 | crates/biome_graphql_formatter/src/graphql/lists/union_member_type_list.rs:34-49 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/biome_css_analyze/src/lib.rs:113 — crates/biome_css_analyze/src/lib.rs:113-132 | crates/biome_css_analyze/src/lib.rs:147-169 | crates/biome_js_analyze/src/lib.rs:436-451 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_vue_v_text_v_html_on_component.rs:105 — crates/biome_html_analyze/src/lint/nursery/no_vue_v_text_v_html_on_component.rs:105-124 | crates/biome_js_analyze/src/lint/correctness/no_const_assign.rs:82-97 | crates/biome_js_analyze/src/lint/suspicious/no_unassigned_variables.rs:116-133 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:1133 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1133-1147 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1153-1167 | crates/biome_js_type_info/src/format_type_info.rs:1031-1048 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:149 — crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:149-163 | crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:437-451 | crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:605-633 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/biome_html_parser/src/lexer/mod.rs:535 — crates/biome_html_parser/src/lexer/mod.rs:535-550 | crates/biome_html_parser/src/lexer/mod.rs:619-633 | crates/biome_html_parser/src/lexer/mod.rs:636-650 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) crates/biome_service/src/db/state.rs:1029 — crates/biome_service/src/db/state.rs:1029-1043 | crates/biome_service/src/db/state.rs:1052-1074 | crates/biome_service/src/db/state.rs:1117-1136 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×4
  • Edited copies of one member (4 members, 12+ corresponding lines) crates/biome_js_analyze/src/lint/a11y/no_aria_hidden_on_focusable.rs:139 — crates/biome_js_analyze/src/lint/a11y/no_aria_hidden_on_focusable.rs:139-150 | crates/biome_js_analyze/src/lint/a11y/no_header_scope.rs:95-108 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_tabindex.rs:135-147 | crates/biome_js_analyze/src/lint/a11y/use_valid_aria_role.rs:161-174 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) crates/biome_module_graph/src/db/type_inference/expressions.rs:397 — crates/biome_module_graph/src/db/type_inference/expressions.rs:397-408 | crates/biome_module_graph/src/db/type_inference/expressions.rs:414-428 | crates/biome_module_graph/src/db/type_inference/expressions.rs:434-448 | crates/biome_module_graph/src/db/type_inference/expressions.rs:454-468 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) crates/biome_service/src/settings.rs:1624 — crates/biome_service/src/settings.rs:1624-1635 | crates/biome_service/src/settings.rs:1644-1655 | crates/biome_service/src/settings.rs:1658-1669 | crates/biome_service/src/settings.rs:1694-1705 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:734 — crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:734-749 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:797-808 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:813-824 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:899-910 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) · ×4
  • Edited copies of one member (4 members, 15+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/container_at_rule_declarator.rs:13 — crates/biome_css_formatter/src/css/auxiliary/container_at_rule_declarator.rs:13-33 | crates/biome_css_formatter/src/tailwind/statements/source_at_rule.rs:7-32 | crates/biome_grit_formatter/src/grit/auxiliary/rewrite.rs:7-21 | crates/biome_js_formatter/src/js/auxiliary/catch_clause.rs:10-24 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 15+ corresponding lines) crates/biome_graphql_formatter/src/graphql/auxiliary/inline_fragment.rs:12 — crates/biome_graphql_formatter/src/graphql/auxiliary/inline_fragment.rs:12-27 | crates/biome_js_formatter/src/js/statements/break_statement.rs:13-27 | crates/biome_js_formatter/src/js/statements/continue_statement.rs:13-27 | crates/biome_js_formatter/src/js/statements/try_finally_statement.rs:11-26 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 15+ corresponding lines) crates/biome_yaml_parser/src/lexer/mod.rs:864 — crates/biome_yaml_parser/src/lexer/mod.rs:864-883 | crates/biome_yaml_parser/src/lexer/mod.rs:1092-1106 | crates/biome_yaml_parser/src/lexer/mod.rs:1244-1265 | crates/biome_yaml_parser/src/lexer/mod.rs:1267-1285 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 15+ corresponding lines) crates/biome_grit_parser/src/parser/definitions.rs:161 — crates/biome_grit_parser/src/parser/definitions.rs:161-176 | crates/biome_grit_parser/src/parser/literals.rs:127-141 | crates/biome_grit_parser/src/parser/patterns.rs:541-555 | crates/biome_grit_parser/src/parser/predicates.rs:225-240 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:800 — crates/biome_html_parser/src/syntax/svelte.rs:800-813 | crates/biome_html_parser/src/syntax/svelte.rs:815-827 | crates/biome_html_parser/src/syntax/vue.rs:182-194 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/biome_css_syntax/src/lib.rs:213 — crates/biome_css_syntax/src/lib.rs:213-225 | crates/biome_graphql_syntax/src/lib.rs:105-118 | crates/biome_js_syntax/src/lib.rs:180-192 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/biome_diagnostics/src/display_github.rs:113 — crates/biome_diagnostics/src/display_github.rs:113-129 | crates/biome_diagnostics/src/display_github.rs:131-149 | crates/biome_markdown_parser/src/to_html.rs:2031-2043 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_distracting_elements.rs:75 — crates/biome_html_analyze/src/lint/a11y/no_distracting_elements.rs:75-87 | crates/biome_js_analyze/src/lint/a11y/no_distracting_elements.rs:70-82 | crates/biome_js_analyze/src/lint/suspicious/no_shadow_restricted_names.rs:73-87 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×4
  • Edited copies of one member (4 members, 13+ corresponding lines) xtask/codegen/src/generate_global_types/collect.rs:362 — xtask/codegen/src/generate_global_types/collect.rs:362-374 | xtask/codegen/src/generate_global_types/collect.rs:381-396 | xtask/codegen/src/generate_global_types/collect.rs:403-415 | xtask/codegen/src/generate_global_types/collect.rs:422-434 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 13+ corresponding lines) crates/biome_grit_parser/src/parser/definitions.rs:111 — crates/biome_grit_parser/src/parser/definitions.rs:111-123 | crates/biome_grit_parser/src/parser/predicates.rs:154-168 | crates/biome_grit_parser/src/parser/predicates.rs:171-185 | crates/biome_grit_parser/src/parser/predicates.rs:350-364 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 13+ corresponding lines) crates/biome_grit_parser/src/parser/definitions.rs:146 — crates/biome_grit_parser/src/parser/definitions.rs:146-158 | crates/biome_grit_parser/src/parser/patterns.rs:258-273 | crates/biome_grit_parser/src/parser/patterns.rs:586-600 | crates/biome_grit_parser/src/parser/patterns.rs:603-617 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 13+ corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:145 — crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:145-157 | crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:214-228 | crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:186-200 | crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:202-216 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×4
  • Duplicated block (29 lines × 2) crates/biome_js_control_flow/src/nodes/for_in.rs:26 — crates/biome_js_control_flow/src/nodes/for_in.rs:26-54 | crates/biome_js_control_flow/src/nodes/for_of.rs:26-54 — before extracting anything, compare `crates/biome_js_control_flow/src/nodes/for_in.rs` and `crates/biome_js_control_flow/src/nodes/for_of.rs` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) crates/biome_js_semantic/src/events.rs:1060 — crates/biome_js_semantic/src/events.rs:1060-1088 | crates/biome_js_semantic/src/semantic_model/builder.rs:112-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_semantic/src/events.rs:1060` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) crates/biome_rule_options/src/no_restricted_imports.rs:925 — crates/biome_rule_options/src/no_restricted_imports.rs:925-953 | crates/biome_rule_options/src/no_restricted_imports.rs:962-990 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) xtask/codegen/src/generate_configuration.rs:715 — xtask/codegen/src/generate_configuration.rs:715-743 | xtask/codegen/src/generate_configuration.rs:883-911 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×4
  • Duplicated block (27 lines × 2) crates/biome_syntax_codegen/src/ast.rs:479 — crates/biome_syntax_codegen/src/ast.rs:479-505 | xtask/codegen/src/ast.rs:517-543 — before extracting anything, compare `crates/biome_syntax_codegen/src/ast.rs` and `xtask/codegen/src/ast.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 344 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:314 — crates/biome_syntax_codegen/src/generate_nodes.rs:314-340 | xtask/codegen/src/generate_nodes.rs:344-370 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:314` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:1010 — crates/biome_syntax_codegen/src/generate_nodes.rs:1010-1036 | xtask/codegen/src/generate_nodes.rs:1057-1083 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:1010` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:116 — crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:116-142 | xtask/codegen/src/generate_syntax_kinds.rs:244-270 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_syntax_kinds.rs` and `xtask/codegen/src/generate_syntax_kinds.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_syntax_kinds.rs:116` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×4
  • Duplicated block (19–20 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:569 — crates/biome_grit_parser/src/lexer/mod.rs:569-588 | crates/biome_json_parser/src/lexer/mod.rs:641-659 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:569` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–20 lines × 2) crates/biome_html_parser/src/lexer/mod.rs:137 — crates/biome_html_parser/src/lexer/mod.rs:137-156 | crates/biome_html_parser/src/lexer/mod.rs:197-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/lexer/mod.rs:137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–20 lines × 2) crates/biome_js_analyze/src/lint/style/use_import_type.rs:557 — crates/biome_js_analyze/src/lint/style/use_import_type.rs:557-576 | crates/biome_js_analyze/src/lint/style/use_import_type.rs:696-714 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_import_type.rs:557` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (19–20 lines × 2) crates/biome_js_type_info/src/local_inference.rs:2234 — crates/biome_js_type_info/src/local_inference.rs:2234-2252 | crates/biome_js_type_info/src/local_inference.rs:2264-2283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/local_inference.rs:2234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×4
  • Duplicated block (18–19 lines × 2) crates/biome_embeds/src/visitor.rs:1266 — crates/biome_embeds/src/visitor.rs:1266-1284 | crates/biome_embeds/src/visitor.rs:1312-1329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_embeds/src/visitor.rs:1266` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) crates/biome_html_parser/src/syntax/mod.rs:1378 — crates/biome_html_parser/src/syntax/mod.rs:1378-1396 | crates/biome_html_parser/src/syntax/mod.rs:1445-1462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/syntax/mod.rs:1378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) crates/biome_js_analyze/src/lint/suspicious/use_adjacent_overload_signatures.rs:223 — crates/biome_js_analyze/src/lint/suspicious/use_adjacent_overload_signatures.rs:223-240 | crates/biome_js_analyze/src/lint/suspicious/use_adjacent_overload_signatures.rs:242-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/use_adjacent_overload_signatures.rs:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) crates/biome_service/src/file_handlers/css.rs:831 — crates/biome_service/src/file_handlers/css.rs:831-849 | crates/biome_service/src/file_handlers/json.rs:786-803 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/json.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 278 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:831` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×4
  • Duplicated block (17–18 lines × 2) crates/biome_configuration_macros/src/group_struct.rs:288 — crates/biome_configuration_macros/src/group_struct.rs:288-304 | crates/biome_configuration_macros/src/group_struct.rs:408-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration_macros/src/group_struct.rs:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_configuration_macros/src/group_struct.rs:427` calls `set_recommended` and `crates/biome_configuration_macros/src/group_struct.rs:307` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17–18 lines × 2) crates/biome_css_parser/src/lexer/mod.rs:1262 — crates/biome_css_parser/src/lexer/mod.rs:1262-1279 | crates/biome_tailwind_parser/src/lexer/mod.rs:733-749 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (17–18 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_functional_template.rs:56 — crates/biome_html_analyze/src/lint/nursery/no_vue_deprecated_functional_template.rs:56-73 | crates/biome_html_analyze/src/lint/nursery/no_vue_root_v_if.rs:54-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (17–18 lines × 2) crates/biome_service/src/workspace/server.rs:3890 — crates/biome_service/src/workspace/server.rs:3890-3906 | crates/biome_service/src/workspace/server.rs:4033-4050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/workspace/server.rs:3890` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×4
  • Duplicated block (15 lines × 5) crates/biome_css_formatter/src/verbatim.rs:345 — crates/biome_css_formatter/src/verbatim.rs:345-359 | crates/biome_graphql_formatter/src/verbatim.rs:217-231 | crates/biome_grit_formatter/src/verbatim.rs:216-230 | crates/biome_js_formatter/src/verbatim.rs:225-239 | crates/biome_json_formatter/src/verbatim.rs:215-229 — before extracting anything, compare `crates/biome_css_formatter/src/verbatim.rs` and `crates/biome_graphql_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<CssFormatContext>` in one and `&mut Formatter<GraphqlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 5) crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:100 — crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:100-114 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:165-179 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:259-273 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:323-337 | crates/biome_grit_patterns/src/pattern_compiler/step_compiler.rs:47-61 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:116` calls `Contains` and `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:181` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 5) crates/biome_css_formatter/src/css/auxiliary/if_test_boolean_not_expr.rs:9 — crates/biome_css_formatter/src/css/auxiliary/if_test_boolean_not_expr.rs:9-23 | crates/biome_css_formatter/src/css/auxiliary/media_not_condition.rs:8-22 | crates/biome_css_formatter/src/css/auxiliary/property_at_rule_declarator.rs:13-27 | crates/biome_css_formatter/src/css/selectors/pseudo_class_of_nth_selector.rs:12-26 | crates/biome_css_formatter/src/scss/auxiliary/include_using_clause.rs:9-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/property_at_rule_declarator.rs:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssIfTestBooleanNotExpr` in one and `&CssMediaNotCondition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 5) crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:59 — crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:59-73 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_enum_value_names.rs:80-94 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_field_definition_names.rs:113-127 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_input_field_names.rs:59-73 | crates/biome_graphql_analyze/src/lint/suspicious/no_duplicate_graphql_operation_name.rs:81-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×4
  • Duplicated block (12–14 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:376 — crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:376-387 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:518-531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:376` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12–14 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:626 — crates/biome_js_type_info/src/format_inferred_type_info.rs:626-639 | crates/biome_js_type_info/src/format_type_info.rs:920-931 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:626` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12–14 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_double_equals.rs:135 — crates/biome_js_analyze/src/lint/suspicious/no_double_equals.rs:135-148 | crates/biome_js_analyze/src/lint/suspicious/no_equals_to_null.rs:88-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12–14 lines × 2) crates/biome_test_utils/src/lib.rs:951 — crates/biome_test_utils/src/lib.rs:951-964 | crates/biome_test_utils/src/lib.rs:1006-1017 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_test_utils/src/lib.rs:951` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×4
  • Duplicated block (10 lines × 5) crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:14 — crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:14-28 | crates/biome_graphql_formatter/src/graphql/definitions/field_definition.rs:15-29 | crates/biome_graphql_formatter/src/graphql/definitions/input_object_type_definition.rs:16-30 | crates/biome_graphql_formatter/src/graphql/definitions/interface_type_definition.rs:15-24 | crates/biome_graphql_formatter/src/graphql/definitions/object_type_definition.rs:15-29 — before extracting anything, compare `crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs` and `crates/biome_graphql_formatter/src/graphql/definitions/input_object_type_definition.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlEnumTypeDefinition` in one and `&GraphqlFieldDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:31` calls `format` and `crates/biome_graphql_formatter/src/graphql/definitions/object_type_definition.rs:32` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 5) crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:118 — crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:118-127 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:182-191 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:276-285 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:340-349 | crates/biome_grit_patterns/src/pattern_compiler/step_compiler.rs:64-73 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:116` calls `Contains` and `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:180` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 5) crates/biome_syntax_codegen/src/generate_nodes.rs:280 — crates/biome_syntax_codegen/src/generate_nodes.rs:280-289 | crates/biome_syntax_codegen/src/generate_nodes.rs:666-676 | xtask/codegen/src/generate_nodes.rs:312-321 | xtask/codegen/src/generate_nodes.rs:686-696 | xtask/codegen/src/generate_nodes.rs:774-784 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:280` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 5) crates/biome_css_formatter/src/css/lists/function_parameter_list.rs:11 — crates/biome_css_formatter/src/css/lists/function_parameter_list.rs:11-20 | crates/biome_css_formatter/src/css/lists/layer_reference_list.rs:7-19 | crates/biome_css_formatter/src/scss/lists/each_binding_list.rs:10-19 | crates/biome_css_formatter/src/scss/lists/module_configuration_item_list.rs:14-23 | crates/biome_css_formatter/src/scss/lists/parameter_item_list.rs:11-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/lists/module_configuration_item_list.rs:14` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssFunctionParameterList` in one and `&CssLayerReferenceList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D1 · Cyclomatic Complexity · GritLexer · ×3
  • GritLexer::consume_name (cyclomatic 59) crates/biome_grit_parser/src/lexer/mod.rs:769 — GritLexer::consume_name has cyclomatic complexity 59 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • GritLexer::consume_number (cyclomatic 25) crates/biome_grit_parser/src/lexer/mod.rs:341 — GritLexer::consume_number has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: GritLexer::lex_token (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • GritLexer::consume_string_literal (cyclomatic 18) crates/biome_grit_parser/src/lexer/mod.rs:474 — GritLexer::consume_string_literal has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: GritLexer::lex_token (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · biome_html_formatter · ×3
  • biome_html_formatter::utils::children::html_split_children (cyclomatic 56) crates/biome_html_formatter/src/utils/children.rs:257 — biome_html_formatter::utils::children::html_split_children has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_html_formatter::utils::css_display::get_css_display (cyclomatic 19) crates/biome_html_formatter/src/utils/css_display.rs:352 — biome_html_formatter::utils::css_display::get_css_display has cyclomatic complexity 19 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
  • biome_html_formatter::utils::srcset::parse_srcset (cyclomatic 16) crates/biome_html_formatter/src/utils/srcset.rs:60 — biome_html_formatter::utils::srcset::parse_srcset has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TypeData · ×3
  • TypeData::from_any_js_expression (cyclomatic 47) crates/biome_js_type_info/src/local_inference.rs:426 — TypeData::from_any_js_expression has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • TypeData::from_any_ts_type (cyclomatic 47) crates/biome_js_type_info/src/local_inference.rs:684 — TypeData::from_any_ts_type has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • TypeData::conditional_type_shallow (cyclomatic 18) crates/biome_js_type_info/src/interned_types.rs:600 — TypeData::conditional_type_shallow has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: TypeData::type_description (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · biome_lsp · ×3
  • biome_lsp::handlers::analysis::code_actions (cyclomatic 44) crates/biome_lsp/src/handlers/analysis.rs:55 — biome_lsp::handlers::analysis::code_actions has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_lsp::handlers::analysis::fix_all (cyclomatic 23) crates/biome_lsp/src/handlers/analysis.rs:541 — biome_lsp::handlers::analysis::fix_all has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_lsp::utils::code_fix_to_lsp (cyclomatic 18) crates/biome_lsp/src/utils.rs:98 — biome_lsp::utils::code_fix_to_lsp has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OrganizeImports · ×3
  • OrganizeImports::action (cyclomatic 43) crates/biome_js_analyze/src/assist/source/organize_imports.rs:1108 — OrganizeImports::action has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • OrganizeImports::run (cyclomatic 25) crates/biome_js_analyze/src/assist/source/organize_imports.rs:967 — OrganizeImports::run has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • OrganizeImports::diagnostic (cyclomatic 24) crates/biome_js_analyze/src/assist/source/organize_imports.rs:829 — OrganizeImports::diagnostic has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_diagnostics · ×3
  • biome_diagnostics::display::frame::print_frame (cyclomatic 39) crates/biome_diagnostics/src/display/frame.rs:36 — biome_diagnostics::display::frame::print_frame has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_diagnostics::display::diff::print_full_diff (cyclomatic 22) crates/biome_diagnostics/src/display/diff.rs:482 — biome_diagnostics::display::diff::print_full_diff has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_diagnostics::display::frame::print_invisibles (cyclomatic 19) crates/biome_diagnostics/src/display/frame.rs:489 — biome_diagnostics::display::frame::print_invisibles has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: biome_diagnostics::display::frame::show_invisible_char (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · biome_js_syntax · ×3
  • biome_js_syntax::unescape::unescape_js_string (cyclomatic 36) crates/biome_js_syntax/src/unescape.rs:90 — biome_js_syntax::unescape::unescape_js_string has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_js_syntax::numbers::canonicalize_js_bigint_literal (cyclomatic 29) crates/biome_js_syntax/src/numbers.rs:111 — biome_js_syntax::numbers::canonicalize_js_bigint_literal has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_js_syntax::parentheses::expression::is_first_in_statement (cyclomatic 22) crates/biome_js_syntax/src/parentheses/expression.rs:1047 — biome_js_syntax::parentheses::expression::is_first_in_statement has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AnyJsExpression::needs_parentheses (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · biome_html_parser · ×3
  • biome_html_parser::syntax::parse_element_allowing_sfc_blocks (cyclomatic 33) crates/biome_html_parser/src/syntax/mod.rs:476 — biome_html_parser::syntax::parse_element_allowing_sfc_blocks has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_html_parser::syntax::parse_attribute (cyclomatic 28) crates/biome_html_parser/src/syntax/mod.rs:976 — biome_html_parser::syntax::parse_attribute has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_html_parser::lexer::vue_v_for_default_length (cyclomatic 24) crates/biome_html_parser/src/lexer/mod.rs:2049 — biome_html_parser::lexer::vue_v_for_default_length has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: HtmlLexer::consume_language_identifier (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Collector · ×3
  • Collector::collect_options_object (cyclomatic 25) crates/biome_vue_semantic/src/semantic_model/component.rs:542 — Collector::collect_options_object has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • Collector::collect_macro (cyclomatic 20) crates/biome_vue_semantic/src/semantic_model/component.rs:1961 — Collector::collect_macro has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Collector::collect_setup_function (cyclomatic 16) crates/biome_vue_semantic/src/semantic_model/component.rs:1757 — Collector::collect_setup_function has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LogicalAndChain · ×3
  • LogicalAndChain::optional_chain_expression_nodes (cyclomatic 21) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:904 — LogicalAndChain::optional_chain_expression_nodes has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • LogicalAndChain::optional_chain_expression_nodes_from_negated_or (cyclomatic 19) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:1064 — LogicalAndChain::optional_chain_expression_nodes_from_negated_or has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • LogicalAndChain::cmp_chain (cyclomatic 16) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:805 — LogicalAndChain::cmp_chain has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · HtmlRenderer · ×3
  • HtmlRenderer::enter (cognitive 89) crates/biome_markdown_parser/src/to_html.rs:655 — HtmlRenderer::enter has cognitive complexity 89 (threshold 15). Drivers by points: if/else 52 (71 pts), boolean chains 10, match/switch 2 (6 pts), loops 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • HtmlRenderer::leave (cognitive 62) crates/biome_markdown_parser/src/to_html.rs:1089 — HtmlRenderer::leave has cognitive complexity 62 (threshold 15). Drivers by points: if/else 30 (58 pts), boolean chains 4 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • HtmlRenderer::render (cognitive 28) crates/biome_markdown_parser/src/to_html.rs:609 — HtmlRenderer::render has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (24 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseImportType · ×3
  • UseImportType::run (cognitive 78) crates/biome_js_analyze/src/lint/style/use_import_type.rs:173 — UseImportType::run has cognitive complexity 78 (threshold 15). Drivers by points: if/else 32 (64 pts), match/switch 5 (11 pts), boolean chains 3 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UseImportType::action (cognitive 46) crates/biome_js_analyze/src/lint/style/use_import_type.rs:458 — UseImportType::action has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 4 (10 pts), match/switch 3 (5 pts) (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • UseImportType::diagnostic (cognitive 19) crates/biome_js_analyze/src/lint/style/use_import_type.rs:358 — UseImportType::diagnostic has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (8 pts), match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_ruledoc_utils · ×3
  • biome_ruledoc_utils::analyzer::analyze_rule_code (cognitive 74) crates/biome_ruledoc_utils/src/analyzer.rs:51 — biome_ruledoc_utils::analyzer::analyze_rule_code has cognitive complexity 74 (threshold 15). Drivers by points: if/else 25 (36 pts), loops 11 (35 pts), match/switch 2 (3 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_ruledoc_utils::parse_rule_options (cognitive 23) crates/biome_ruledoc_utils/src/lib.rs:334 — biome_ruledoc_utils::parse_rule_options has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_ruledoc_utils::analyzer::process_signal (cognitive 22) crates/biome_ruledoc_utils/src/analyzer.rs:359 — biome_ruledoc_utils::analyzer::process_signal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Printer · ×3
  • Printer::print_element (cognitive 58) crates/biome_formatter/src/printer/mod.rs:103 — Printer::print_element has cognitive complexity 58 (threshold 15). Drivers by points: if/else 21 (43 pts), match/switch 6 (12 pts), boolean chains 3 (nesting depth added 28). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Printer::print_fill_entries (cognitive 41) crates/biome_formatter/src/printer/mod.rs:647 — Printer::print_fill_entries has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 3 (6 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Printer::print_text (cognitive 24) crates/biome_formatter/src/printer/mod.rs:398 — Printer::print_text has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (5 pts), match/switch 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_html_parser · ×3
  • biome_html_parser::syntax::parse_element_allowing_sfc_blocks (cognitive 55) crates/biome_html_parser/src/syntax/mod.rs:476 — biome_html_parser::syntax::parse_element_allowing_sfc_blocks has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 8, match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_html_parser::lexer::vue_v_for_default_length (cognitive 28) crates/biome_html_parser/src/lexer/mod.rs:2049 — biome_html_parser::lexer::vue_v_for_default_length has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_html_parser::syntax::parse_attribute (cognitive 17) crates/biome_html_parser/src/syntax/mod.rs:976 — biome_html_parser::syntax::parse_attribute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TypeData · ×3
  • TypeData::from_any_js_expression (cognitive 47) crates/biome_js_type_info/src/local_inference.rs:426 — TypeData::from_any_js_expression has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (35 pts), match/switch 6 (12 pts) (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • TypeData::conditional_type_shallow (cognitive 18) crates/biome_js_type_info/src/interned_types.rs:600 — TypeData::conditional_type_shallow has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 4 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • TypeData::from_any_ts_type (cognitive 18) crates/biome_js_type_info/src/local_inference.rs:684 — TypeData::from_any_ts_type has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 9 (18 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LogicalAndChain · ×3
  • LogicalAndChain::optional_chain_expression_nodes (cognitive 39) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:904 — LogicalAndChain::optional_chain_expression_nodes has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 5 (15 pts), loops 3 (7 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LogicalAndChain::optional_chain_expression_nodes_from_negated_or (cognitive 37) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:1064 — LogicalAndChain::optional_chain_expression_nodes_from_negated_or has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 4 (13 pts), loops 3 (7 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LogicalAndChain::cmp_chain (cognitive 19) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:805 — LogicalAndChain::cmp_chain has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 4 (7 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_css_syntax · ×3
  • biome_css_syntax::property_syntax::matcher::matches_component (cognitive 37) crates/biome_css_syntax/src/property_syntax/matcher.rs:320 — biome_css_syntax::property_syntax::matcher::matches_component has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_css_syntax::number_ext::scan_css_number (cognitive 17) crates/biome_css_syntax/src/number_ext.rs:45 — biome_css_syntax::number_ext::scan_css_number has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_css_syntax::property_syntax::matcher::matches_scss_component (cognitive 16) crates/biome_css_syntax/src/property_syntax/matcher.rs:208 — biome_css_syntax::property_syntax::matcher::matches_scss_component has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Function · ×3
  • Function::evaluate (cognitive 36) crates/biome_js_analyze/src/lint/nursery/use_atomic_updates.rs:411 — Function::evaluate has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Function::check_writes (cognitive 30) crates/biome_js_analyze/src/lint/nursery/use_atomic_updates.rs:474 — Function::check_writes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Function::analyze (cognitive 20) crates/biome_js_analyze/src/lint/nursery/use_atomic_updates.rs:348 — Function::analyze has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 1 (4 pts), match/switch 1 (3 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Session · ×3
  • Session::load_biome_configuration_file_internal (cognitive 36) crates/biome_lsp/src/session.rs:1325 — Session::load_biome_configuration_file_internal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (21 pts), match/switch 6 (9 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Session::register_capabilities (cognitive 20) crates/biome_lsp/src/session.rs:427 — Session::register_capabilities has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Session::update_diagnostics_for_document (cognitive 20) crates/biome_lsp/src/session.rs:688 — Session::update_diagnostics_for_document has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_yaml_formatter · ×3
  • biome_yaml_formatter::comments::handle_document_comment (cognitive 33) crates/biome_yaml_formatter/src/comments.rs:586 — biome_yaml_formatter::comments::handle_document_comment has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_yaml_formatter::comments::handle_own_line_comment (cognitive 27) crates/biome_yaml_formatter/src/comments.rs:325 — biome_yaml_formatter::comments::handle_own_line_comment has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_yaml_formatter::flow_scalar::normalize_quotes (cognitive 22) crates/biome_yaml_formatter/src/flow_scalar.rs:123 — biome_yaml_formatter::flow_scalar::normalize_quotes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 4 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer · ×3
  • Lexer::lex_slash (cognitive 25) crates/biome_json_parser/src/lexer/mod.rs:750 — Lexer::lex_slash has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 3 (7 pts), loops 2 (4 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Lexer::lex_string_literal (cognitive 24) crates/biome_json_parser/src/lexer/mod.rs:525 — Lexer::lex_string_literal has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 2 (8 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Lexer::lex_number (cognitive 22) crates/biome_json_parser/src/lexer/mod.rs:386 — Lexer::lex_number has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 8 (20 pts), if/else 1, loops 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_analyze · ×3
  • biome_analyze::shared::class_dedup::find_duplicate_classes (cognitive 23) crates/biome_analyze/src/shared/class_dedup.rs:87 — biome_analyze::shared::class_dedup::find_duplicate_classes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_analyze::utils::fix_separators (cognitive 20) crates/biome_analyze/src/utils.rs:122 — biome_analyze::utils::fix_separators has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_analyze::to_analyzer_suppressions (cognitive 19) crates/biome_analyze/src/lib.rs:770 — biome_analyze::to_analyzer_suppressions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_html_analyze · ×3
  • biome_html_analyze::lint::a11y::no_label_without_control::has_nested_control (cognitive 23) crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs:212 — biome_html_analyze::lint::a11y::no_label_without_control::has_nested_control has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_html_analyze::lint::style::use_vue_hyphenated_attributes::extract_attribute_name (cognitive 20) crates/biome_html_analyze/src/lint/style/use_vue_hyphenated_attributes.rs:245 — biome_html_analyze::lint::style::use_vue_hyphenated_attributes::extract_attribute_name has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_html_analyze::lint::a11y::use_heading_content::has_accessible_content (cognitive 19) crates/biome_html_analyze/src/lint/a11y/use_heading_content.rs:211 — biome_html_analyze::lint::a11y::use_heading_content::has_accessible_content has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · xtask_coverage · ×3
  • xtask_coverage::results::emit_compare (cognitive 23) xtask/coverage/src/results.rs:6 — xtask_coverage::results::emit_compare has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (3 pts), match/switch 1 (3 pts) (nesting depth added 12). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (diff_format, summary). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • xtask_coverage::ts::ts_microsoft::extract_metadata (cognitive 21) xtask/coverage/src/ts/ts_microsoft.rs:122 — xtask_coverage::ts::ts_microsoft::extract_metadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask_coverage::runner::run_test_suite (cognitive 20) xtask/coverage/src/runner.rs:230 — xtask_coverage::runner::run_test_suite has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (5 pts), loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArgumentTypeCompatibility · ×3
  • ArgumentTypeCompatibility::argument_extends_local_parameter (cognitive 22) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1383 — ArgumentTypeCompatibility::argument_extends_local_parameter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ArgumentTypeCompatibility::argument_extends_parameter (cognitive 17) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1468 — ArgumentTypeCompatibility::argument_extends_parameter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ArgumentTypeCompatibility::action (cognitive 16) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1075 — ArgumentTypeCompatibility::action has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (7 pts), if/else 4 (6 pts), boolean chains 3 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (69 corresponding lines) · ×3
  • Edited copy of a member (69 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_valid_lang.rs:68 — crates/biome_html_analyze/src/lint/a11y/use_valid_lang.rs:68-146 | crates/biome_js_analyze/src/lint/a11y/use_valid_lang.rs:64-142 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (69 corresponding lines) xtask/codegen/src/generate_migrate_eslint.rs:13 — xtask/codegen/src/generate_migrate_eslint.rs:13-81 | xtask/codegen/src/generate_migrate_stylelint.rs:13-81 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (69 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:66 — crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:66-135 | crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:61-129 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/biome_js_analyze/src/lint/style/no_playwright_element_handle.rs:70 — crates/biome_js_analyze/src/lint/style/no_playwright_element_handle.rs:70-94 | crates/biome_js_analyze/src/lint/style/no_playwright_eval.rs:55-79 | crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:67-82 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_networkidle.rs:58-114 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_page_pause.rs:60-78 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_navigation.rs:62-77 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_timeout.rs:62-77 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/biome_js_type_info/src/format_inferred_type_info.rs:1088 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1088-1103 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1109-1127 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1175-1195 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1201-1212 | crates/biome_js_type_info/src/format_type_info.rs:1053-1068 | crates/biome_js_type_info/src/format_type_info.rs:1074-1090 | crates/biome_js_type_info/src/format_type_info.rs:1096-1115 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/biome_service/src/file_handlers/css.rs:670 — crates/biome_service/src/file_handlers/css.rs:670-756 | crates/biome_service/src/file_handlers/graphql.rs:568-616 | crates/biome_service/src/file_handlers/html.rs:1092-1244 | crates/biome_service/src/file_handlers/javascript.rs:1302-1447 | crates/biome_service/src/file_handlers/json.rs:630-725 | crates/biome_service/src/file_handlers/md.rs:575-652 | crates/biome_service/src/file_handlers/yaml.rs:467-515 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×3
  • Edited copy of a member (43 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:473 — crates/biome_js_type_info/src/format_inferred_type_info.rs:473-515 | crates/biome_js_type_info/src/format_type_info.rs:388-435 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (43 corresponding lines) xtask/codegen/src/generate_migrate_eslint.rs:83 — xtask/codegen/src/generate_migrate_eslint.rs:83-125 | xtask/codegen/src/generate_migrate_stylelint.rs:86-128 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (43 corresponding lines) crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:554 — crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:554-596 | crates/biome_js_analyze/src/lint/nursery/use_nullish_coalescing.rs:601-645 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×3
  • Edited copy of a member (44 corresponding lines) xtask/codegen/src/generate_migrate_eslint.rs:127 — xtask/codegen/src/generate_migrate_eslint.rs:127-170 | xtask/codegen/src/generate_migrate_stylelint.rs:130-179 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) crates/biome_js_type_info/src/interned_types.rs:670 — crates/biome_js_type_info/src/interned_types.rs:670-713 | crates/biome_js_type_info/src/type_data.rs:450-494 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) crates/biome_cli/src/commands/check.rs:199 — crates/biome_cli/src/commands/check.rs:199-242 | crates/biome_cli/src/commands/lint.rs:207-252 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 18+ corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:72 — crates/biome_html_parser/src/syntax/svelte.rs:72-91 | crates/biome_html_parser/src/syntax/svelte.rs:457-486 | crates/biome_html_parser/src/syntax/svelte.rs:756-773 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:109 — crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:109-127 | crates/biome_js_analyze/src/lint/a11y/use_valid_aria_props.rs:89-106 | crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs:111-129 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/container_scroll_state_query_in_parens.rs:15 — crates/biome_css_formatter/src/css/auxiliary/container_scroll_state_query_in_parens.rs:15-34 | crates/biome_css_formatter/src/css/auxiliary/type_function.rs:9-28 | crates/biome_css_formatter/src/scss/auxiliary/at_root_query.rs:9-26 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/biome_css_formatter/src/context.rs:221 — crates/biome_css_formatter/src/context.rs:221-229 | crates/biome_graphql_formatter/src/context.rs:192-200 | crates/biome_html_formatter/src/context.rs:235-254 | crates/biome_json_formatter/src/context.rs:275-285 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:3502 — crates/biome_markdown_parser/src/syntax/list.rs:3502-3510 | crates/biome_markdown_parser/src/syntax/list.rs:3517-3525 | crates/biome_markdown_parser/src/syntax/list.rs:3581-3589 | crates/biome_markdown_parser/src/syntax/list.rs:3594-3602 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) crates/biome_service/src/file_handlers/html.rs:773 — crates/biome_service/src/file_handlers/html.rs:773-781 | crates/biome_service/src/file_handlers/javascript.rs:1073-1081 | crates/biome_service/src/file_handlers/json.rs:525-533 | crates/biome_service/src/file_handlers/md.rs:518-526 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 20+ corresponding lines) crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:394 — crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:394-413 | crates/biome_module_graph/src/type_inference/profiling/display/compact.rs:505-524 | crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:211-234 | crates/biome_module_graph/src/type_inference/profiling/display/verbose.rs:261-284 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 20+ corresponding lines) crates/biome_html_formatter/src/svelte/auxiliary/each_block.rs:8 — crates/biome_html_formatter/src/svelte/auxiliary/each_block.rs:8-27 | crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rs:8-28 | crates/biome_js_formatter/src/js/expressions/import_call_expression.rs:12-31 | crates/biome_js_formatter/src/ts/expressions/import_type_arguments.rs:7-27 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 20+ corresponding lines) crates/biome_graphql_formatter/src/graphql/auxiliary/field.rs:8 — crates/biome_graphql_formatter/src/graphql/auxiliary/field.rs:8-32 | crates/biome_graphql_formatter/src/graphql/extensions/schema_extension.rs:12-35 | crates/biome_grit_formatter/src/grit/auxiliary/language_declaration.rs:11-33 | crates/biome_html_formatter/src/svelte/auxiliary/each_as_keyed_item.rs:7-26 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×3
  • Edited copies of one member (5 members, 9+ corresponding lines) crates/biome_grit_patterns/src/grit_built_in_functions.rs:208 — crates/biome_grit_patterns/src/grit_built_in_functions.rs:208-220 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:414-426 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:462-474 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:530-538 | crates/biome_grit_patterns/src/grit_built_in_functions.rs:568-578 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 9+ corresponding lines) crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:69 — crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:69-77 | crates/biome_js_analyze/src/lint/security/no_global_eval.rs:70-78 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:49-57 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs:50-58 | crates/biome_js_analyze/src/lint/suspicious/use_is_array.rs:57-67 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 9+ corresponding lines) crates/biome_css_formatter/src/verbatim.rs:28 — crates/biome_css_formatter/src/verbatim.rs:28-36 | crates/biome_html_formatter/src/verbatim.rs:30-38 | crates/biome_js_formatter/src/verbatim.rs:27-35 | crates/biome_json_formatter/src/verbatim.rs:26-34 | crates/biome_yaml_formatter/src/verbatim.rs:28-39 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 15+ corresponding lines) · ×3
  • Edited copies of one member (5 members, 15+ corresponding lines) crates/biome_css_formatter/src/scss/auxiliary/module_configuration.rs:9 — crates/biome_css_formatter/src/scss/auxiliary/module_configuration.rs:9-26 | crates/biome_css_formatter/src/scss/auxiliary/supports_declaration.rs:9-27 | crates/biome_grit_formatter/src/grit/auxiliary/within.rs:8-22 | crates/biome_grit_formatter/src/grit/patterns/pattern_contains.rs:8-22 | crates/biome_js_formatter/src/ts/types/infer_type.rs:11-25 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 15+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/attribute_matcher.rs:8 — crates/biome_css_formatter/src/css/auxiliary/attribute_matcher.rs:8-22 | crates/biome_css_formatter/src/css/auxiliary/root.rs:9-23 | crates/biome_graphql_formatter/src/graphql/auxiliary/root.rs:8-22 | crates/biome_yaml_formatter/src/yaml/auxiliary/folded_scalar.rs:9-24 | crates/biome_yaml_formatter/src/yaml/auxiliary/literal_scalar.rs:9-24 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 15+ corresponding lines) crates/biome_graphql_analyze/src/lint/style/use_deprecated_reason.rs:68 — crates/biome_graphql_analyze/src/lint/style/use_deprecated_reason.rs:68-86 | crates/biome_js_analyze/src/lint/suspicious/no_empty_source.rs:148-165 | crates/biome_json_analyze/src/lint/nursery/use_consistent_object_keys.rs:165-182 | crates/biome_json_analyze/src/lint/style/no_top_level_literals.rs:84-98 | crates/biome_json_analyze/src/lint/suspicious/no_empty_object_keys.rs:88-102 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 10+ corresponding lines) crates/biome_rowan/src/cursor.rs:234 — crates/biome_rowan/src/cursor.rs:234-243 | crates/biome_rowan/src/cursor.rs:244-253 | crates/biome_rowan/src/cursor/node.rs:320-330 | crates/biome_rowan/src/cursor/node.rs:343-353 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) crates/biome_js_parser/src/syntax/typescript/types.rs:176 — crates/biome_js_parser/src/syntax/typescript/types.rs:176-185 | crates/biome_js_parser/src/syntax/typescript/types.rs:196-205 | crates/biome_js_parser/src/syntax/typescript/types.rs:548-558 | crates/biome_js_parser/src/syntax/typescript/types.rs:1124-1133 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/scope_at_rule_declarator.rs:13 — crates/biome_css_formatter/src/css/auxiliary/scope_at_rule_declarator.rs:13-26 | crates/biome_js_formatter/src/js/assignments/array_assignment_pattern_element.rs:15-24 | crates/biome_js_formatter/src/js/assignments/object_assignment_pattern_shorthand_property.rs:17-27 | crates/biome_js_formatter/src/js/module/import_bare_clause.rs:11-21 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:254 — crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:254-261 | crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:254-261 | crates/biome_graphql_analyze/src/utils.rs:51-58 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:278 — crates/biome_html_parser/src/syntax/svelte.rs:278-289 | crates/biome_html_parser/src/syntax/svelte.rs:1051-1062 | crates/biome_html_parser/src/syntax/svelte.rs:1416-1423 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/biome_css_parser/src/syntax/mod.rs:864 — crates/biome_css_parser/src/syntax/mod.rs:864-874 | crates/biome_graphql_parser/src/parser/mod.rs:160-170 | crates/biome_graphql_parser/src/parser/value.rs:161-168 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/biome_formatter/src/comments/map.rs:211 — crates/biome_formatter/src/comments/map.rs:211-217 | crates/biome_formatter/src/comments/map.rs:220-226 | crates/biome_formatter/src/comments/map.rs:229-235 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/biome_css_parser/src/lexer/mod.rs:486 — crates/biome_css_parser/src/lexer/mod.rs:486-492 | crates/biome_json_parser/src/lexer/mod.rs:301-307 | crates/biome_parser/src/lexer.rs:323-329 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:243 — crates/biome_graphql_analyze/src/assist/source/use_graphql_sorted_variables.rs:243-251 | crates/biome_graphql_analyze/src/assist/source/use_sorted_enum_members.rs:137-143 | crates/biome_graphql_analyze/src/assist/source/use_sorted_selection_set.rs:163-170 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 8+ corresponding lines) crates/biome_css_syntax/src/lib.rs:229 — crates/biome_css_syntax/src/lib.rs:229-238 | crates/biome_html_syntax/src/lib.rs:153-160 | crates/biome_js_syntax/src/lib.rs:308-320 | crates/biome_json_syntax/src/lib.rs:115-124 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 8+ corresponding lines) crates/biome_formatter_test/src/snapshot_builder.rs:69 — crates/biome_formatter_test/src/snapshot_builder.rs:69-78 | crates/biome_formatter_test/src/snapshot_builder.rs:109-120 | crates/biome_formatter_test/src/snapshot_builder.rs:173-180 | crates/biome_formatter_test/src/snapshot_builder.rs:198-208 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 8+ corresponding lines) crates/biome_html_parser/src/syntax/astro.rs:55 — crates/biome_html_parser/src/syntax/astro.rs:55-63 | crates/biome_html_parser/src/syntax/mod.rs:307-316 | crates/biome_html_parser/src/syntax/svelte.rs:1041-1048 | crates/biome_html_parser/src/syntax/vue.rs:368-376 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×3
  • Edited copy of a member (3 corresponding lines) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:66 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:66-68 | crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs:56-58 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:544 — crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:544-546 | crates/biome_css_parser/src/syntax/scss/identifiers/identifier.rs:32-37 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/biome_css_parser/src/syntax/value/function/expression.rs:162 — crates/biome_css_parser/src/syntax/value/function/expression.rs:162-164 | crates/biome_yaml_parser/src/parser/flow.rs:122-128 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×3
  • Duplicated block (38 lines × 2) crates/biome_grit_parser/src/lexer/mod.rs:998 — crates/biome_grit_parser/src/lexer/mod.rs:998-1035 | crates/biome_json_parser/src/lexer/mod.rs:771-808 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:998` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (38 lines × 2) crates/biome_syntax_codegen/src/ast.rs:333 — crates/biome_syntax_codegen/src/ast.rs:333-370 | xtask/codegen/src/ast.rs:371-408 — before extracting anything, compare `crates/biome_syntax_codegen/src/ast.rs` and `xtask/codegen/src/ast.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 344 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/ast.rs:333` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (38 lines × 2) xtask/codegen/src/generate_migrate_eslint.rs:84 — xtask/codegen/src/generate_migrate_eslint.rs:84-121 | xtask/codegen/src/generate_migrate_stylelint.rs:87-124 — before extracting anything, compare `xtask/codegen/src/generate_migrate_eslint.rs` and `xtask/codegen/src/generate_migrate_stylelint.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `xtask/codegen/src/generate_migrate_eslint.rs:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×3
  • Duplicated block (35 lines × 2) crates/biome_analyze/src/analyzer_plugin.rs:169 — crates/biome_analyze/src/analyzer_plugin.rs:169-203 | crates/biome_analyze/src/analyzer_plugin.rs:292-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_analyze/src/analyzer_plugin.rs:169` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (35 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:155 — crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:155-189 | crates/biome_js_analyze/src/lint/nursery/no_disabled_attribute.rs:151-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:155` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (35 lines × 2) xtask/codegen/src/generate_migrate_eslint.rs:14 — xtask/codegen/src/generate_migrate_eslint.rs:14-48 | xtask/codegen/src/generate_migrate_stylelint.rs:14-48 — before extracting anything, compare `xtask/codegen/src/generate_migrate_eslint.rs` and `xtask/codegen/src/generate_migrate_stylelint.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `xtask/codegen/src/generate_migrate_eslint.rs:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×3
  • Duplicated block (24–25 lines × 2) crates/biome_css_formatter/src/css/properties/generic_property.rs:118 — crates/biome_css_formatter/src/css/properties/generic_property.rs:118-142 | crates/biome_css_formatter/src/scss/auxiliary/variable_declaration.rs:103-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/properties/generic_property.rs:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_css_formatter/src/scss/auxiliary/variable_declaration.rs:100` calls `value_boundary_comment_start`, `split_at` and `crates/biome_css_formatter/src/css/properties/generic_property.rs:116` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (24–25 lines × 2) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_html.rs:66 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_html.rs:66-89 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_text.rs:66-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_html.rs:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24–25 lines × 2) crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:163 — crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:163-186 | crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:194-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:163` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×3
  • Duplicated block (21–22 lines × 2) crates/biome_grit_formatter/src/grit/declarations/function_definition.rs:9 — crates/biome_grit_formatter/src/grit/declarations/function_definition.rs:9-30 | crates/biome_grit_formatter/src/grit/predicates/predicate_definition.rs:13-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/declarations/function_definition.rs:9` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritFunctionDefinition` in one and `&GritPredicateDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (21–22 lines × 2) crates/biome_json_analyze/src/lint/suspicious/no_duplicate_dependencies.rs:176 — crates/biome_json_analyze/src/lint/suspicious/no_duplicate_dependencies.rs:176-197 | crates/biome_json_analyze/src/lint/suspicious/no_duplicate_dependencies.rs:208-228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_json_analyze/src/lint/suspicious/no_duplicate_dependencies.rs:176` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21–22 lines × 2) crates/biome_service/src/file_handlers/css.rs:995 — crates/biome_service/src/file_handlers/css.rs:995-1016 | crates/biome_service/src/file_handlers/json.rs:926-946 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/json.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 278 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:995` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×3
  • Duplicated block (20–21 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:530 — crates/biome_js_type_info/src/format_inferred_type_info.rs:530-549 | crates/biome_js_type_info/src/format_type_info.rs:840-860 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:530` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (20–21 lines × 2) crates/biome_markdown_formatter/src/bullet_list.rs:899 — crates/biome_markdown_formatter/src/bullet_list.rs:899-919 | crates/biome_markdown_formatter/src/bullet_list.rs:990-1009 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/bullet_list.rs:899` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20–21 lines × 2) crates/biome_service/src/file_handlers/css.rs:935 — crates/biome_service/src/file_handlers/css.rs:935-955 | crates/biome_service/src/file_handlers/json.rs:879-898 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/json.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 278 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:935` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×3
  • Duplicated block (18 lines × 3) crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:137 — crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:137-154 | crates/biome_graphql_analyze/src/lint/style/no_excessive_lines_per_file.rs:137-154 | crates/biome_html_analyze/src/lint/style/no_excessive_lines_per_file.rs:137-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:137` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 3) crates/biome_css_parser/src/token_source.rs:78 — crates/biome_css_parser/src/token_source.rs:78-95 | crates/biome_graphql_parser/src/token_source.rs:38-55 | crates/biome_html_parser/src/token_source.rs:304-321 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_parser/src/token_source.rs:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_css_parser/src/token_source.rs:73` calls `effective_context` and `crates/biome_html_parser/src/token_source.rs:299` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 3) crates/biome_service/src/file_handlers/json.rs:759 — crates/biome_service/src/file_handlers/json.rs:759-776 | crates/biome_service/src/file_handlers/md.rs:685-702 | crates/biome_service/src/file_handlers/yaml.rs:548-565 — before extracting anything, compare `crates/biome_service/src/file_handlers/json.rs` and `crates/biome_service/src/file_handlers/md.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/json.rs:759` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_service/src/file_handlers/json.rs:757` calls `clone` and `crates/biome_service/src/file_handlers/md.rs:683` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×3
  • Duplicated block (13–16 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_useless_rename.rs:155 — crates/biome_js_analyze/src/lint/complexity/no_useless_rename.rs:155-167 | crates/biome_js_analyze/src/lint/performance/use_dom_node_text_content.rs:173-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_useless_rename.rs:155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–16 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:118 — crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:118-130 | crates/biome_js_analyze/src/lint/complexity/no_useless_undefined_initialization.rs:87-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13–16 lines × 2) crates/biome_parser/src/lexer.rs:642 — crates/biome_parser/src/lexer.rs:642-657 | crates/biome_parser/src/lexer.rs:679-691 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_parser/src/lexer.rs:642` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×3
  • Duplicated block (15–16 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:119 — crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:119-133 | crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs:120-135 — before extracting anything, compare `crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs` and `crates/biome_js_analyze/src/lint/style/use_consistent_builtin_instantiation.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_invalid_builtin_instantiation.rs:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) crates/biome_service/src/settings.rs:1195 — crates/biome_service/src/settings.rs:1195-1210 | crates/biome_service/src/settings.rs:1216-1230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15–16 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:557 — crates/biome_syntax_codegen/src/generate_nodes.rs:557-572 | xtask/codegen/src/generate_nodes.rs:589-603 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:557` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×3
  • Duplicated block (14 lines × 3) crates/biome_html_parser/src/lexer/mod.rs:159 — crates/biome_html_parser/src/lexer/mod.rs:159-172 | crates/biome_html_parser/src/lexer/mod.rs:218-231 | crates/biome_html_parser/src/lexer/mod.rs:285-298 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/lexer/mod.rs:159` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) crates/biome_js_formatter/src/js/module/import_combined_clause.rs:26 — crates/biome_js_formatter/src/js/module/import_combined_clause.rs:26-39 | crates/biome_js_formatter/src/js/module/import_default_clause.rs:32-45 | crates/biome_js_formatter/src/js/module/import_namespace_clause.rs:32-45 — before extracting anything, compare `crates/biome_js_formatter/src/js/module/import_default_clause.rs` and `crates/biome_js_formatter/src/js/module/import_namespace_clause.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/module/import_combined_clause.rs:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_formatter/src/js/module/import_combined_clause.rs:23` calls `format`, `space` and `crates/biome_js_formatter/src/js/module/import_default_clause.rs:31` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 3) crates/biome_service/src/file_handlers/graphql.rs:370 — crates/biome_service/src/file_handlers/graphql.rs:370-383 | crates/biome_service/src/file_handlers/html.rs:665-678 | crates/biome_service/src/file_handlers/json.rs:439-452 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/html.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/graphql.rs:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×3
  • Duplicated block (13–14 lines × 2) crates/biome_html_analyze/src/lint/style/use_vue_hyphenated_attributes.rs:201 — crates/biome_html_analyze/src/lint/style/use_vue_hyphenated_attributes.rs:201-213 | crates/biome_html_analyze/src/lint/style/use_vue_hyphenated_attributes.rs:217-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/style/use_vue_hyphenated_attributes.rs:217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–14 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_self_assign.rs:429 — crates/biome_js_analyze/src/lint/correctness/no_self_assign.rs:429-441 | crates/biome_js_analyze/src/lint/correctness/no_self_assign.rs:444-457 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `source` to `&JsComputedMemberAssignment` in one and `&JsComputedMemberExpression` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13–14 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:142 — crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:142-155 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:321-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×3
  • Duplicated block (11–13 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:230 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:230-240 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:229-241 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs` and `crates/biome_js_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–13 lines × 2) crates/biome_markdown_formatter/src/markdown/auxiliary/fenced_code_block.rs:48 — crates/biome_markdown_formatter/src/markdown/auxiliary/fenced_code_block.rs:48-58 | crates/biome_markdown_formatter/src/markdown/auxiliary/fenced_code_block.rs:118-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/auxiliary/fenced_code_block.rs:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_markdown_formatter/src/markdown/auxiliary/fenced_code_block.rs:132` calls `Some` and `crates/biome_markdown_formatter/src/markdown/auxiliary/fenced_code_block.rs:60` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11–13 lines × 2) crates/biome_module_graph/src/db/queries/css.rs:199 — crates/biome_module_graph/src/db/queries/css.rs:199-209 | crates/biome_module_graph/src/db/queries/css.rs:258-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/queries/css.rs:199` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×3
  • Duplicated block (10–11 lines × 3) crates/biome_js_formatter/src/js/classes/static_initialization_block_class_member.rs:27 — crates/biome_js_formatter/src/js/classes/static_initialization_block_class_member.rs:27-37 | crates/biome_js_formatter/src/ts/auxiliary/module_block.rs:20-30 | crates/biome_js_formatter/src/ts/declarations/interface_declaration.rs:96-105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/classes/static_initialization_block_class_member.rs:27` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsStaticInitializationBlockClassMember` in one and `&TsModuleBlock` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_formatter/src/ts/declarations/interface_declaration.rs:105` calls `format`, `group` and `crates/biome_js_formatter/src/js/classes/static_initialization_block_class_member.rs:37` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10–11 lines × 3) crates/biome_module_graph/src/db/type_inference/expressions.rs:1229 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1229-1238 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2447-2457 | crates/biome_module_graph/src/db/type_inference/lookup.rs:948-958 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/expressions.rs:2447` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1227` calls `Literal` and `crates/biome_module_graph/src/db/type_inference/lookup.rs:946` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10–11 lines × 3) xtask/codegen/src/formatter.rs:336 — xtask/codegen/src/formatter.rs:336-345 | xtask/codegen/src/formatter.rs:351-360 | xtask/codegen/src/formatter.rs:435-445 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `xtask/codegen/src/formatter.rs:336` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×3
  • Duplicated block (8–10 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:130 — crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:130-137 | crates/biome_js_analyze/src/lint/style/use_fragment_syntax.rs:90-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–10 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_eager_array_methods_in_loops.rs:107 — crates/biome_js_analyze/src/lint/nursery/no_eager_array_methods_in_loops.rs:107-116 | crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:511-518 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_eager_array_methods_in_loops.rs:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–10 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:339 — crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:339-346 | crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:396-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:339` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×3
  • Duplicated block (8–9 lines × 2) crates/biome_migrate/src/analyzers/organize_imports.rs:89 — crates/biome_migrate/src/analyzers/organize_imports.rs:89-96 | crates/biome_migrate/src/analyzers/organize_imports.rs:99-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_migrate/src/analyzers/organize_imports.rs:89` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) crates/biome_service/src/projects.rs:168 — crates/biome_service/src/projects.rs:168-176 | crates/biome_service/src/projects.rs:316-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) crates/biome_service/src/settings.rs:2106 — crates/biome_service/src/settings.rs:2106-2113 | crates/biome_service/src/settings.rs:2211-2219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/settings.rs:2106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&mut JsFormatOptions` in one and `&mut CssFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D1 · Cyclomatic Complexity · HtmlRenderer · ×2
  • HtmlRenderer::enter (cyclomatic 58) crates/biome_markdown_parser/src/to_html.rs:655 — HtmlRenderer::enter has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • HtmlRenderer::leave (cyclomatic 33) crates/biome_markdown_parser/src/to_html.rs:1089 — HtmlRenderer::leave has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Printer · ×2
  • Printer::print_element (cyclomatic 52) crates/biome_formatter/src/printer/mod.rs:103 — Printer::print_element has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Printer::print_fill_entries (cyclomatic 17) crates/biome_formatter/src/printer/mod.rs:647 — Printer::print_fill_entries has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsLexer · ×2
  • JsLexer::lex_token (cyclomatic 51) crates/biome_js_parser/src/lexer/mod.rs:2065 — JsLexer::lex_token has cyclomatic complexity 51 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: JsLexer::resolve_identifier (cyclomatic 86) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • JsLexer::read_regex (cyclomatic 32) crates/biome_js_parser/src/lexer/mod.rs:1674 — JsLexer::read_regex has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: JsLexer::resolve_identifier (cyclomatic 86) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · biome_react_compiler · ×2
  • biome_react_compiler::convert_ast::expressions::convert_expression (cyclomatic 44) crates/biome_react_compiler/src/convert_ast/expressions.rs:3 — biome_react_compiler::convert_ast::expressions::convert_expression has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_react_compiler::convert_ast::modules::convert_export (cyclomatic 23) crates/biome_react_compiler/src/convert_ast/modules.rs:126 — biome_react_compiler::convert_ast::modules::convert_export has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UseImportType · ×2
  • UseImportType::run (cyclomatic 41) crates/biome_js_analyze/src/lint/style/use_import_type.rs:173 — UseImportType::run has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • UseImportType::action (cyclomatic 25) crates/biome_js_analyze/src/lint/style/use_import_type.rs:458 — UseImportType::action has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CssLexer · ×2
  • CssLexer::consume_token_with_fallback (cyclomatic 37) crates/biome_css_parser/src/lexer/mod.rs:588 — CssLexer::consume_token_with_fallback has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: CssLexer::consume_identifier_with_slash (cyclomatic 242) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • CssLexer::consume_slash (cyclomatic 17) crates/biome_css_parser/src/lexer/mod.rs:1463 — CssLexer::consume_slash has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: CssLexer::consume_identifier_with_slash (cyclomatic 242) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · biome_formatter · ×2
  • biome_formatter::format_range (cyclomatic 31) crates/biome_formatter/src/lib.rs:2021 — biome_formatter::format_range has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • biome_formatter::token::number::format_trimmed_number (cyclomatic 23) crates/biome_formatter/src/token/number.rs:40 — biome_formatter::token::number::format_trimmed_number has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · biome_syntax_codegen · ×2
  • biome_syntax_codegen::generate_nodes::generate_nodes (cyclomatic 31) crates/biome_syntax_codegen/src/generate_nodes.rs:9 — biome_syntax_codegen::generate_nodes::generate_nodes has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • biome_syntax_codegen::ast::handle_rule (cyclomatic 16) crates/biome_syntax_codegen/src/ast.rs:325 — biome_syntax_codegen::ast::handle_rule has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Case · ×2
  • Case::identify (cyclomatic 29) crates/biome_string_case/src/lib.rs:114 — Case::identify has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • Case::convert (cyclomatic 22) crates/biome_string_case/src/lib.rs:203 — Case::convert has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormatJsAnyConditionalRule · ×2
  • FormatJsAnyConditionalRule::should_extra_indent (cyclomatic 27) crates/biome_js_formatter/src/utils/conditional.rs:298 — FormatJsAnyConditionalRule::should_extra_indent has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • FormatJsAnyConditionalRule::fmt (cyclomatic 19) crates/biome_js_formatter/src/utils/conditional.rs:57 — FormatJsAnyConditionalRule::fmt has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Session · ×2
  • Session::load_biome_configuration_file_internal (cyclomatic 27) crates/biome_lsp/src/session.rs:1325 — Session::load_biome_configuration_file_internal has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • Session::update_diagnostics_for_document (cyclomatic 17) crates/biome_lsp/src/session.rs:688 — Session::update_diagnostics_for_document has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlobalBuilder · ×2
  • GlobalBuilder::try_lower_type (cyclomatic 27) xtask/codegen/src/generate_global_types/lower/generic.rs:856 — GlobalBuilder::try_lower_type has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • GlobalBuilder::try_lower_member (cyclomatic 21) xtask/codegen/src/generate_global_types/lower/generic.rs:412 — GlobalBuilder::try_lower_member has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SemanticModelBuilder · ×2
  • SemanticModelBuilder::push_event (cyclomatic 25) crates/biome_js_semantic/src/semantic_model/builder.rs:173 — SemanticModelBuilder::push_event has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • SemanticModelBuilder::push_event (cyclomatic 23) crates/biome_css_semantic/src/semantic_model/builder.rs:158 — SemanticModelBuilder::push_event has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RuleMover · ×2
  • RuleMover::action (cyclomatic 25) crates/biome_migrate/src/analyzers/rule_mover.rs:211 — RuleMover::action has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • RuleMover::run (cyclomatic 21) crates/biome_migrate/src/analyzers/rule_mover.rs:73 — RuleMover::run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_css_syntax · ×2
  • biome_css_syntax::property_syntax::matcher::matches_type (cyclomatic 24) crates/biome_css_syntax/src/property_syntax/matcher.rs:403 — biome_css_syntax::property_syntax::matcher::matches_type has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_css_syntax::property_syntax::matcher::matches_component (cyclomatic 16) crates/biome_css_syntax/src/property_syntax/matcher.rs:320 — biome_css_syntax::property_syntax::matcher::matches_component has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormatMdInlineItemList · ×2
  • FormatMdInlineItemList::fmt (cyclomatic 24) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:216 — FormatMdInlineItemList::fmt has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • FormatMdInlineItemList::fmt_inside_list (cyclomatic 16) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:373 — FormatMdInlineItemList::fmt_inside_list has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Lexer · ×2
  • Lexer::lex_number (cyclomatic 23) crates/biome_json_parser/src/lexer/mod.rs:386 — Lexer::lex_number has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • Lexer::lex_string_literal (cyclomatic 21) crates/biome_json_parser/src/lexer/mod.rs:525 — Lexer::lex_string_literal has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · StringificationAnalyzer · ×2
  • StringificationAnalyzer::base_stringification (cyclomatic 22) crates/biome_js_type_info/src/stringification.rs:265 — StringificationAnalyzer::base_stringification has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • StringificationAnalyzer::is_ignored_type (cyclomatic 18) crates/biome_js_type_info/src/stringification.rs:215 — StringificationAnalyzer::is_ignored_type has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · biome_package · ×2
  • biome_package::node_semver::range::parse_version_string (cyclomatic 22) crates/biome_package/src/node_semver/range.rs:484 — biome_package::node_semver::range::parse_version_string has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_package::node_semver::range::parse_hyphen_range (cyclomatic 16) crates/biome_package/src/node_semver/range.rs:612 — biome_package::node_semver::range::parse_hyphen_range has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Comparator::intersects (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · EmbeddedBindingsBuilder · ×2
  • EmbeddedBindingsBuilder::visit_define_props_call (cyclomatic 20) crates/biome_embeds/src/visitor.rs:1503 — EmbeddedBindingsBuilder::visit_define_props_call has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • EmbeddedBindingsBuilder::visit_js_export (cyclomatic 19) crates/biome_embeds/src/visitor.rs:1171 — EmbeddedBindingsBuilder::visit_js_export has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_grit_patterns · ×2
  • biome_grit_patterns::grit_query::extract_anchor_kinds (cyclomatic 20) crates/biome_grit_patterns/src/grit_query.rs:721 — biome_grit_patterns::grit_query::extract_anchor_kinds has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_grit_patterns::grit_binding::are_equivalent (cyclomatic 16) crates/biome_grit_patterns/src/grit_binding.rs:320 — biome_grit_patterns::grit_binding::are_equivalent has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Function · ×2
  • Function::evaluate (cyclomatic 20) crates/biome_js_analyze/src/lint/nursery/use_atomic_updates.rs:411 — Function::evaluate has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Function::check_writes (cyclomatic 17) crates/biome_js_analyze/src/lint/nursery/use_atomic_updates.rs:474 — Function::check_writes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_deserialize · ×2
  • biome_deserialize::yaml::block_scalar::block_scalar_value (cyclomatic 19) crates/biome_deserialize/src/yaml/block_scalar.rs:26 — biome_deserialize::yaml::block_scalar::block_scalar_value has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • biome_deserialize::json::unescape_json_string (cyclomatic 17) crates/biome_deserialize/src/json.rs:325 — biome_deserialize::json::unescape_json_string has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CssScanCursor · ×2
  • CssScanCursor::consume_scss_interpolation_in_raw_url (cyclomatic 17) crates/biome_css_parser/src/lexer/scan_cursor.rs:671 — CssScanCursor::consume_scss_interpolation_in_raw_url has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • CssScanCursor::is_ident_start_at (cyclomatic 16) crates/biome_css_parser/src/lexer/scan_cursor.rs:217 — CssScanCursor::is_ident_start_at has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UseConsistentObjectDefinitions · ×2
  • UseConsistentObjectDefinitions::run (cyclomatic 16) crates/biome_js_analyze/src/lint/style/use_consistent_object_definitions.rs:140 — UseConsistentObjectDefinitions::run has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • UseConsistentObjectDefinitions::action (cyclomatic 16) crates/biome_js_analyze/src/lint/style/use_consistent_object_definitions.rs:240 — UseConsistentObjectDefinitions::action has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality · No assertions · ×2
  • No assertions: wait crates/biome_js_analyze/tests/specs/suspicious/noPlaywrightWaitForTimeout/invalid/in-test.js:2 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: example crates/biome_js_analyze/tests/specs/suspicious/noPlaywrightPagePause/invalid/in-test.js:2 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · BatchMutation · ×2
  • BatchMutation::commit_with_text_range_and_edit (cognitive 83) crates/biome_rowan/src/ast/batch.rs:547 — BatchMutation::commit_with_text_range_and_edit has cognitive complexity 83 (threshold 15). Drivers by points: if/else 13 (43 pts), match/switch 4 (23 pts), loops 5 (15 pts), boolean chains 2 (nesting depth added 59). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • BatchMutation::remove_js_variable_declarator (cognitive 17) crates/biome_js_analyze/src/utils/batch.rs:194 — BatchMutation::remove_js_variable_declarator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_syntax_codegen · ×2
  • biome_syntax_codegen::generate_nodes::generate_nodes (cognitive 61) crates/biome_syntax_codegen/src/generate_nodes.rs:9 — biome_syntax_codegen::generate_nodes::generate_nodes has cognitive complexity 61 (threshold 15). Drivers by points: if/else 46 (56 pts), match/switch 4, boolean chains 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • biome_syntax_codegen::ast::check_unions (cognitive 16) crates/biome_syntax_codegen/src/ast.rs:79 — biome_syntax_codegen::ast::check_unions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_glob · ×2
  • biome_glob::editorconfig::convert_glob (cognitive 57) crates/biome_glob/src/editorconfig.rs:213 — biome_glob::editorconfig::convert_glob has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (33 pts), match/switch 5 (13 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_glob::validate_glob (cognitive 23) crates/biome_glob/src/lib.rs:651 — biome_glob::validate_glob has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseConsistentArrowReturn · ×2
  • UseConsistentArrowReturn::run (cognitive 56) crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs:74 — UseConsistentArrowReturn::run has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (48 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 35). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • UseConsistentArrowReturn::action (cognitive 20) crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs:174 — UseConsistentArrowReturn::action has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseExportType · ×2
  • UseExportType::run (cognitive 54) crates/biome_js_analyze/src/lint/style/use_export_type.rs:142 — UseExportType::run has cognitive complexity 54 (threshold 15). Drivers by points: if/else 25 (48 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UseExportType::action (cognitive 27) crates/biome_js_analyze/src/lint/style/use_export_type.rs:314 — UseExportType::action has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (10 pts), match/switch 3 (5 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RuleMover · ×2
  • RuleMover::run (cognitive 52) crates/biome_migrate/src/analyzers/rule_mover.rs:73 — RuleMover::run has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (43 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RuleMover::action (cognitive 50) crates/biome_migrate/src/analyzers/rule_mover.rs:211 — RuleMover::action has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (40 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUnusedImports · ×2
  • NoUnusedImports::action (cognitive 47) crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:282 — NoUnusedImports::action has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • NoUnusedImports::run (cognitive 16) crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:149 — NoUnusedImports::run has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseFilenamingConvention · ×2
  • UseFilenamingConvention::run (cognitive 45) crates/biome_js_analyze/src/lint/style/use_filenaming_convention.rs:156 — UseFilenamingConvention::run has cognitive complexity 45 (threshold 15). Drivers by points: if/else 25 (36 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UseFilenamingConvention::diagnostic (cognitive 23) crates/biome_js_analyze/src/lint/style/use_filenaming_convention.rs:276 — UseFilenamingConvention::diagnostic has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SemanticModelBuilder · ×2
  • SemanticModelBuilder::push_event (cognitive 44) crates/biome_js_semantic/src/semantic_model/builder.rs:173 — SemanticModelBuilder::push_event has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (38 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • SemanticModelBuilder::push_event (cognitive 39) crates/biome_css_semantic/src/semantic_model/builder.rs:158 — SemanticModelBuilder::push_event has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_rule_options · ×2
  • biome_rule_options::shared::restricted_regex::validate_restricted_regex (cognitive 43) crates/biome_rule_options/src/shared/restricted_regex.rs:152 — biome_rule_options::shared::restricted_regex::validate_restricted_regex has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 3 (11 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_rule_options::no_restricted_imports::get_context_for_import_call (cognitive 20) crates/biome_rule_options/src/no_restricted_imports.rs:534 — biome_rule_options::no_restricted_imports::get_context_for_import_call has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 2 (7 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FitsMeasurer · ×2
  • FitsMeasurer::fits_element (cognitive 42) crates/biome_formatter/src/printer/mod.rs:1289 — FitsMeasurer::fits_element has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (29 pts), match/switch 6 (12 pts), boolean chains 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • FitsMeasurer::fits_text (cognitive 20) crates/biome_formatter/src/printer/mod.rs:1565 — FitsMeasurer::fits_text has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_grit_parser · ×2
  • biome_grit_parser::parser::patterns::parse_pattern_with_precedence (cognitive 41) crates/biome_grit_parser/src/parser/patterns.rs:20 — biome_grit_parser::parser::patterns::parse_pattern_with_precedence has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 9 (24 pts), if/else 8 (9 pts), boolean chains 7, loops 1 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_grit_parser::parser::parse_version (cognitive 16) crates/biome_grit_parser/src/parser/mod.rs:98 — biome_grit_parser::parser::parse_version has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StringificationAnalyzer · ×2
  • StringificationAnalyzer::base_stringification (cognitive 40) crates/biome_js_type_info/src/stringification.rs:265 — StringificationAnalyzer::base_stringification has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (26 pts), match/switch 4 (12 pts), boolean chains 1, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • StringificationAnalyzer::analyze (cognitive 19) crates/biome_js_type_info/src/stringification.rs:49 — StringificationAnalyzer::analyze has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatJsAnyConditionalRule · ×2
  • FormatJsAnyConditionalRule::should_extra_indent (cognitive 35) crates/biome_js_formatter/src/utils/conditional.rs:298 — FormatJsAnyConditionalRule::should_extra_indent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 5 (8 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FormatJsAnyConditionalRule::fmt (cognitive 27) crates/biome_js_formatter/src/utils/conditional.rs:57 — FormatJsAnyConditionalRule::fmt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 7, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JsModuleInfoCollector · ×2
  • JsModuleInfoCollector::infer_type (cognitive 35) crates/biome_module_graph/src/js_module_info/collector.rs:461 — JsModuleInfoCollector::infer_type has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (23 pts), match/switch 3 (9 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JsModuleInfoCollector::collect_exports_from (cognitive 34) crates/biome_module_graph/src/js_module_info/collector.rs:684 — JsModuleInfoCollector::collect_exports_from has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 2 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsModuleVisitor · ×2
  • JsModuleVisitor::visit_binding_pattern (cognitive 35) crates/biome_module_graph/src/js_module_info/visitor.rs:431 — JsModuleVisitor::visit_binding_pattern has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • JsModuleVisitor::collect_info (cognitive 17) crates/biome_module_graph/src/js_module_info/visitor.rs:47 — JsModuleVisitor::collect_info has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigurationExtendsLoader · ×2
  • ConfigurationExtendsLoader::collect_manifest_configs (cognitive 35) crates/biome_service/src/configuration.rs:940 — ConfigurationExtendsLoader::collect_manifest_configs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ConfigurationExtendsLoader::resolve_extended_configuration (cognitive 16) crates/biome_service/src/configuration.rs:766 — ConfigurationExtendsLoader::resolve_extended_configuration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (6 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoVoidElementsWithChildren · ×2
  • NoVoidElementsWithChildren::action (cognitive 32) crates/biome_js_analyze/src/lint/correctness/no_void_elements_with_children.rs:209 — NoVoidElementsWithChildren::action has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 3, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NoVoidElementsWithChildren::run (cognitive 19) crates/biome_js_analyze/src/lint/correctness/no_void_elements_with_children.rs:108 — NoVoidElementsWithChildren::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CodeSpanNormalization · ×2
  • CodeSpanNormalization::fmt (cognitive 32) crates/biome_markdown_formatter/src/markdown/auxiliary/inline_code.rs:276 — CodeSpanNormalization::fmt has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 5, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CodeSpanNormalization::shortest_unused_backtick_sequence_len (cognitive 24) crates/biome_markdown_formatter/src/markdown/auxiliary/inline_code.rs:155 — CodeSpanNormalization::shortest_unused_backtick_sequence_len has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (7 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_package · ×2
  • biome_package::node_semver::range::parse_version_string (cognitive 31) crates/biome_package/src/node_semver/range.rs:484 — biome_package::node_semver::range::parse_version_string has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 6 (17 pts), if/else 10 (14 pts) (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_package::node_semver::range::parse_hyphen_range (cognitive 20) crates/biome_package/src/node_semver/range.rs:612 — biome_package::node_semver::range::parse_hyphen_range has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 9 (19 pts), if/else 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OverridePattern · ×2
  • OverridePattern::apply_to_configuration (cognitive 30) crates/biome_configuration/src/overrides.rs:112 — OverridePattern::apply_to_configuration has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25 (27 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • OverridePattern::try_from (cognitive 19) crates/biome_cli/src/execute/migrate/prettier.rs:346 — OverridePattern::try_from has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GlobalBuilder · ×2
  • GlobalBuilder::try_lower_member (cognitive 29) xtask/codegen/src/generate_global_types/lower/generic.rs:412 — GlobalBuilder::try_lower_member has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 7 (14 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • GlobalBuilder::try_lower_type (cognitive 17) xtask/codegen/src/generate_global_types/lower/generic.rs:856 — GlobalBuilder::try_lower_type has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), match/switch 3 (6 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Case · ×2
  • Case::convert (cognitive 28) crates/biome_string_case/src/lib.rs:203 — Case::convert has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 6, match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Case::identify (cognitive 27) crates/biome_string_case/src/lib.rs:114 — Case::identify has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 6 (17 pts), if/else 7, boolean chains 2, loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_deserialize · ×2
  • biome_deserialize::json::unescape_json_string (cognitive 26) crates/biome_deserialize/src/json.rs:325 — biome_deserialize::json::unescape_json_string has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (12 pts), loops 1 (2 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • biome_deserialize::yaml::block_scalar::block_scalar_value (cognitive 22) crates/biome_deserialize/src/yaml/block_scalar.rs:26 — biome_deserialize::yaml::block_scalar::block_scalar_value has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 5 (7 pts), boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Accesses · ×2
  • Accesses::add_binding (cognitive 26) crates/biome_js_analyze/src/lint/nursery/no_useless_assignment.rs:297 — Accesses::add_binding has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, loops 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Accesses::live_before (cognitive 24) crates/biome_js_analyze/src/lint/nursery/no_useless_assignment.rs:447 — Accesses::live_before has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 3 (9 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · biome_markdown_formatter · ×2
  • biome_markdown_formatter::markdown::lists::inline_item_list::outdented_list_marker_lines (cognitive 25) crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs:65 — biome_markdown_formatter::markdown::lists::inline_item_list::outdented_list_marker_lines has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_markdown_formatter::quote::block_list_has_quote_continuation (cognitive 21) crates/biome_markdown_formatter/src/quote.rs:540 — biome_markdown_formatter::quote::block_list_has_quote_continuation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseConsistentObjectDefinitions · ×2
  • UseConsistentObjectDefinitions::run (cognitive 24) crates/biome_js_analyze/src/lint/style/use_consistent_object_definitions.rs:140 — UseConsistentObjectDefinitions::run has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 9 (16 pts), if/else 3 (8 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • UseConsistentObjectDefinitions::action (cognitive 17) crates/biome_js_analyze/src/lint/style/use_consistent_object_definitions.rs:240 — UseConsistentObjectDefinitions::action has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InspectedConfigurationFiles · ×2
  • InspectedConfigurationFiles::composite_sources (cognitive 23) crates/biome_cli/src/commands/inspect/config/configuration.rs:318 — InspectedConfigurationFiles::composite_sources has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InspectedConfigurationFiles::indexed_source (cognitive 19) crates/biome_cli/src/commands/inspect/config/configuration.rs:400 — InspectedConfigurationFiles::indexed_source has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CognitiveComplexityVisitor · ×2
  • CognitiveComplexityVisitor::on_enter (cognitive 23) crates/biome_js_analyze/src/lint/complexity/no_excessive_cognitive_complexity.rs:198 — CognitiveComplexityVisitor::on_enter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (23 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CognitiveComplexityVisitor::on_leave (cognitive 16) crates/biome_js_analyze/src/lint/complexity/no_excessive_cognitive_complexity.rs:257 — CognitiveComplexityVisitor::on_leave has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_resolver · ×2
  • biome_resolver::resolve_package_path (cognitive 23) crates/biome_resolver/src/lib.rs:869 — biome_resolver::resolve_package_path has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (6 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • biome_resolver::resolve_dependency (cognitive 19) crates/biome_resolver/src/lib.rs:794 — biome_resolver::resolve_dependency has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 2 (5 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TypeMember · ×2
  • TypeMember::collect_class_members (cognitive 22) crates/biome_js_type_info/src/local_inference.rs:2778 — TypeMember::collect_class_members has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, match/switch 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TypeMember::members_from_class_member_list (cognitive 18) crates/biome_js_type_info/src/local_inference.rs:2742 — TypeMember::members_from_class_member_list has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Encoder · ×2
  • Encoder::encode (cognitive 20) crates/biome_css_syntax/src/property_syntax/parser.rs:69 — Encoder::encode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Encoder::consume_type (cognitive 16) crates/biome_css_syntax/src/property_syntax/parser.rs:207 — Encoder::consume_type has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_embeds · ×2
  • biome_embeds::references::vue_directive_name_matches_reference_name (cognitive 20) crates/biome_embeds/src/references.rs:156 — biome_embeds::references::vue_directive_name_matches_reference_name has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_embeds::data::vue_directive_name_matches_option_name (cognitive 19) crates/biome_embeds/src/data.rs:258 — biome_embeds::data::vue_directive_name_matches_option_name has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GritQuery · ×2
  • GritQuery::find_matches (cognitive 20) crates/biome_grit_patterns/src/grit_query.rs:142 — GritQuery::find_matches has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • GritQuery::execute_optimized (cognitive 18) crates/biome_grit_patterns/src/grit_query.rs:237 — GritQuery::execute_optimized has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoAstroConflictingSetDirectives · ×2
  • NoAstroConflictingSetDirectives::run (cognitive 20) crates/biome_js_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:61 — NoAstroConflictingSetDirectives::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NoAstroConflictingSetDirectives::run (cognitive 17) crates/biome_html_analyze/src/lint/nursery/no_astro_conflicting_set_directives.rs:66 — NoAstroConflictingSetDirectives::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LintAssistProcessFile · ×2
  • LintAssistProcessFile::process_std_in (cognitive 19) crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:126 — LintAssistProcessFile::process_std_in has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • LintAssistProcessFile::process_file (cognitive 18) crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:21 — LintAssistProcessFile::process_file has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FormatGraphqlVerbatimNode · ×2
  • FormatGraphqlVerbatimNode::fmt (cognitive 19) crates/biome_graphql_formatter/src/verbatim.rs:45 — FormatGraphqlVerbatimNode::fmt has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 8, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • FormatGraphqlVerbatimNode::fmt (cognitive 19) crates/biome_grit_formatter/src/verbatim.rs:45 — FormatGraphqlVerbatimNode::fmt has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 8, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ReactComponentInfo · ×2
  • ReactComponentInfo::from_function (cognitive 19) crates/biome_js_analyze/src/react/components.rs:322 — ReactComponentInfo::from_function has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ReactComponentInfo::from_declaration (cognitive 18) crates/biome_js_analyze/src/react/components.rs:128 — ReactComponentInfo::from_declaration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_css_parser · ×2
  • biome_css_parser::syntax::at_rule::supports::parse_scss_interpolated_supports_in_parens (cognitive 18) crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:413 — biome_css_parser::syntax::at_rule::supports::parse_scss_interpolated_supports_in_parens has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • biome_css_parser::syntax::property::unicode_range::parse_unicode_range (cognitive 16) crates/biome_css_parser/src/syntax/property/unicode_range.rs:48 — biome_css_parser::syntax::property::unicode_range::parse_unicode_range has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentsBuilderVisitor · ×2
  • CommentsBuilderVisitor::flush_comments (cognitive 18) crates/biome_formatter/src/comments/builder.rs:335 — CommentsBuilderVisitor::flush_comments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CommentsBuilderVisitor::normalize_placement_into_formatted_tree (cognitive 17) crates/biome_formatter/src/comments/builder.rs:413 — CommentsBuilderVisitor::normalize_placement_into_formatted_tree has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_json_analyze · ×2
  • biome_json_analyze::assist::source::use_sorted_package_json::sorters::prettier_config::transform (cognitive 18) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/prettier_config.rs:7 — biome_json_analyze::assist::source::use_sorted_package_json::sorters::prettier_config::transform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_json_analyze::assist::source::use_sorted_package_json::sorters::scripts::get_all_script_values (cognitive 17) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/scripts.rs:98 — biome_json_analyze::assist::source::use_sorted_package_json::sorters::scripts::get_all_script_values has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_migrate · ×2
  • biome_migrate::analyzers::tailwind_options::take_tailwind_options (cognitive 18) crates/biome_migrate/src/analyzers/tailwind_options.rs:153 — biome_migrate::analyzers::tailwind_options::take_tailwind_options has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • biome_migrate::analyzers::includes::to_biome_glob (cognitive 17) crates/biome_migrate/src/analyzers/includes.rs:254 — biome_migrate::analyzers::includes::to_biome_glob has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyntaxNode · ×2
  • SyntaxNode::edge_token (cognitive 18) crates/biome_rowan/src/cursor/node.rs:377 — SyntaxNode::edge_token has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 3 (6 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SyntaxNode::token_at_offset (cognitive 16) crates/biome_rowan/src/cursor/node.rs:485 — SyntaxNode::token_at_offset has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ProcessFixAll · ×2
  • ProcessFixAll::collect_signal (cognitive 18) crates/biome_service/src/file_handlers/mod.rs:855 — ProcessFixAll::collect_signal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ProcessFixAll::collect_signal_fixes_only (cognitive 16) crates/biome_service/src/file_handlers/mod.rs:908 — ProcessFixAll::collect_signal_fixes_only has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (37 shared lines) · ×2
  • Near-duplicate member pair (37 shared lines) crates/biome_js_transform/src/lib.rs:45 — crates/biome_js_transform/src/lib.rs:45-126 | crates/biome_migrate/src/lib.rs:49-122 — These two members are variants of one another: 37 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (37 shared lines) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:23 — crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:23-168 | crates/biome_markdown_formatter/src/quote.rs:96-260 — These two members are variants of one another: 37 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×2
  • Edited copy of a member (58 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_restricted_dependencies.rs:89 — crates/biome_js_analyze/src/lint/nursery/no_restricted_dependencies.rs:89-146 | crates/biome_json_analyze/src/lint/nursery/no_restricted_dependencies.rs:88-148 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (58 corresponding lines) crates/biome_markdown_parser/src/to_html.rs:75 — crates/biome_markdown_parser/src/to_html.rs:75-132 | crates/biome_markdown_syntax/src/block_ext.rs:172-231 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (61 corresponding lines) · ×2
  • Edited copy of a member (61 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_valid_aria_values.rs:109 — crates/biome_html_analyze/src/lint/a11y/use_valid_aria_values.rs:109-169 | crates/biome_js_analyze/src/lint/a11y/use_valid_aria_values.rs:96-188 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (61 corresponding lines) crates/biome_grit_parser/src/lexer/mod.rs:984 — crates/biome_grit_parser/src/lexer/mod.rs:984-1044 | crates/biome_json_parser/src/lexer/mod.rs:750-821 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (63 corresponding lines) · ×2
  • Edited copy of a member (63 corresponding lines) crates/biome_cli/src/commands/check.rs:252 — crates/biome_cli/src/commands/check.rs:252-316 | crates/biome_cli/src/commands/ci.rs:175-237 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (63 corresponding lines) crates/biome_js_analyze/src/lint/style/use_export_type.rs:524 — crates/biome_js_analyze/src/lint/style/use_export_type.rs:524-588 | crates/biome_js_analyze/src/lint/style/use_import_type.rs:849-911 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×2
  • Edited copy of a member (40 corresponding lines) crates/biome_service/src/file_handlers/javascript.rs:1094 — crates/biome_service/src/file_handlers/javascript.rs:1094-1154 | crates/biome_service/src/file_handlers/javascript.rs:1160-1199 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (40 corresponding lines) crates/biome_html_analyze/src/lint/a11y/use_aria_props_supported_by_role.rs:52 — crates/biome_html_analyze/src/lint/a11y/use_aria_props_supported_by_role.rs:52-96 | crates/biome_js_analyze/src/lint/a11y/use_aria_props_supported_by_role.rs:58-97 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×2
  • Edited copy of a member (42 corresponding lines) crates/biome_js_parser/src/syntax/pattern.rs:55 — crates/biome_js_parser/src/syntax/pattern.rs:55-96 | crates/biome_js_parser/src/syntax/pattern.rs:147-195 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) crates/biome_module_graph/src/db/type_inference/imports.rs:134 — crates/biome_module_graph/src/db/type_inference/imports.rs:134-175 | crates/biome_module_graph/src/db/type_inference/imports.rs:909-959 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 28+ corresponding lines) crates/biome_html_parser/src/syntax/vue.rs:26 — crates/biome_html_parser/src/syntax/vue.rs:26-63 | crates/biome_html_parser/src/syntax/vue.rs:87-114 | crates/biome_html_parser/src/syntax/vue.rs:116-143 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 28+ corresponding lines) crates/biome_js_analyze/src/utils/batch.rs:295 — crates/biome_js_analyze/src/utils/batch.rs:295-322 | crates/biome_js_analyze/src/utils/batch.rs:331-360 | crates/biome_js_analyze/src/utils/batch.rs:369-402 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 34+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 34+ corresponding lines) crates/biome_service/src/file_handlers/graphql.rs:221 — crates/biome_service/src/file_handlers/graphql.rs:221-259 | crates/biome_service/src/file_handlers/md.rs:158-192 | crates/biome_service/src/file_handlers/yaml.rs:114-147 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 34+ corresponding lines) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:87 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:87-120 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_once.rs:88-121 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_pre.rs:88-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 23+ corresponding lines) crates/biome_graphql_formatter/src/graphql/extensions/interface_type_extension.rs:12 — crates/biome_graphql_formatter/src/graphql/extensions/interface_type_extension.rs:12-44 | crates/biome_graphql_formatter/src/graphql/extensions/object_type_extension.rs:12-44 | crates/biome_js_formatter/src/ts/bindings/type_parameter.rs:10-32 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 23+ corresponding lines) crates/biome_graphql_formatter/src/graphql/definitions/input_value_definition.rs:12 — crates/biome_graphql_formatter/src/graphql/definitions/input_value_definition.rs:12-37 | crates/biome_graphql_formatter/src/graphql/definitions/variable_definition.rs:12-37 | crates/biome_js_formatter/src/ts/module/import_type.rs:10-32 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 26+ corresponding lines) · ×2
  • Edited copies of one member (8 members, 26+ corresponding lines) crates/biome_service/src/file_handlers/css.rs:312 — crates/biome_service/src/file_handlers/css.rs:312-337 | crates/biome_service/src/file_handlers/graphql.rs:300-325 | crates/biome_service/src/file_handlers/grit.rs:197-222 | crates/biome_service/src/file_handlers/html.rs:457-482 | crates/biome_service/src/file_handlers/javascript.rs:514-539 | crates/biome_service/src/file_handlers/json.rs:320-345 | crates/biome_service/src/file_handlers/md.rs:234-259 | crates/biome_service/src/file_handlers/yaml.rs:189-214 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
  • Edited copies of one member (8 members, 26+ corresponding lines) crates/biome_service/src/file_handlers/css.rs:339 — crates/biome_service/src/file_handlers/css.rs:339-364 | crates/biome_service/src/file_handlers/graphql.rs:327-352 | crates/biome_service/src/file_handlers/grit.rs:224-249 | crates/biome_service/src/file_handlers/html.rs:484-509 | crates/biome_service/src/file_handlers/javascript.rs:541-566 | crates/biome_service/src/file_handlers/json.rs:347-372 | crates/biome_service/src/file_handlers/md.rs:261-286 | crates/biome_service/src/file_handlers/yaml.rs:216-241 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 22+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 22+ corresponding lines) crates/biome_html_formatter/src/svelte/auxiliary/else_clause.rs:9 — crates/biome_html_formatter/src/svelte/auxiliary/else_clause.rs:9-30 | crates/biome_html_formatter/src/svelte/auxiliary/else_if_clause.rs:9-37 | crates/biome_html_formatter/src/svelte/auxiliary/if_opening_block.rs:9-34 | crates/biome_html_formatter/src/svelte/auxiliary/snippet_opening_block.rs:13-38 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 22+ corresponding lines) crates/biome_graphql_analyze/src/lint/correctness/use_lone_anonymous_operation.rs:100 — crates/biome_graphql_analyze/src/lint/correctness/use_lone_anonymous_operation.rs:100-124 | crates/biome_graphql_analyze/src/lint/style/use_lone_executable_definition.rs:109-130 | crates/biome_js_analyze/src/lint/style/use_consistent_enum_value_type.rs:139-160 | crates/biome_js_analyze/src/lint/suspicious/no_duplicate_enum_values.rs:158-179 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 13+ corresponding lines) xtask/codegen/src/generate_global_types/compare.rs:515 — xtask/codegen/src/generate_global_types/compare.rs:515-533 | xtask/codegen/src/generate_global_types/compare.rs:536-548 | xtask/codegen/src/generate_global_types/compare.rs:551-563 | xtask/codegen/src/generate_global_types/compare.rs:566-578 | xtask/codegen/src/generate_global_types/compare.rs:581-593 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 13+ corresponding lines) crates/biome_grit_parser/src/parser/literals.rs:190 — crates/biome_grit_parser/src/parser/literals.rs:190-202 | crates/biome_grit_parser/src/parser/patterns.rs:841-855 | crates/biome_grit_parser/src/parser/patterns.rs:858-872 | crates/biome_grit_parser/src/parser/patterns.rs:932-945 | crates/biome_grit_parser/src/parser/patterns.rs:968-983 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 17+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 17+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:285 — crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:285-304 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:445-463 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:601-620 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:782-798 | crates/biome_css_parser/src/syntax/at_rule/import.rs:197-216 | crates/biome_css_parser/src/syntax/value/if.rs:230-250 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 17+ corresponding lines) crates/biome_grit_parser/src/parser/patterns.rs:227 — crates/biome_grit_parser/src/parser/patterns.rs:227-244 | crates/biome_grit_parser/src/parser/patterns.rs:711-728 | crates/biome_grit_parser/src/parser/patterns.rs:731-748 | crates/biome_grit_parser/src/parser/patterns.rs:804-820 | crates/biome_grit_parser/src/parser/patterns.rs:889-907 | crates/biome_grit_parser/src/parser/patterns.rs:948-965 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 14+ corresponding lines) crates/biome_css_formatter/src/css/lists/attr_name_list.rs:13 — crates/biome_css_formatter/src/css/lists/attr_name_list.rs:13-26 | crates/biome_css_formatter/src/css/lists/syntax_component_list.rs:11-24 | crates/biome_graphql_formatter/src/graphql/lists/union_member_type_list.rs:12-25 | crates/biome_js_formatter/src/ts/lists/union_type_variant_list.rs:60-75 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 14+ corresponding lines) crates/biome_grit_parser/src/parser/patterns.rs:131 — crates/biome_grit_parser/src/parser/patterns.rs:131-144 | crates/biome_grit_parser/src/parser/patterns.rs:200-213 | crates/biome_grit_parser/src/parser/patterns.rs:287-304 | crates/biome_grit_parser/src/parser/patterns.rs:307-320 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 12+ corresponding lines) crates/biome_html_parser/src/syntax/svelte.rs:862 — crates/biome_html_parser/src/syntax/svelte.rs:862-874 | crates/biome_html_parser/src/syntax/svelte.rs:903-914 | crates/biome_html_parser/src/syntax/svelte.rs:916-927 | crates/biome_html_parser/src/syntax/svelte.rs:929-940 | crates/biome_html_parser/src/syntax/svelte.rs:957-968 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 12+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/composes_import_specifier.rs:12 — crates/biome_css_formatter/src/css/auxiliary/composes_import_specifier.rs:12-24 | crates/biome_css_formatter/src/css/auxiliary/supports_not_condition.rs:8-19 | crates/biome_css_formatter/src/css/auxiliary/value_at_rule_import_clause.rs:12-29 | crates/biome_css_formatter/src/scss/auxiliary/forward_as_clause.rs:9-25 | crates/biome_css_formatter/src/scss/auxiliary/use_as_clause.rs:9-23 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 17+ corresponding lines) crates/biome_js_parser/src/lexer/mod.rs:1915 — crates/biome_js_parser/src/lexer/mod.rs:1915-1931 | crates/biome_js_parser/src/lexer/mod.rs:1964-1980 | crates/biome_js_parser/src/lexer/mod.rs:1983-1999 | crates/biome_js_parser/src/lexer/mod.rs:2002-2018 | crates/biome_js_parser/src/lexer/mod.rs:2046-2062 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 17+ corresponding lines) crates/biome_css_formatter/src/scss/auxiliary/module_configuration_list.rs:14 — crates/biome_css_formatter/src/scss/auxiliary/module_configuration_list.rs:14-30 | crates/biome_graphql_formatter/src/graphql/value/object_value.rs:8-26 | crates/biome_js_formatter/src/js/statements/with_statement.rs:12-32 | crates/biome_js_formatter/src/ts/auxiliary/call_signature_type_member.rs:15-34 | crates/biome_json_formatter/src/json/auxiliary/member.rs:9-25 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 12+ corresponding lines) crates/biome_graphql_parser/src/parser/definitions/enum.rs:19 — crates/biome_graphql_parser/src/parser/definitions/enum.rs:19-35 | crates/biome_graphql_parser/src/parser/definitions/input_object.rs:20-36 | crates/biome_graphql_parser/src/parser/definitions/interface.rs:27-46 | crates/biome_graphql_parser/src/parser/definitions/object.rs:17-35 | crates/biome_graphql_parser/src/parser/definitions/scalar.rs:15-26 | crates/biome_graphql_parser/src/parser/definitions/union.rs:24-40 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 12+ corresponding lines) crates/biome_lsp/src/session.rs:844 — crates/biome_lsp/src/session.rs:844-855 | crates/biome_lsp/src/session.rs:858-869 | crates/biome_lsp/src/session.rs:872-883 | crates/biome_lsp/src/session.rs:886-897 | crates/biome_lsp/src/session.rs:900-911 | crates/biome_lsp/src/session.rs:937-948 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 8+ corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_eager_array_methods_in_loops.rs:386 — crates/biome_js_analyze/src/lint/nursery/no_eager_array_methods_in_loops.rs:386-394 | crates/biome_js_analyze/src/lint/nursery/no_invalid_fetch_options.rs:316-324 | crates/biome_js_analyze/src/lint/nursery/no_unreadable_for_of_expression.rs:350-358 | crates/biome_js_analyze/src/lint/nursery/use_global_regex_in_match_all.rs:189-198 | crates/biome_js_analyze/src/lint/nursery/use_math_trunc.rs:403-410 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 8+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/feature.rs:473 — crates/biome_css_parser/src/syntax/at_rule/feature.rs:473-483 | crates/biome_css_parser/src/syntax/at_rule/keyframes.rs:641-650 | crates/biome_css_parser/src/syntax/property/mod.rs:598-606 | crates/biome_css_parser/src/syntax/value/type.rs:194-202 | crates/biome_graphql_parser/src/parser/value.rs:171-178 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×2
  • Duplicated block (59 lines × 2) crates/biome_syntax_codegen/src/ast.rs:253 — crates/biome_syntax_codegen/src/ast.rs:253-311 | xtask/codegen/src/ast.rs:291-349 — before extracting anything, compare `crates/biome_syntax_codegen/src/ast.rs` and `xtask/codegen/src/ast.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 344 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (59 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:241 — crates/biome_syntax_codegen/src/generate_nodes.rs:241-299 | xtask/codegen/src/generate_nodes.rs:273-331 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:241` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_syntax_codegen/src/generate_nodes.rs:300` calls `debug_struct`, `finish` and `xtask/codegen/src/generate_nodes.rs:333` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×2
  • Duplicated block (50 lines × 2) crates/biome_syntax_codegen/src/generate_syntax_factory.rs:48 — crates/biome_syntax_codegen/src/generate_syntax_factory.rs:48-97 | xtask/codegen/src/generate_syntax_factory.rs:39-88 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_syntax_factory.rs` and `xtask/codegen/src/generate_syntax_factory.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_syntax_factory.rs:48` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (50 lines × 2) crates/biome_html_analyze/src/services/aria.rs:16 — crates/biome_html_analyze/src/services/aria.rs:16-65 | crates/biome_js_analyze/src/services/aria.rs:16-66 — before extracting anything, compare `crates/biome_html_analyze/src/services/aria.rs` and `crates/biome_js_analyze/src/services/aria.rs` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/services/aria.rs:16` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (48 lines × 2) · ×2
  • Duplicated block (48 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:215 — crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:215-262 | crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs:217-264 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs` and `crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:215` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (48 lines × 2) crates/biome_syntax_codegen/src/ast.rs:81 — crates/biome_syntax_codegen/src/ast.rs:81-128 | xtask/codegen/src/ast.rs:131-178 — before extracting anything, compare `crates/biome_syntax_codegen/src/ast.rs` and `xtask/codegen/src/ast.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 344 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×2
  • Duplicated block (47 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_valid_lang.rs:149 — crates/biome_html_analyze/src/lint/a11y/use_valid_lang.rs:149-195 | crates/biome_js_analyze/src/lint/a11y/use_valid_lang.rs:145-191 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (47 lines × 2) crates/biome_syntax_codegen/src/generate_syntax_factory.rs:112 — crates/biome_syntax_codegen/src/generate_syntax_factory.rs:112-158 | xtask/codegen/src/generate_syntax_factory.rs:101-147 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_syntax_factory.rs` and `xtask/codegen/src/generate_syntax_factory.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_syntax_factory.rs:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×2
  • Duplicated block (46 lines × 2) crates/biome_cli/src/reporter/summary.rs:93 — crates/biome_cli/src/reporter/summary.rs:93-138 | crates/biome_cli/src/reporter/terminal.rs:87-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (46 lines × 2) crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:79 — crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:79-124 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs:80-125 — before extracting anything, compare `crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs` and `crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×2
  • Duplicated block (45 lines × 2) crates/biome_syntax_codegen/src/ast.rs:424 — crates/biome_syntax_codegen/src/ast.rs:424-468 | xtask/codegen/src/ast.rs:462-506 — before extracting anything, compare `crates/biome_syntax_codegen/src/ast.rs` and `xtask/codegen/src/ast.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 344 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (45 lines × 2) crates/biome_configuration/src/css.rs:163 — crates/biome_configuration/src/css.rs:163-215 | crates/biome_configuration/src/graphql.rs:115-159 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/css.rs:163` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×2
  • Duplicated block (40 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:174 — crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:174-213 | crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs:176-215 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs` and `crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:216` calls `write_markup` and `crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs:216` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (40 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:202 — crates/biome_syntax_codegen/src/generate_nodes.rs:202-241 | xtask/codegen/src/generate_nodes.rs:213-252 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:202` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×2
  • Duplicated block (37 lines × 2) crates/biome_syntax_codegen/src/ast.rs:375 — crates/biome_syntax_codegen/src/ast.rs:375-411 | xtask/codegen/src/ast.rs:413-449 — before extracting anything, compare `crates/biome_syntax_codegen/src/ast.rs` and `xtask/codegen/src/ast.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 344 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/ast.rs:375` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (37 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:472 — crates/biome_syntax_codegen/src/generate_nodes.rs:472-508 | xtask/codegen/src/generate_nodes.rs:504-540 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×2
  • Duplicated block (30 lines × 2) crates/biome_html_formatter/src/html/lists/element_list.rs:1053 — crates/biome_html_formatter/src/html/lists/element_list.rs:1053-1082 | crates/biome_html_formatter/src/html/lists/element_list.rs:1107-1136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_formatter/src/html/lists/element_list.rs:1107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (30 lines × 2) crates/biome_js_formatter/src/js/module/import_default_clause.rs:13 — crates/biome_js_formatter/src/js/module/import_default_clause.rs:13-42 | crates/biome_js_formatter/src/js/module/import_namespace_clause.rs:13-42 — before extracting anything, compare `crates/biome_js_formatter/src/js/module/import_default_clause.rs` and `crates/biome_js_formatter/src/js/module/import_namespace_clause.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/module/import_default_clause.rs:13` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsImportDefaultClause` in one and `&JsImportNamespaceClause` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×2
  • Duplicated block (26–27 lines × 2) crates/biome_cli/src/runner/impls/process_file/check.rs:50 — crates/biome_cli/src/runner/impls/process_file/check.rs:50-75 | crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:65-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/runner/impls/process_file/check.rs:50` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_cli/src/runner/impls/process_file/check.rs:49` calls `supports_format` and `crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs:64` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (26–27 lines × 2) crates/biome_css_parser/src/syntax/selector/pseudo_class/function_selector.rs:68 — crates/biome_css_parser/src/syntax/selector/pseudo_class/function_selector.rs:68-93 | crates/biome_css_parser/src/syntax/selector/pseudo_class/function_selector_list.rs:26-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_parser/src/syntax/selector/pseudo_class/function_selector_list.rs:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×2
  • Duplicated block (23–24 lines × 2) crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:383 — crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:383-405 | crates/biome_js_analyze/src/utils/function_return.rs:24-47 — before extracting anything, compare `crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs` and `crates/biome_js_analyze/src/utils/function_return.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:383` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23–24 lines × 2) crates/biome_js_analyze/src/utils/batch.rs:128 — crates/biome_js_analyze/src/utils/batch.rs:128-150 | crates/biome_js_analyze/src/utils/batch.rs:168-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/utils/batch.rs:128` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×2
  • Duplicated block (18–20 lines × 2) crates/biome_cli/src/service/unix.rs:180 — crates/biome_cli/src/service/unix.rs:180-199 | crates/biome_cli/src/service/windows.rs:79-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (18–20 lines × 2) crates/biome_markdown_parser/src/to_html.rs:265 — crates/biome_markdown_parser/src/to_html.rs:265-284 | crates/biome_ruledoc/src/lower.rs:160-177 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/to_html.rs:265` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×2
  • Duplicated block (18–19 lines × 3) crates/biome_grit_formatter/src/grit/declarations/function_definition.rs:9 — crates/biome_grit_formatter/src/grit/declarations/function_definition.rs:9-27 | crates/biome_grit_formatter/src/grit/declarations/javascript_function_definition.rs:14-31 | crates/biome_grit_formatter/src/grit/predicates/predicate_definition.rs:13-30 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/declarations/function_definition.rs:9` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritFunctionDefinition` in one and `&GritJavascriptFunctionDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18–19 lines × 3) crates/biome_service/src/workspace/server.rs:3338 — crates/biome_service/src/workspace/server.rs:3338-3356 | crates/biome_service/src/workspace/server.rs:4183-4200 | crates/biome_service/src/workspace/server.rs:4224-4242 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/workspace/server.rs:3338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `params` to `GetFormatterIRParams` in one and `FormatRangeParams` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (16–18 lines × 4) · ×2
  • Duplicated block (16–18 lines × 4) crates/biome_css_analyze/src/suppression_action.rs:14 — crates/biome_css_analyze/src/suppression_action.rs:14-29 | crates/biome_graphql_analyze/src/suppression_action.rs:18-35 | crates/biome_html_analyze/src/suppression_action.rs:14-31 | crates/biome_yaml_analyze/src/suppression_action.rs:18-35 — before extracting anything, compare `crates/biome_css_analyze/src/suppression_action.rs` and `crates/biome_html_analyze/src/suppression_action.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `token` to `CssSyntaxToken` in one and `GraphqlSyntaxToken` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16–18 lines × 4) crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:346 — crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:346-361 | crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs:159-174 | crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:394-411 | crates/biome_js_analyze/src/utils/function_return.rs:36-53 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs` and `crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:346` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×2
  • Duplicated block (16–18 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:154 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:154-169 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:133-150 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs` and `crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:154` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16–18 lines × 2) crates/biome_js_semantic/src/events.rs:908 — crates/biome_js_semantic/src/events.rs:908-923 | crates/biome_js_semantic/src/events.rs:928-945 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_semantic/src/events.rs:908` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×2
  • Duplicated block (16 lines × 4) crates/biome_css_formatter/src/css/auxiliary/document_custom_matcher.rs:14 — crates/biome_css_formatter/src/css/auxiliary/document_custom_matcher.rs:14-29 | crates/biome_css_formatter/src/css/auxiliary/keyframes_scope_function.rs:14-29 | crates/biome_css_formatter/src/css/auxiliary/url_function.rs:11-26 | crates/biome_css_formatter/src/css/selectors/attribute_selector.rs:10-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/document_custom_matcher.rs:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssDocumentCustomMatcher` in one and `&CssKeyframesScopeFunction` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_css_formatter/src/css/auxiliary/document_custom_matcher.rs:30` calls `format`, `with_text_case` and `crates/biome_css_formatter/src/css/selectors/attribute_selector.rs:26` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 4) crates/biome_graphql_formatter/src/graphql/auxiliary/root_operation_types.rs:12 — crates/biome_graphql_formatter/src/graphql/auxiliary/root_operation_types.rs:12-27 | crates/biome_graphql_formatter/src/graphql/auxiliary/selection_set.rs:8-23 | crates/biome_graphql_formatter/src/graphql/definitions/enum_values_definition.rs:12-27 | crates/biome_graphql_formatter/src/graphql/definitions/fields_definition.rs:12-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/auxiliary/root_operation_types.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlRootOperationTypes` in one and `&GraphqlSelectionSet` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×2
  • Duplicated block (15–16 lines × 3) crates/biome_css_analyze/src/suppression_action.rs:69 — crates/biome_css_analyze/src/suppression_action.rs:69-84 | crates/biome_html_analyze/src/suppression_action.rs:79-94 | crates/biome_js_analyze/src/suppression_action.rs:288-302 — before extracting anything, compare `crates/biome_css_analyze/src/suppression_action.rs` and `crates/biome_html_analyze/src/suppression_action.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15–16 lines × 3) crates/biome_service/src/workspace/server.rs:4101 — crates/biome_service/src/workspace/server.rs:4101-4116 | crates/biome_service/src/workspace/server.rs:4167-4181 | crates/biome_service/src/workspace/server.rs:4208-4222 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `params` to `FormatFileParams` in one and `FormatRangeParams` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×2
  • Duplicated block (14–16 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_consistent_json_file_read.rs:398 — crates/biome_js_analyze/src/lint/nursery/use_consistent_json_file_read.rs:398-413 | crates/biome_js_analyze/src/lint/nursery/use_consistent_json_file_read.rs:422-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_consistent_json_file_read.rs:398` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14–16 lines × 2) crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:102 — crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:102-117 | crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:228-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–15 lines × 5) · ×2
  • Duplicated block (14–15 lines × 5) crates/biome_css_formatter/src/css/auxiliary/container_style_query_in_parens.rs:14 — crates/biome_css_formatter/src/css/auxiliary/container_style_query_in_parens.rs:14-27 | crates/biome_css_formatter/src/css/auxiliary/if_function.rs:11-25 | crates/biome_css_formatter/src/css/auxiliary/import_named_layer.rs:10-23 | crates/biome_css_formatter/src/css/auxiliary/import_supports.rs:10-24 | crates/biome_css_formatter/src/scss/auxiliary/legacy_if_function.rs:11-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/container_style_query_in_parens.rs:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssContainerStyleQueryInParens` in one and `&CssIfFunction` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14–15 lines × 5) crates/biome_service/src/settings.rs:2161 — crates/biome_service/src/settings.rs:2161-2174 | crates/biome_service/src/settings.rs:2202-2215 | crates/biome_service/src/settings.rs:2239-2252 | crates/biome_service/src/settings.rs:2272-2285 | crates/biome_service/src/settings.rs:2297-2311 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&mut JsonFormatOptions` in one and `&mut CssFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_service/src/settings.rs:2216` calls `Some`, `set_quote_style` and `crates/biome_service/src/settings.rs:2253` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) crates/biome_module_graph/src/db/type_inference/expressions.rs:1152 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1152-1166 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1546-1560 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1782-1796 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2485-2499 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1167` calls `Tuple` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1797` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 4) crates/biome_service/src/file_handlers/graphql.rs:366 — crates/biome_service/src/file_handlers/graphql.rs:366-380 | crates/biome_service/src/file_handlers/grit.rs:304-318 | crates/biome_service/src/file_handlers/json.rs:435-449 | crates/biome_service/src/file_handlers/yaml.rs:344-358 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/grit.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/graphql.rs:366` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_service/src/file_handlers/yaml.rs:359` calls `Some` and `crates/biome_service/src/file_handlers/grit.rs:319` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×2
  • Duplicated block (13–15 lines × 2) crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:113 — crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:113-127 | crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:355-367 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:113` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:111` calls `Some` and `crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:354` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13–15 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:906 — crates/biome_syntax_codegen/src/generate_nodes.rs:906-918 | xtask/codegen/src/generate_nodes.rs:943-957 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `xtask/codegen/src/generate_nodes.rs:943` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 9) · ×2
  • Duplicated block (12 lines × 9) crates/biome_module_graph/src/db/type_inference/expressions.rs:870 — crates/biome_module_graph/src/db/type_inference/expressions.rs:870-882 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1149-1161 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1495-1507 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1543-1555 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2483-2494 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2604-2616 | crates/biome_module_graph/src/db/type_inference/lookup.rs:578-590 | crates/biome_module_graph/src/db/type_inference/lookup.rs:746-758 | crates/biome_module_graph/src/db/type_inference/lookup.rs:924-936 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1163` calls `Interface` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:884` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 9) crates/biome_module_graph/src/db/type_inference/expressions.rs:872 — crates/biome_module_graph/src/db/type_inference/expressions.rs:872-883 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1151-1162 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1497-1508 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1545-1556 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1781-1792 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2484-2495 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2606-2617 | crates/biome_module_graph/src/db/type_inference/lookup.rs:580-591 | crates/biome_module_graph/src/db/type_inference/lookup.rs:926-937 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1163` calls `Interface` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:884` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×2
  • Duplicated block (11–12 lines × 3) crates/biome_markdown_parser/src/lexer/mod.rs:914 — crates/biome_markdown_parser/src/lexer/mod.rs:914-924 | crates/biome_markdown_parser/src/lexer/mod.rs:975-985 | crates/biome_markdown_parser/src/token_source.rs:18-29 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 3) crates/biome_service/src/workspace/server.rs:2049 — crates/biome_service/src/workspace/server.rs:2049-2060 | crates/biome_service/src/workspace/server.rs:2069-2080 | crates/biome_service/src/workspace/server.rs:2091-2101 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/workspace/server.rs:2049` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×2
  • Duplicated block (9–12 lines × 2) crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:183 — crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:183-191 | crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:277-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–12 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:3198 — crates/biome_markdown_parser/src/syntax/list.rs:3198-3206 | crates/biome_markdown_parser/src/syntax/mod.rs:705-716 — before extracting anything, compare `crates/biome_markdown_parser/src/syntax/list.rs` and `crates/biome_markdown_parser/src/syntax/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `p` to `&MarkdownParser` in one and `&mut MarkdownParser` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8–11 lines × 3) · ×2
  • Duplicated block (8–11 lines × 3) crates/biome_grit_parser/src/lexer/mod.rs:986 — crates/biome_grit_parser/src/lexer/mod.rs:986-996 | crates/biome_js_parser/src/lexer/mod.rs:1591-1598 | crates/biome_json_parser/src/lexer/mod.rs:752-762 — before extracting anything, compare `crates/biome_grit_parser/src/lexer/mod.rs` and `crates/biome_json_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 260 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_parser/src/lexer/mod.rs:986` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–11 lines × 3) crates/biome_js_semantic/src/events.rs:713 — crates/biome_js_semantic/src/events.rs:713-723 | crates/biome_js_semantic/src/events.rs:728-738 | crates/biome_js_semantic/src/events.rs:740-747 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_semantic/src/events.rs:713` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×2
  • Duplicated block (10 lines × 7) crates/biome_css_formatter/src/verbatim.rs:137 — crates/biome_css_formatter/src/verbatim.rs:137-146 | crates/biome_graphql_formatter/src/verbatim.rs:46-55 | crates/biome_grit_formatter/src/verbatim.rs:46-55 | crates/biome_html_formatter/src/verbatim.rs:59-68 | crates/biome_js_formatter/src/verbatim.rs:46-55 | crates/biome_json_formatter/src/verbatim.rs:45-54 | crates/biome_yaml_formatter/src/verbatim.rs:50-59 — before extracting anything, compare `crates/biome_css_formatter/src/verbatim.rs` and `crates/biome_graphql_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<CssFormatContext>` in one and `&mut Formatter<GraphqlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 7) crates/biome_module_graph/src/db/type_inference/expressions.rs:586 — crates/biome_module_graph/src/db/type_inference/expressions.rs:586-595 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1093-1102 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1176-1185 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1804-1813 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2509-2518 | crates/biome_module_graph/src/db/type_inference/lookup.rs:771-780 | crates/biome_module_graph/src/db/type_inference/lookup.rs:839-848 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:584` calls `Intersection`, `TypeOperator` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1092` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 13) · ×2
  • Duplicated block (9 lines × 13) crates/biome_module_graph/src/db/type_inference/expressions.rs:887 — crates/biome_module_graph/src/db/type_inference/expressions.rs:887-895 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1167-1175 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1218-1226 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1512-1520 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1561-1569 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1724-1732 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2500-2508 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3152-3160 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3203-3211 | crates/biome_module_graph/src/db/type_inference/lookup.rs:762-770 | crates/biome_module_graph/src/db/type_inference/lookup.rs:830-838 | crates/biome_module_graph/src/db/type_inference/lookup.rs:938-946 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1069-1077 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:897` calls `InstanceOf` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1177` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 13) crates/biome_module_graph/src/db/type_inference/expressions.rs:1161 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1161-1169 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1212-1220 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1555-1563 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1718-1726 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2215-2223 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2494-2502 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2859-2867 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3014-3022 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3096-3104 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3146-3154 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3197-3205 | crates/biome_module_graph/src/db/type_inference/lookup.rs:824-832 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1063-1071 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1211` calls `Class` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1160` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×2
  • Duplicated block (8–9 lines × 3) crates/biome_service/src/settings.rs:1144 — crates/biome_service/src/settings.rs:1144-1152 | crates/biome_service/src/settings.rs:1166-1174 | crates/biome_service/src/settings.rs:1262-1269 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/settings.rs:1144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 3) crates/biome_module_graph/src/db/type_inference/promise_classification.rs:223 — crates/biome_module_graph/src/db/type_inference/promise_classification.rs:223-231 | crates/biome_module_graph/src/db/type_inference/promise_classification.rs:234-242 | crates/biome_module_graph/src/db/type_inference/promise_classification.rs:244-251 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/promise_classification.rs:244` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/promise_classification.rs:234` calls `global_types`, `get` and `crates/biome_module_graph/src/db/type_inference/promise_classification.rs:244` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×2
  • Duplicated block (7–9 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:1139 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1139-1145 | crates/biome_js_type_info/src/format_type_info.rs:1037-1045 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:1139` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7–9 lines × 2) crates/biome_rowan/src/cursor.rs:325 — crates/biome_rowan/src/cursor.rs:325-333 | crates/biome_rowan/src/cursor.rs:369-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_rowan/src/cursor.rs:375` calls `into`, `Some` and `crates/biome_rowan/src/cursor.rs:333` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×2
  • Duplicated block (7 lines × 5) crates/biome_deserialize_macros/src/deserializable_derive.rs:267 — crates/biome_deserialize_macros/src/deserializable_derive.rs:267-273 | crates/biome_deserialize_macros/src/deserializable_derive.rs:311-317 | crates/biome_deserialize_macros/src/deserializable_derive.rs:490-496 | crates/biome_deserialize_macros/src/deserializable_derive.rs:551-557 | crates/biome_deserialize_macros/src/deserializable_derive.rs:584-590 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_deserialize_macros/src/deserializable_derive.rs:267` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_deserialize_macros/src/deserializable_derive.rs:309` calls `generate_generics_without_trait_bounds` and `crates/biome_deserialize_macros/src/deserializable_derive.rs:265` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 5) crates/biome_js_runtime/src/ast.rs:234 — crates/biome_js_runtime/src/ast.rs:234-243 | crates/biome_js_runtime/src/kind_set.rs:245-251 | crates/biome_js_runtime/src/kind_set.rs:318-324 | crates/biome_js_runtime/src/mutation.rs:30-36 | crates/biome_js_runtime/src/token.rs:25-31 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×2
  • Duplicated block (6–7 lines × 4) crates/biome_cli/src/service/windows.rs:141 — crates/biome_cli/src/service/windows.rs:141-146 | crates/biome_cli/src/service/windows.rs:166-172 | crates/biome_cli/src/service/windows.rs:269-274 | crates/biome_cli/src/service/windows.rs:294-300 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/service/windows.rs:141` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6–7 lines × 4) crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:330 — crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:330-336 | crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs:146-151 | crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:381-386 | crates/biome_js_analyze/src/utils/function_return.rs:22-27 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs` and `crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:330` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–7 lines × 3) · ×2
  • Duplicated block (4–7 lines × 3) crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:31 — crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:31-34 | crates/biome_grit_patterns/src/pattern_compiler/any_compiler.rs:16-22 | crates/biome_grit_patterns/src/pattern_compiler/or_compiler.rs:16-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:31` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (4–7 lines × 3) crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:69 — crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:69-72 | crates/biome_grit_patterns/src/pattern_compiler/any_compiler.rs:36-42 | crates/biome_grit_patterns/src/pattern_compiler/or_compiler.rs:36-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:69` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×2
  • Duplicated block (6 lines × 6) crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:94 — crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:94-99 | crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:90-95 | crates/biome_html_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:82-87 | crates/biome_js_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:103-108 | crates/biome_json_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:90-95 | crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:82-87 — before extracting anything, compare `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` and `crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:94` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 6) crates/biome_graphql_formatter/src/verbatim.rs:57 — crates/biome_graphql_formatter/src/verbatim.rs:57-62 | crates/biome_grit_formatter/src/verbatim.rs:57-62 | crates/biome_html_formatter/src/verbatim.rs:70-75 | crates/biome_js_formatter/src/verbatim.rs:57-62 | crates/biome_json_formatter/src/verbatim.rs:56-61 | crates/biome_yaml_formatter/src/verbatim.rs:80-85 — before extracting anything, compare `crates/biome_graphql_formatter/src/verbatim.rs` and `crates/biome_grit_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/verbatim.rs:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<GraphqlFormatContext>` in one and `&mut Formatter<GritFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (5 lines × 7) · ×2
  • Duplicated block (5 lines × 7) crates/biome_js_analyze/src/lint/style/no_playwright_element_handle.rs:71 — crates/biome_js_analyze/src/lint/style/no_playwright_element_handle.rs:71-77 | crates/biome_js_analyze/src/lint/style/no_playwright_eval.rs:56-62 | crates/biome_js_analyze/src/lint/style/no_playwright_wait_for_selector.rs:68-73 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_networkidle.rs:59-63 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_page_pause.rs:61-68 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_navigation.rs:63-68 | crates/biome_js_analyze/src/lint/suspicious/no_playwright_wait_for_timeout.rs:63-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 7) crates/biome_js_type_info/src/format_inferred_type_info.rs:1090 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1090-1094 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1111-1115 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1180-1184 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1202-1206 | crates/biome_js_type_info/src/format_type_info.rs:1058-1062 | crates/biome_js_type_info/src/format_type_info.rs:1077-1081 | crates/biome_js_type_info/src/format_type_info.rs:1099-1103 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:1090` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_type_info/src/format_inferred_type_info.rs:1089` calls `token` and `crates/biome_js_type_info/src/format_inferred_type_info.rs:1201` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×2
  • Duplicated block (5 lines × 5) crates/biome_js_analyze/src/lint/a11y/no_distracting_elements.rs:94 — crates/biome_js_analyze/src/lint/a11y/no_distracting_elements.rs:94-99 | crates/biome_js_analyze/src/lint/a11y/no_header_scope.rs:99-104 | crates/biome_js_analyze/src/lint/a11y/no_interactive_element_to_noninteractive_role.rs:146-150 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_element_to_interactive_role.rs:136-140 | crates/biome_js_analyze/src/lint/a11y/no_noninteractive_tabindex.rs:138-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/a11y/no_distracting_elements.rs:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 5) crates/biome_analyze/src/profiling.rs:534 — crates/biome_analyze/src/profiling.rs:534-538 | crates/biome_analyze/src/profiling.rs:541-545 | crates/biome_analyze/src/profiling.rs:548-552 | crates/biome_analyze/src/profiling.rs:555-559 | crates/biome_analyze/src/profiling.rs:561-566 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_analyze/src/profiling.rs:534` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_analyze/src/profiling.rs:534` calls `write_markup` and `crates/biome_analyze/src/profiling.rs:561` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×2
  • Duplicated block (10 lines × 6) crates/biome_css_formatter/src/css/lists/document_matcher_list.rs:7 — crates/biome_css_formatter/src/css/lists/document_matcher_list.rs:7-16 | crates/biome_css_formatter/src/css/lists/font_family_name_list.rs:7-16 | crates/biome_css_formatter/src/css/lists/value_at_rule_import_specifier_list.rs:12-21 | crates/biome_css_formatter/src/css/lists/value_at_rule_property_list.rs:7-16 | crates/biome_html_formatter/src/svelte/lists/binding_list.rs:9-18 | crates/biome_html_formatter/src/vue/lists/v_for_binding_list.rs:9-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/lists/value_at_rule_import_specifier_list.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssDocumentMatcherList` in one and `&CssFontFamilyNameList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 6) crates/biome_css_parser/src/lib.rs:138 — crates/biome_css_parser/src/lib.rs:138-147 | crates/biome_graphql_parser/src/lib.rs:103-112 | crates/biome_html_parser/src/lib.rs:105-114 | crates/biome_js_parser/src/parse.rs:117-126 | crates/biome_json_parser/src/lib.rs:234-243 | crates/biome_yaml_parser/src/lib.rs:97-106 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `parse` to `CssParse` in one and `GraphqlParse` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8 lines × 8) · ×2
  • Duplicated block (8 lines × 8) crates/biome_css_parser/src/parser.rs:167 — crates/biome_css_parser/src/parser.rs:167-174 | crates/biome_graphql_parser/src/parser/mod.rs:83-90 | crates/biome_grit_parser/src/parser/mod.rs:52-59 | crates/biome_html_parser/src/parser.rs:55-62 | crates/biome_js_parser/src/parser.rs:153-160 | crates/biome_json_parser/src/parser.rs:74-81 | crates/biome_tailwind_parser/src/parser.rs:33-40 | crates/biome_yaml_parser/src/parser/mod.rs:56-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_parser/src/parser/mod.rs:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_parser/src/parser.rs:150` calls `restore` and `crates/biome_css_parser/src/parser.rs:161` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 8) crates/biome_service/src/file_handlers/css.rs:540 — crates/biome_service/src/file_handlers/css.rs:540-547 | crates/biome_service/src/file_handlers/graphql.rs:437-444 | crates/biome_service/src/file_handlers/grit.rs:375-382 | crates/biome_service/src/file_handlers/html.rs:758-765 | crates/biome_service/src/file_handlers/javascript.rs:1038-1045 | crates/biome_service/src/file_handlers/json.rs:510-517 | crates/biome_service/src/file_handlers/md.rs:503-510 | crates/biome_service/src/file_handlers/yaml.rs:413-420 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:540` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×2
  • Duplicated block (17 lines × 4) crates/biome_css_formatter/src/css/auxiliary/color_profile_at_rule_declarator.rs:13 — crates/biome_css_formatter/src/css/auxiliary/color_profile_at_rule_declarator.rs:13-29 | crates/biome_css_formatter/src/css/auxiliary/counter_style_at_rule_declarator.rs:13-29 | crates/biome_css_formatter/src/css/auxiliary/font_palette_values_at_rule_declarator.rs:17-33 | crates/biome_css_formatter/src/css/auxiliary/position_try_at_rule_declarator.rs:13-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/color_profile_at_rule_declarator.rs:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssColorProfileAtRuleDeclarator` in one and `&CssCounterStyleAtRuleDeclarator` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 4) crates/biome_css_formatter/src/scss/statements/debug_at_rule.rs:10 — crates/biome_css_formatter/src/scss/statements/debug_at_rule.rs:10-26 | crates/biome_css_formatter/src/scss/statements/error_at_rule.rs:10-26 | crates/biome_css_formatter/src/scss/statements/return_at_rule.rs:10-26 | crates/biome_css_formatter/src/scss/statements/warn_at_rule.rs:10-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&ScssDebugAtRule` in one and `&ScssErrorAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D1 · Cyclomatic Complexity · FormatHtmlElementList · ×1
  • FormatHtmlElementList::fmt_children (cyclomatic 127) crates/biome_html_formatter/src/html/lists/element_list.rs:382 — FormatHtmlElementList::fmt_children has cyclomatic complexity 127 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Field · ×1
  • Field::method_name (cyclomatic 86) xtask/codegen/src/js_kinds_src.rs:635 — Field::method_name has cyclomatic complexity 86 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AriaRoles · ×1
  • AriaRoles::get_implicit_role (cyclomatic 76) crates/biome_aria/src/roles.rs:11 — AriaRoles::get_implicit_role has cyclomatic complexity 76 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Rules · ×1
  • Rules::deserialize (cyclomatic 71) crates/biome_cli/src/execute/migrate/eslint_eslint.rs:517 — Rules::deserialize has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultBlockListFormatter · ×1
  • DefaultBlockListFormatter::fmt (cyclomatic 67) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:378 — DefaultBlockListFormatter::fmt has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ControlFlowVisitor · ×1
  • ControlFlowVisitor::visit (cyclomatic 66) crates/biome_js_control_flow/src/visitor.rs:48 — ControlFlowVisitor::visit has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsExtent · ×1
  • JsExtent::run (cyclomatic 55) crates/biome_js_extent/src/lib.rs:344 — JsExtent::run has cyclomatic complexity 55 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ClassMemberModifiers · ×1
  • ClassMemberModifiers::check_class_member_modifier (cyclomatic 54) crates/biome_js_parser/src/syntax/class.rs:2263 — ClassMemberModifiers::check_class_member_modifier has cyclomatic complexity 54 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FitsMeasurer · ×1
  • FitsMeasurer::fits_element (cyclomatic 48) crates/biome_formatter/src/printer/mod.rs:1289 — FitsMeasurer::fits_element has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FormatTypeVariant · ×1
  • FormatTypeVariant::fmt (cyclomatic 46) crates/biome_js_formatter/src/ts/lists/union_type_variant_list.rs:86 — FormatTypeVariant::fmt has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NoUnsafeOptionalChaining · ×1
  • NoUnsafeOptionalChaining::run (cyclomatic 45) crates/biome_js_analyze/src/lint/correctness/no_unsafe_optional_chaining.rs:88 — NoUnsafeOptionalChaining::run has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoUselessFragments · ×1
  • NoUselessFragments::run (cyclomatic 44) crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs:156 — NoUselessFragments::run has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SortableHtmlAttribute · ×1
  • SortableHtmlAttribute::category (cyclomatic 43) crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:295 — SortableHtmlAttribute::category has cyclomatic complexity 43 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · VueSemanticModel · ×1
  • VueSemanticModel::fmt (cyclomatic 42) crates/biome_vue_semantic/src/format_semantic_model.rs:152 — VueSemanticModel::fmt has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseExplicitType · ×1
  • UseExplicitType::run (cyclomatic 40) crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:395 — UseExplicitType::run has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultCollector · ×1
  • DefaultCollector::run (cyclomatic 38) crates/biome_cli/src/runner/impls/collectors/default.rs:160 — DefaultCollector::run has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoUselessEscapeInRegex · ×1
  • NoUselessEscapeInRegex::run (cyclomatic 37) crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs:60 — NoUselessEscapeInRegex::run has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseReactFunctionComponentDefinition · ×1
  • UseReactFunctionComponentDefinition::action (cyclomatic 37) crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:218 — UseReactFunctionComponentDefinition::action has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BooleanCoercionVisitor · ×1
  • BooleanCoercionVisitor::enter (cyclomatic 37) crates/biome_js_type_info/src/inferred_type/boolean_coercion.rs:149 — BooleanCoercionVisitor::enter has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ListBlockList · ×1
  • ListBlockList::fmt (cyclomatic 37) crates/biome_markdown_formatter/src/bullet_list.rs:752 — ListBlockList::fmt has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_ruledoc_utils · ×1
  • biome_ruledoc_utils::analyzer::analyze_rule_code (cyclomatic 37) crates/biome_ruledoc_utils/src/analyzer.rs:51 — biome_ruledoc_utils::analyzer::analyze_rule_code has cyclomatic complexity 37 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PendingSortKey · ×1
  • PendingSortKey::from_candidate (cyclomatic 36) crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4.rs:488 — PendingSortKey::from_candidate has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArgumentTypeCompatibility · ×1
  • ArgumentTypeCompatibility::action (cyclomatic 35) crates/biome_module_graph/src/db/queries/type_inference/calls/implementation.rs:1075 — ArgumentTypeCompatibility::action has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NamingConventionSelection · ×1
  • NamingConventionSelection::selectors (cyclomatic 34) crates/biome_cli/src/execute/migrate/eslint_typescript.rs:267 — NamingConventionSelection::selectors has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FormatJsxChildList · ×1
  • FormatJsxChildList::fmt_children (cyclomatic 34) crates/biome_js_formatter/src/jsx/lists/child_list.rs:70 — FormatJsxChildList::fmt_children has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_glob · ×1
  • biome_glob::editorconfig::convert_glob (cyclomatic 33) crates/biome_glob/src/editorconfig.rs:213 — biome_glob::editorconfig::convert_glob has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_markup · ×1
  • biome_markup::markup (cyclomatic 31) crates/biome_markup/src/lib.rs:163 — biome_markup::markup has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PackageJsonVisitor · ×1
  • PackageJsonVisitor::visit_map (cyclomatic 31) crates/biome_package/src/node_js_package/package_json.rs:633 — PackageJsonVisitor::visit_map has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MigrationResults · ×1
  • MigrationResults::advices (cyclomatic 29) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:141 — MigrationResults::advices has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: RuleSource::try_from (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OverridePattern · ×1
  • OverridePattern::apply_to_configuration (cyclomatic 29) crates/biome_configuration/src/overrides.rs:112 — OverridePattern::apply_to_configuration has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UnreachableRanges · ×1
  • UnreachableRanges::propagate_ranges (cyclomatic 28) crates/biome_js_analyze/src/lint/correctness/no_unreachable.rs:793 — UnreachableRanges::propagate_ranges has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoNegationInEqualityCheck · ×1
  • NoNegationInEqualityCheck::action (cyclomatic 28) crates/biome_js_analyze/src/lint/nursery/no_negation_in_equality_check.rs:105 — NoNegationInEqualityCheck::action has cyclomatic complexity 28 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · DeclarationOrRuleList · ×1
  • DeclarationOrRuleList::parse_element (cyclomatic 27) crates/biome_css_parser/src/syntax/block/declaration_or_rule_list_block.rs:193 — DeclarationOrRuleList::parse_element has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_grit_parser · ×1
  • biome_grit_parser::parser::patterns::parse_pattern_with_precedence (cyclomatic 27) crates/biome_grit_parser/src/parser/patterns.rs:20 — biome_grit_parser::parser::patterns::parse_pattern_with_precedence has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · QuoteBlockList · ×1
  • QuoteBlockList::fmt (cyclomatic 27) crates/biome_markdown_formatter/src/quote.rs:96 — QuoteBlockList::fmt has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormatYamlBlockMapExplicitEntry · ×1
  • FormatYamlBlockMapExplicitEntry::fmt_fields (cyclomatic 27) crates/biome_yaml_formatter/src/yaml/auxiliary/block_map_explicit_entry.rs:17 — FormatYamlBlockMapExplicitEntry::fmt_fields has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoScssNullComparison · ×1
  • NoScssNullComparison::run (cyclomatic 26) crates/biome_css_analyze/src/lint/nursery/no_scss_null_comparison.rs:72 — NoScssNullComparison::run has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DeriveStructInput · ×1
  • DeriveStructInput::parse (cyclomatic 26) crates/biome_diagnostics_macros/src/parse.rs:63 — DeriveStructInput::parse has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NoUselessUndefined · ×1
  • NoUselessUndefined::run (cyclomatic 26) crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:111 — NoUselessUndefined::run has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoUnreachableSuper · ×1
  • NoUnreachableSuper::run (cyclomatic 26) crates/biome_js_analyze/src/lint/correctness/no_unreachable_super.rs:100 — NoUnreachableSuper::run has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseFilenamingConvention · ×1
  • UseFilenamingConvention::run (cyclomatic 26) crates/biome_js_analyze/src/lint/style/use_filenaming_convention.rs:156 — UseFilenamingConvention::run has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TypeDataSlotReplacements · ×1
  • TypeDataSlotReplacements::rebuild (cyclomatic 26) crates/biome_js_type_info/src/interned_types.rs:1667 — TypeDataSlotReplacements::rebuild has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: TypeData::type_description (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NoImplicitCoercions · ×1
  • NoImplicitCoercions::run (cyclomatic 25) crates/biome_js_analyze/src/lint/complexity/no_implicit_coercions.rs:189 — NoImplicitCoercions::run has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseComponentExportOnlyModules · ×1
  • UseComponentExportOnlyModules::run (cyclomatic 25) crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs:131 — UseComponentExportOnlyModules::run has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseErrorCause · ×1
  • UseErrorCause::run (cyclomatic 25) crates/biome_js_analyze/src/lint/style/use_error_cause.rs:143 — UseErrorCause::run has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rules_check · ×1
  • rules_check::check_rules (cyclomatic 25) xtask/rules_check/src/lib.rs:48 — rules_check::check_rules has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FormatHtmlElement · ×1
  • FormatHtmlElement::fmt_inner (cyclomatic 24) crates/biome_html_formatter/src/html/auxiliary/element.rs:147 — FormatHtmlElement::fmt_inner has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NoUnusedImports · ×1
  • NoUnusedImports::action (cyclomatic 24) crates/biome_js_analyze/src/lint/correctness/no_unused_imports.rs:282 — NoUnusedImports::action has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoUnsafeReturn · ×1
  • NoUnsafeReturn::run (cyclomatic 24) crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:110 — NoUnsafeReturn::run has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JsBinding · ×1
  • JsBinding::init (cyclomatic 24) crates/biome_js_runtime/src/semantic.rs:54 — JsBinding::init has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · BatchMutation · ×1
  • BatchMutation::commit_with_text_range_and_edit (cyclomatic 24) crates/biome_rowan/src/ast/batch.rs:547 — BatchMutation::commit_with_text_range_and_edit has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GritNodePattern · ×1
  • GritNodePattern::execute (cyclomatic 23) crates/biome_grit_patterns/src/grit_node_patterns.rs:139 — GritNodePattern::execute has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseConsistentArrowReturn · ×1
  • UseConsistentArrowReturn::run (cyclomatic 23) crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs:74 — UseConsistentArrowReturn::run has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseExportType · ×1
  • UseExportType::run (cyclomatic 23) crates/biome_js_analyze/src/lint/style/use_export_type.rs:142 — UseExportType::run has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_rule_options · ×1
  • biome_rule_options::shared::restricted_regex::validate_restricted_regex (cyclomatic 23) crates/biome_rule_options/src/shared/restricted_regex.rs:152 — biome_rule_options::shared::restricted_regex::validate_restricted_regex has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoMissingScssInterpolation · ×1
  • NoMissingScssInterpolation::run (cyclomatic 22) crates/biome_css_analyze/src/lint/nursery/no_missing_scss_interpolation.rs:157 — NoMissingScssInterpolation::run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · YamlValue · ×1
  • YamlValue::deserialize_erased (cyclomatic 22) crates/biome_deserialize/src/yaml/value.rs:227 — YamlValue::deserialize_erased has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FormatSkippedTokenTrivia · ×1
  • FormatSkippedTokenTrivia::fmt_skipped (cyclomatic 22) crates/biome_formatter/src/trivia.rs:817 — FormatSkippedTokenTrivia::fmt_skipped has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoDisabledAttribute · ×1
  • NoDisabledAttribute::action (cyclomatic 22) crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:202 — NoDisabledAttribute::action has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoNextAsyncClientComponent · ×1
  • NoNextAsyncClientComponent::run (cyclomatic 22) crates/biome_js_analyze/src/lint/correctness/no_next_async_client_component.rs:68 — NoNextAsyncClientComponent::run has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UseHookAtTopLevel · ×1
  • UseHookAtTopLevel::run (cyclomatic 22) crates/biome_js_analyze/src/lint/correctness/use_hook_at_top_level.rs:114 — UseHookAtTopLevel::run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseIterableCallbackReturn · ×1
  • UseIterableCallbackReturn::run (cyclomatic 22) crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:160 — UseIterableCallbackReturn::run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArrowChain · ×1
  • ArrowChain::fmt (cyclomatic 22) crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:509 — ArrowChain::fmt has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RootBuilder · ×1
  • RootBuilder::statement (cyclomatic 22) crates/biome_module_graph/src/js_module_info/flow/builder.rs:273 — RootBuilder::statement has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · watch.createWatcher (cyclomatic 22) · ×1
  • watch.createWatcher (cyclomatic 22) packages/prettier-compare/src/watch.ts:63 — watch.createWatcher has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 8 function items inside it that branch (visitDirectory, a function literal at line 120, a function literal at line 79, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Analyzer · ×1
  • Analyzer::run_with_optional_inspector (cyclomatic 21) crates/biome_analyze/src/lib.rs:171 — Analyzer::run_with_optional_inspector has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseExhaustiveDependencies · ×1
  • UseExhaustiveDependencies::run (cyclomatic 21) crates/biome_js_analyze/src/lint/correctness/use_exhaustive_dependencies.rs:479 — UseExhaustiveDependencies::run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoFallthroughSwitchClause · ×1
  • NoFallthroughSwitchClause::run (cyclomatic 21) crates/biome_js_analyze/src/lint/suspicious/no_fallthrough_switch_clause.rs:75 — NoFallthroughSwitchClause::run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnyJsExpression · ×1
  • AnyJsExpression::contains_a_test_pattern (cyclomatic 21) crates/biome_js_syntax/src/expr_ext.rs:977 — AnyJsExpression::contains_a_test_pattern has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · biome_ungrammar · ×1
  • biome_ungrammar::lexer::advance (cyclomatic 21) crates/biome_ungrammar/src/lexer.rs:96 — biome_ungrammar::lexer::advance has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RecessOrderMember · ×1
  • RecessOrderMember::kind (cyclomatic 20) crates/biome_css_analyze/src/assist/source/use_sorted_properties.rs:357 — RecessOrderMember::kind has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NumberLiteral · ×1
  • NumberLiteral::try_from (cyclomatic 20) crates/biome_js_analyze/src/lint/complexity/use_simple_number_keys.rs:203 — NumberLiteral::try_from has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NoUnusedVariables · ×1
  • NoUnusedVariables::run (cyclomatic 20) crates/biome_js_analyze/src/lint/correctness/no_unused_variables.rs:271 — NoUnusedVariables::run has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UseValidForDirection · ×1
  • UseValidForDirection::run (cyclomatic 20) crates/biome_js_analyze/src/lint/correctness/use_valid_for_direction.rs:61 — UseValidForDirection::run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoTripleSlashReference · ×1
  • NoTripleSlashReference::run (cyclomatic 20) crates/biome_js_analyze/src/lint/nursery/no_triple_slash_reference.rs:153 — NoTripleSlashReference::run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseVueValidDefineProps · ×1
  • UseVueValidDefineProps::run (cyclomatic 20) crates/biome_js_analyze/src/lint/nursery/use_vue_valid_define_props.rs:126 — UseVueValidDefineProps::run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoDuplicateEnumValues · ×1
  • NoDuplicateEnumValues::run (cyclomatic 20) crates/biome_js_analyze/src/lint/suspicious/no_duplicate_enum_values.rs:72 — NoDuplicateEnumValues::run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsModuleInfoCollector · ×1
  • JsModuleInfoCollector::infer_type (cyclomatic 20) crates/biome_module_graph/src/js_module_info/collector.rs:461 — JsModuleInfoCollector::infer_type has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormatYamlDocument · ×1
  • FormatYamlDocument::fmt_fields (cyclomatic 20) crates/biome_yaml_formatter/src/yaml/auxiliary/document.rs:12 — FormatYamlDocument::fmt_fields has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.App (cyclomatic 20) · ×1
  • App.App (cyclomatic 20) packages/prettier-compare/src/components/App.tsx:37 — App.App has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · StructFieldAttrs · ×1
  • StructFieldAttrs::try_from (cyclomatic 19) crates/biome_deserialize_macros/src/deserializable_derive/struct_field_attrs.rs:53 — StructFieldAttrs::try_from has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseExhaustiveSwitchCases · ×1
  • UseExhaustiveSwitchCases::run (cyclomatic 19) crates/biome_js_analyze/src/lint/nursery/use_exhaustive_switch_cases.rs:154 — UseExhaustiveSwitchCases::run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsFormatSyntaxRewriter · ×1
  • JsFormatSyntaxRewriter::visit_parenthesized (cyclomatic 19) crates/biome_js_formatter/src/syntax_rewriter.rs:133 — JsFormatSyntaxRewriter::visit_parenthesized has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsSemanticModel · ×1
  • JsSemanticModel::init (cyclomatic 19) crates/biome_js_runtime/src/semantic.rs:54 — JsSemanticModel::init has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JsDeclarationKind · ×1
  • JsDeclarationKind::from_node (cyclomatic 19) crates/biome_js_semantic/src/semantic_model/binding.rs:129 — JsDeclarationKind::from_node has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: TsBindingReference::union_with (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · AnyJsParameterList · ×1
  • AnyJsParameterList::try_merge (cyclomatic 19) crates/biome_js_analyze/src/lint/style/use_unified_type_signatures.rs:434 — AnyJsParameterList::try_merge has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AnyTsType::is_type_equal (cyclomatic 37) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · BiomeManifest · ×1
  • BiomeManifest::validate (cyclomatic 19) crates/biome_manifest/src/lib.rs:205 — BiomeManifest::validate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FormatMdBlockList · ×1
  • FormatMdBlockList::fmt (cyclomatic 19) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:23 — FormatMdBlockList::fmt has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StatementCheck · ×1
  • StatementCheck::statement (cyclomatic 19) crates/biome_module_graph/src/js_module_info/flow/builder.rs:125 — StatementCheck::statement has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · GuardFunctions · ×1
  • GuardFunctions::guard (cyclomatic 19) crates/biome_module_graph/src/js_module_info/flow/guards.rs:265 — GuardFunctions::guard has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Settings · ×1
  • Settings::apply_configuration (cyclomatic 19) crates/biome_service/src/settings.rs:308 — Settings::apply_configuration has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Collator · ×1
  • Collator::cmp (cyclomatic 19) crates/biome_string_case/src/lib.rs:446 — Collator::cmp has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormatYamlBlockContent · ×1
  • FormatYamlBlockContent::fmt_fields (cyclomatic 19) crates/biome_yaml_formatter/src/yaml/auxiliary/block_content.rs:22 — FormatYamlBlockContent::fmt_fields has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_yaml_formatter · ×1
  • biome_yaml_formatter::comments::handle_own_line_comment (cyclomatic 19) crates/biome_yaml_formatter/src/comments.rs:325 — biome_yaml_formatter::comments::handle_own_line_comment has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parseAriaSpec (cyclomatic 19) · ×1
  • parseAriaSpec (cyclomatic 19) packages/aria-data/generate-aria-data.js:6 — parseAriaSpec has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · Suppressions · ×1
  • Suppressions::suppresses (cyclomatic 18) crates/biome_analyze/src/suppressions.rs:442 — Suppressions::suppresses has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RuleSelector · ×1
  • RuleSelector::from_str (cyclomatic 18) crates/biome_configuration/src/analyzer/mod.rs:842 — RuleSelector::from_str has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_css_formatter · ×1
  • biome_css_formatter::utils::component_value_list::write_component_value_list (cyclomatic 18) crates/biome_css_formatter/src/utils/component_value_list.rs:87 — biome_css_formatter::utils::component_value_list::write_component_value_list has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DecodedCursor · ×1
  • DecodedCursor::next (cyclomatic 18) crates/biome_css_syntax/src/css_escape.rs:73 — DecodedCursor::next has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContainerAttrs · ×1
  • ContainerAttrs::try_from (cyclomatic 18) crates/biome_deserialize_macros/src/deserializable_derive/container_attrs.rs:48 — ContainerAttrs::try_from has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · UseVueValidVSlot · ×1
  • UseVueValidVSlot::run (cyclomatic 18) crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_slot.rs:145 — UseVueValidVSlot::run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HtmlSplitChunksIterator · ×1
  • HtmlSplitChunksIterator::next (cyclomatic 18) crates/biome_html_formatter/src/utils/children.rs:752 — HtmlSplitChunksIterator::next has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Accesses · ×1
  • Accesses::add_binding (cyclomatic 18) crates/biome_js_analyze/src/lint/nursery/no_useless_assignment.rs:297 — Accesses::add_binding has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseConsistentFunctionStyle · ×1
  • UseConsistentFunctionStyle::run (cyclomatic 18) crates/biome_js_analyze/src/lint/nursery/use_consistent_function_style.rs:170 — UseConsistentFunctionStyle::run has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NoLeakedRender · ×1
  • NoLeakedRender::run (cyclomatic 18) crates/biome_js_analyze/src/lint/suspicious/no_leaked_render.rs:108 — NoLeakedRender::run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MissingAwaitVisitor · ×1
  • MissingAwaitVisitor::visit (cyclomatic 18) crates/biome_js_analyze/src/lint/suspicious/use_await.rs:133 — MissingAwaitVisitor::visit has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsAstNode · ×1
  • JsAstNode::update_field (cyclomatic 18) crates/biome_js_runtime/src/ast.rs:415 — JsAstNode::update_field has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProseItemCollector · ×1
  • ProseItemCollector::collect (cyclomatic 18) crates/biome_markdown_formatter/src/words.rs:741 — ProseItemCollector::collect has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FlowRootScanner · ×1
  • FlowRootScanner::enter (cyclomatic 18) crates/biome_module_graph/src/js_module_info/flow/scanner.rs:87 — FlowRootScanner::enter has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JsModuleVisitor · ×1
  • JsModuleVisitor::visit_binding_pattern (cyclomatic 18) crates/biome_module_graph/src/js_module_info/visitor.rs:431 — JsModuleVisitor::visit_binding_pattern has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TurboJson · ×1
  • TurboJson::env_vars_cache (cyclomatic 18) crates/biome_package/src/node_js_package/turbo_json.rs:168 — TurboJson::env_vars_cache has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · ProjectScanComputer · ×1
  • ProjectScanComputer::compute (cyclomatic 18) crates/biome_service/src/configuration.rs:1696 — ProjectScanComputer::compute has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OverrideSettingPattern · ×1
  • OverrideSettingPattern::apply_overrides_to_js_format_options (cyclomatic 18) crates/biome_service/src/settings.rs:2096 — OverrideSettingPattern::apply_overrides_to_js_format_options has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DisplayProfiles · ×1
  • DisplayProfiles::fmt (cyclomatic 17) crates/biome_analyze/src/profiling.rs:454 — DisplayProfiles::fmt has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DefaultFinalizer · ×1
  • DefaultFinalizer::finalize (cyclomatic 17) crates/biome_cli/src/runner/impls/finalizers/default.rs:29 — DefaultFinalizer::finalize has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EditorConfig · ×1
  • EditorConfig::from_str (cyclomatic 17) crates/biome_configuration/src/editorconfig.rs:224 — EditorConfig::from_str has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_html_analyze · ×1
  • biome_html_analyze::lint::a11y::use_heading_content::has_accessible_content (cyclomatic 17) crates/biome_html_analyze/src/lint/a11y/use_heading_content.rs:211 — biome_html_analyze::lint::a11y::use_heading_content::has_accessible_content has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormatHtmlAttributeList · ×1
  • FormatHtmlAttributeList::fmt (cyclomatic 17) crates/biome_html_formatter/src/html/lists/attribute_list.rs:41 — FormatHtmlAttributeList::fmt has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NoVoidElementsWithChildren · ×1
  • NoVoidElementsWithChildren::action (cyclomatic 17) crates/biome_js_analyze/src/lint/correctness/no_void_elements_with_children.rs:209 — NoVoidElementsWithChildren::action has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseExplicitReturnType · ×1
  • UseExplicitReturnType::run (cyclomatic 17) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:277 — UseExplicitReturnType::run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoScriptUrl · ×1
  • NoScriptUrl::run (cyclomatic 17) crates/biome_js_analyze/src/lint/security/no_script_url.rs:89 — NoScriptUrl::run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseDestructuring · ×1
  • UseDestructuring::run (cyclomatic 17) crates/biome_js_analyze/src/lint/style/use_destructuring.rs:115 — UseDestructuring::run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseNumberNamespace · ×1
  • UseNumberNamespace::action (cyclomatic 17) crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:131 — UseNumberNamespace::action has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FormatTemplateElement · ×1
  • FormatTemplateElement::fmt (cyclomatic 17) crates/biome_js_formatter/src/js/auxiliary/template_element.rs:106 — FormatTemplateElement::fmt has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JsAssignmentExpression · ×1
  • JsAssignmentExpression::needs_parentheses (cyclomatic 17) crates/biome_js_syntax/src/parentheses/expression.rs:135 — JsAssignmentExpression::needs_parentheses has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: AnyJsExpression::needs_parentheses (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NoDuplicateDependencies · ×1
  • NoDuplicateDependencies::run (cyclomatic 17) crates/biome_json_analyze/src/lint/suspicious/no_duplicate_dependencies.rs:135 — NoDuplicateDependencies::run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeSpanNormalization · ×1
  • CodeSpanNormalization::fmt (cyclomatic 17) crates/biome_markdown_formatter/src/markdown/auxiliary/inline_code.rs:276 — CodeSpanNormalization::fmt has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImportSourceKind · ×1
  • ImportSourceKind::from_source (cyclomatic 17) crates/biome_rule_options/src/organize_imports/import_source.rs:91 — ImportSourceKind::from_source has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ConfigurationInspector · ×1
  • ConfigurationInspector::inspect_key (cyclomatic 16) crates/biome_cli/src/commands/inspect/config/configuration.rs:79 — ConfigurationInspector::inspect_key has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SummaryReporterVisitor · ×1
  • SummaryReporterVisitor::report_diagnostics (cyclomatic 16) crates/biome_cli/src/reporter/summary.rs:140 — SummaryReporterVisitor::report_diagnostics has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CheckProcessFile · ×1
  • CheckProcessFile::process_file (cyclomatic 16) crates/biome_cli/src/runner/impls/process_file/check.rs:17 — CheckProcessFile::process_file has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · biome_configuration_macros · ×1
  • biome_configuration_macros::group_struct::generate_group_struct (cyclomatic 16) crates/biome_configuration_macros/src/group_struct.rs:8 — biome_configuration_macros::group_struct::generate_group_struct has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_css_semantic · ×1
  • biome_css_semantic::semantic_model::specificity::evaluate_any_pseudo_class (cyclomatic 16) crates/biome_css_semantic/src/semantic_model/specificity.rs:35 — biome_css_semantic::semantic_model::specificity::evaluate_any_pseudo_class has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Document · ×1
  • Document::propagate_expand::propagate_expands (cyclomatic 16) crates/biome_formatter/src/format_element/document.rs:54 — Document::propagate_expand::propagate_expands has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · GritExecContext · ×1
  • GritExecContext::exec_step (cyclomatic 16) crates/biome_grit_patterns/src/grit_context.rs:139 — GritExecContext::exec_step has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoJsxLiterals · ×1
  • NoJsxLiterals::run (cyclomatic 16) crates/biome_js_analyze/src/lint/style/no_jsx_literals.rs:144 — NoJsxLiterals::run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseBlockStatements · ×1
  • UseBlockStatements::action (cyclomatic 16) crates/biome_js_analyze/src/lint/style/use_block_statements.rs:179 — UseBlockStatements::action has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UseConsistentEnumValueType · ×1
  • UseConsistentEnumValueType::run (cyclomatic 16) crates/biome_js_analyze/src/lint/style/use_consistent_enum_value_type.rs:79 — UseConsistentEnumValueType::run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NoUnnecessaryConditions · ×1
  • NoUnnecessaryConditions::run (cyclomatic 16) crates/biome_js_analyze/src/lint/suspicious/no_unnecessary_conditions.rs:183 — NoUnnecessaryConditions::run has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FormatTsTypeArguments · ×1
  • FormatTsTypeArguments::fmt_fields (cyclomatic 16) crates/biome_js_formatter/src/ts/expressions/type_arguments.rs:14 — FormatTsTypeArguments::fmt_fields has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JsMutation · ×1
  • JsMutation::change (cyclomatic 16) crates/biome_js_runtime/src/mutation.rs:65 — JsMutation::change has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FormatGfmTableRowWithOptions · ×1
  • FormatGfmTableRowWithOptions::fmt (cyclomatic 16) crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs:49 — FormatGfmTableRowWithOptions::fmt has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CssModuleVisitor · ×1
  • CssModuleVisitor::visit (cyclomatic 16) crates/biome_module_graph/src/css_module_info/visitor.rs:29 — CssModuleVisitor::visit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · biome_resolver · ×1
  • biome_resolver::resolve_dependency (cyclomatic 16) crates/biome_resolver/src/lib.rs:794 — biome_resolver::resolve_dependency has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RawLanguageSyntaxFactory · ×1
  • RawLanguageSyntaxFactory::make_syntax (cyclomatic 16) crates/biome_rowan/src/raw_language.rs:201 — RawLanguageSyntaxFactory::make_syntax has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Watcher · ×1
  • Watcher::handle_notify_event (cyclomatic 16) crates/biome_service/src/scanner/watcher.rs:254 — Watcher::handle_notify_event has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · biome_suppression · ×1
  • biome_suppression::parse_suppression_comment_with_line_prefix (cyclomatic 16) crates/biome_suppression/src/lib.rs:106 — biome_suppression::parse_suppression_comment_with_line_prefix has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormatYamlVerbatimNode · ×1
  • FormatYamlVerbatimNode::fmt (cyclomatic 16) crates/biome_yaml_formatter/src/verbatim.rs:49 — FormatYamlVerbatimNode::fmt has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SymbolsMicrosoftTestCase · ×1
  • SymbolsMicrosoftTestCase::run (cyclomatic 16) xtask/coverage/src/symbols/msts.rs:40 — SymbolsMicrosoftTestCase::run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality · Test project verifies nothing · ×1
  • Test project verifies nothing: the repository root crates/biome_js_analyze/tests/specs/suspicious/noPlaywrightWaitForTimeout/invalid/in-test.js:2 — No conventional assertion call was detected in 2 of 2 tests in `the repository root` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
D2 · Cognitive Complexity · FormatHtmlElementList · ×1
  • FormatHtmlElementList::fmt_children (cognitive 246) crates/biome_html_formatter/src/html/lists/element_list.rs:382 — FormatHtmlElementList::fmt_children has cognitive complexity 246 (threshold 15). Drivers by points: if/else 87 (174 pts), boolean chains 36, match/switch 8 (26 pts), loops 5 (10 pts) (nesting depth added 110). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultBlockListFormatter · ×1
  • DefaultBlockListFormatter::fmt (cognitive 186) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:378 — DefaultBlockListFormatter::fmt has cognitive complexity 186 (threshold 15). Drivers by points: if/else 42 (117 pts), loops 12 (46 pts), boolean chains 23 (nesting depth added 109). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ControlFlowVisitor · ×1
  • ControlFlowVisitor::visit (cognitive 151) crates/biome_js_control_flow/src/visitor.rs:48 — ControlFlowVisitor::visit has cognitive complexity 151 (threshold 15). Drivers by points: if/else 64 (150 pts), match/switch 1 (nesting depth added 86). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Rules · ×1
  • Rules::deserialize (cognitive 108) crates/biome_cli/src/execute/migrate/eslint_eslint.rs:517 — Rules::deserialize has cognitive complexity 108 (threshold 15). Drivers by points: if/else 35 (104 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListBlockList · ×1
  • ListBlockList::fmt (cognitive 103) crates/biome_markdown_formatter/src/bullet_list.rs:752 — ListBlockList::fmt has cognitive complexity 103 (threshold 15). Drivers by points: if/else 28 (78 pts), loops 4 (10 pts), boolean chains 8, match/switch 3 (7 pts) (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultCollector · ×1
  • DefaultCollector::run (cognitive 97) crates/biome_cli/src/runner/impls/collectors/default.rs:160 — DefaultCollector::run has cognitive complexity 97 (threshold 15). Drivers by points: if/else 18 (59 pts), match/switch 6 (24 pts), loops 3 (9 pts), boolean chains 5 (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUselessFragments · ×1
  • NoUselessFragments::run (cognitive 92) crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs:156 — NoUselessFragments::run has cognitive complexity 92 (threshold 15). Drivers by points: if/else 34 (73 pts), match/switch 6 (12 pts), boolean chains 6, loops 1 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NoUnreachableSuper · ×1
  • NoUnreachableSuper::run (cognitive 79) crates/biome_js_analyze/src/lint/correctness/no_unreachable_super.rs:100 — NoUnreachableSuper::run has cognitive complexity 79 (threshold 15). Drivers by points: if/else 15 (61 pts), loops 4 (9 pts), match/switch 2 (8 pts), boolean chains 1 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_markup · ×1
  • biome_markup::markup (cognitive 74) crates/biome_markup/src/lib.rs:163 — biome_markup::markup has cognitive complexity 74 (threshold 15). Drivers by points: match/switch 11 (46 pts), if/else 6 (21 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 53). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · VueSemanticModel · ×1
  • VueSemanticModel::fmt (cognitive 70) crates/biome_vue_semantic/src/format_semantic_model.rs:152 — VueSemanticModel::fmt has cognitive complexity 70 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 14 (24 pts), match/switch 5 (14 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUnsafeOptionalChaining · ×1
  • NoUnsafeOptionalChaining::run (cognitive 69) crates/biome_js_analyze/src/lint/correctness/no_unsafe_optional_chaining.rs:88 — NoUnsafeOptionalChaining::run has cognitive complexity 69 (threshold 15). Drivers by points: if/else 21 (60 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsExtent · ×1
  • JsExtent::run (cognitive 68) crates/biome_js_extent/src/lib.rs:344 — JsExtent::run has cognitive complexity 68 (threshold 15). Drivers by points: if/else 11 (36 pts), match/switch 7 (21 pts), boolean chains 10, loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QuoteBlockList · ×1
  • QuoteBlockList::fmt (cognitive 65) crates/biome_markdown_formatter/src/quote.rs:96 — QuoteBlockList::fmt has cognitive complexity 65 (threshold 15). Drivers by points: if/else 17 (47 pts), loops 4 (11 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatJsxChildList · ×1
  • FormatJsxChildList::fmt_children (cognitive 64) crates/biome_js_formatter/src/jsx/lists/child_list.rs:70 — FormatJsxChildList::fmt_children has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (49 pts), match/switch 3 (8 pts), boolean chains 6, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUselessEscapeInRegex · ×1
  • NoUselessEscapeInRegex::run (cognitive 62) crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs:60 — NoUselessEscapeInRegex::run has cognitive complexity 62 (threshold 15). Drivers by points: if/else 8 (33 pts), match/switch 4 (14 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseErrorCause · ×1
  • UseErrorCause::run (cognitive 61) crates/biome_js_analyze/src/lint/style/use_error_cause.rs:143 — UseErrorCause::run has cognitive complexity 61 (threshold 15). Drivers by points: if/else 13 (36 pts), match/switch 4 (18 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoFallthroughSwitchClause · ×1
  • NoFallthroughSwitchClause::run (cognitive 61) crates/biome_js_analyze/src/lint/suspicious/no_fallthrough_switch_clause.rs:75 — NoFallthroughSwitchClause::run has cognitive complexity 61 (threshold 15). Drivers by points: if/else 13 (45 pts), loops 4 (10 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PendingSortKey · ×1
  • PendingSortKey::from_candidate (cognitive 60) crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4.rs:488 — PendingSortKey::from_candidate has cognitive complexity 60 (threshold 15). Drivers by points: if/else 27 (46 pts), boolean chains 8, match/switch 3 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseExplicitType · ×1
  • UseExplicitType::run (cognitive 59) crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs:395 — UseExplicitType::run has cognitive complexity 59 (threshold 15). Drivers by points: if/else 23 (52 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseReactFunctionComponentDefinition · ×1
  • UseReactFunctionComponentDefinition::action (cognitive 59) crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:218 — UseReactFunctionComponentDefinition::action has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (47 pts), match/switch 6 (11 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoScriptUrl · ×1
  • NoScriptUrl::run (cognitive 58) crates/biome_js_analyze/src/lint/security/no_script_url.rs:89 — NoScriptUrl::run has cognitive complexity 58 (threshold 15). Drivers by points: if/else 13 (51 pts), loops 1 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 41). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ClassMemberModifiers · ×1
  • ClassMemberModifiers::check_class_member_modifier (cognitive 58) crates/biome_js_parser/src/syntax/class.rs:2263 — ClassMemberModifiers::check_class_member_modifier has cognitive complexity 58 (threshold 15). Drivers by points: if/else 41 (51 pts), boolean chains 6, match/switch 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UseComponentExportOnlyModules · ×1
  • UseComponentExportOnlyModules::run (cognitive 55) crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs:131 — UseComponentExportOnlyModules::run has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 3 (9 pts), boolean chains 6, match/switch 1 (4 pts) (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UseIterableCallbackReturn · ×1
  • UseIterableCallbackReturn::run (cognitive 50) crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:160 — UseIterableCallbackReturn::run has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (40 pts), loops 2 (7 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoMissingScssInterpolation · ×1
  • NoMissingScssInterpolation::run (cognitive 49) crates/biome_css_analyze/src/lint/nursery/no_missing_scss_interpolation.rs:157 — NoMissingScssInterpolation::run has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (45 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoScssNullComparison · ×1
  • NoScssNullComparison::run (cognitive 48) crates/biome_css_analyze/src/lint/nursery/no_scss_null_comparison.rs:72 — NoScssNullComparison::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (37 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUselessUndefined · ×1
  • NoUselessUndefined::run (cognitive 48) crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs:111 — NoUselessUndefined::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (42 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 27). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoDuplicateEnumValues · ×1
  • NoDuplicateEnumValues::run (cognitive 48) crates/biome_js_analyze/src/lint/suspicious/no_duplicate_enum_values.rs:72 — NoDuplicateEnumValues::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (41 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoImplicitCoercions · ×1
  • NoImplicitCoercions::run (cognitive 47) crates/biome_js_analyze/src/lint/complexity/no_implicit_coercions.rs:189 — NoImplicitCoercions::run has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (39 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoUnknownUnit · ×1
  • NoUnknownUnit::run (cognitive 46) crates/biome_css_analyze/src/lint/correctness/no_unknown_unit.rs:90 — NoUnknownUnit::run has cognitive complexity 46 (threshold 15). Drivers by points: if/else 6 (32 pts), match/switch 4 (10 pts), loops 1 (4 pts) (nesting depth added 35). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DeclarationOrRuleList · ×1
  • DeclarationOrRuleList::parse_element (cognitive 44) crates/biome_css_parser/src/syntax/block/declaration_or_rule_list_block.rs:193 — DeclarationOrRuleList::parse_element has cognitive complexity 44 (threshold 15). Drivers by points: if/else 26 (39 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeriveStructInput · ×1
  • DeriveStructInput::parse (cognitive 44) crates/biome_diagnostics_macros/src/parse.rs:63 — DeriveStructInput::parse has cognitive complexity 44 (threshold 15). Drivers by points: match/switch 5 (19 pts), if/else 10 (13 pts), loops 5 (12 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoDisabledAttribute · ×1
  • NoDisabledAttribute::action (cognitive 44) crates/biome_html_analyze/src/lint/nursery/no_disabled_attribute.rs:202 — NoDisabledAttribute::action has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (39 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoNegationInEqualityCheck · ×1
  • NoNegationInEqualityCheck::action (cognitive 44) crates/biome_js_analyze/src/lint/nursery/no_negation_in_equality_check.rs:105 — NoNegationInEqualityCheck::action has cognitive complexity 44 (threshold 15). Drivers by points: loops 11 (22 pts), if/else 11 (17 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Collator · ×1
  • Collator::cmp (cognitive 44) crates/biome_string_case/src/lib.rs:446 — Collator::cmp has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (30 pts), match/switch 3 (10 pts), loops 2 (4 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseConsistentEnumValueType · ×1
  • UseConsistentEnumValueType::run (cognitive 43) crates/biome_js_analyze/src/lint/style/use_consistent_enum_value_type.rs:79 — UseConsistentEnumValueType::run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (42 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TurboJson · ×1
  • TurboJson::env_vars_cache (cognitive 42) crates/biome_package/src/node_js_package/turbo_json.rs:168 — TurboJson::env_vars_cache has cognitive complexity 42 (threshold 15). Drivers by points: loops 8 (24 pts), if/else 10 (18 pts) (nesting depth added 24). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · FormatSkippedTokenTrivia · ×1
  • FormatSkippedTokenTrivia::fmt_skipped (cognitive 41) crates/biome_formatter/src/trivia.rs:817 — FormatSkippedTokenTrivia::fmt_skipped has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 7 (20 pts), if/else 11 (18 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoTripleSlashReference · ×1
  • NoTripleSlashReference::run (cognitive 41) crates/biome_js_analyze/src/lint/nursery/no_triple_slash_reference.rs:153 — NoTripleSlashReference::run has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (28 pts), match/switch 2 (7 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DecodedCursor · ×1
  • DecodedCursor::next (cognitive 40) crates/biome_css_syntax/src/css_escape.rs:73 — DecodedCursor::next has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArrowChain · ×1
  • ArrowChain::fmt (cognitive 40) crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:509 — ArrowChain::fmt has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 6, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoDuplicateDependencies · ×1
  • NoDuplicateDependencies::run (cognitive 40) crates/biome_json_analyze/src/lint/suspicious/no_duplicate_dependencies.rs:135 — NoDuplicateDependencies::run has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 6 (13 pts), match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatYamlBlockMapExplicitEntry · ×1
  • FormatYamlBlockMapExplicitEntry::fmt_fields (cognitive 40) crates/biome_yaml_formatter/src/yaml/auxiliary/block_map_explicit_entry.rs:17 — FormatYamlBlockMapExplicitEntry::fmt_fields has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 9, match/switch 2 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Analyzer · ×1
  • Analyzer::run_with_optional_inspector (cognitive 39) crates/biome_analyze/src/lib.rs:171 — Analyzer::run_with_optional_inspector has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 7 (10 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PackageJsonVisitor · ×1
  • PackageJsonVisitor::visit_map (cognitive 39) crates/biome_package/src/node_js_package/package_json.rs:633 — PackageJsonVisitor::visit_map has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (35 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnreachableRanges · ×1
  • UnreachableRanges::propagate_ranges (cognitive 38) crates/biome_js_analyze/src/lint/correctness/no_unreachable.rs:793 — UnreachableRanges::propagate_ranges has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseHookAtTopLevel · ×1
  • UseHookAtTopLevel::run (cognitive 38) crates/biome_js_analyze/src/lint/correctness/use_hook_at_top_level.rs:114 — UseHookAtTopLevel::run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 5, loops 2 (5 pts), match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PackageJson · ×1
  • PackageJson::parse_pnpm_workspace_catalog (cognitive 38) crates/biome_package/src/node_js_package/package_json.rs:128 — PackageJson::parse_pnpm_workspace_catalog has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlobalIds · ×1
  • GlobalIds::assign_unique_symbols (cognitive 37) xtask/codegen/src/generate_global_types/lower/ids.rs:242 — GlobalIds::assign_unique_symbols has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuleSelector · ×1
  • RuleSelector::from_str (cognitive 36) crates/biome_configuration/src/analyzer/mod.rs:842 — RuleSelector::from_str has cognitive complexity 36 (threshold 15). Drivers by points: if/else 27 (36 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatMdBlockList · ×1
  • FormatMdBlockList::fmt (cognitive 36) crates/biome_markdown_formatter/src/markdown/lists/block_list.rs:23 — FormatMdBlockList::fmt has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectScanComputer · ×1
  • ProjectScanComputer::compute (cognitive 36) crates/biome_service/src/configuration.rs:1696 — ProjectScanComputer::compute has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MigrationResults · ×1
  • MigrationResults::advices (cognitive 35) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:141 — MigrationResults::advices has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (29 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StructFieldAttrs · ×1
  • StructFieldAttrs::try_from (cognitive 35) crates/biome_deserialize_macros/src/deserializable_derive/struct_field_attrs.rs:53 — StructFieldAttrs::try_from has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoFlatMapIdentity · ×1
  • NoFlatMapIdentity::run (cognitive 35) crates/biome_js_analyze/src/lint/complexity/no_flat_map_identity.rs:56 — NoFlatMapIdentity::run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 4 (12 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsAstNode · ×1
  • JsAstNode::update_field (cognitive 35) crates/biome_js_runtime/src/ast.rs:415 — JsAstNode::update_field has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatGfmTableRowWithOptions · ×1
  • FormatGfmTableRowWithOptions::fmt (cognitive 34) crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs:49 — FormatGfmTableRowWithOptions::fmt has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 3 (9 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatYamlDocument · ×1
  • FormatYamlDocument::fmt_fields (cognitive 34) crates/biome_yaml_formatter/src/yaml/auxiliary/document.rs:12 — FormatYamlDocument::fmt_fields has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AriaRoles · ×1
  • AriaRoles::get_implicit_role (cognitive 33) crates/biome_aria/src/roles.rs:11 — AriaRoles::get_implicit_role has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 9 (17 pts), if/else 8 (15 pts), boolean chains 1 (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GritNodePattern · ×1
  • GritNodePattern::execute (cognitive 33) crates/biome_grit_patterns/src/grit_node_patterns.rs:139 — GritNodePattern::execute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 4 (11 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SortableHtmlAttribute · ×1
  • SortableHtmlAttribute::category (cognitive 33) crates/biome_html_analyze/src/assist/source/use_sorted_attributes.rs:295 — SortableHtmlAttribute::category has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 6 (16 pts) (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_json_parser · ×1
  • biome_json_parser::syntax::parse_sequence (cognitive 33) crates/biome_json_parser/src/syntax.rs:166 — biome_json_parser::syntax::parse_sequence has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 4 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseNumberNamespace · ×1
  • UseNumberNamespace::action (cognitive 32) crates/biome_js_analyze/src/lint/style/use_number_namespace.rs:131 — UseNumberNamespace::action has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 8 (15 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoLeakedRender · ×1
  • NoLeakedRender::run (cognitive 32) crates/biome_js_analyze/src/lint/suspicious/no_leaked_render.rs:108 — NoLeakedRender::run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsSuppressionAction · ×1
  • JsSuppressionAction::apply_inline_suppression (cognitive 32) crates/biome_js_analyze/src/suppression_action.rs:127 — JsSuppressionAction::apply_inline_suppression has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisplayProfiles · ×1
  • DisplayProfiles::fmt (cognitive 31) crates/biome_analyze/src/profiling.rs:454 — DisplayProfiles::fmt has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DeriveInput · ×1
  • DeriveInput::parse (cognitive 31) crates/biome_deserialize_macros/src/deserializable_derive.rs:22 — DeriveInput::parse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoNonoctalDecimalEscape · ×1
  • NoNonoctalDecimalEscape::run (cognitive 31) crates/biome_js_analyze/src/lint/correctness/no_nonoctal_decimal_escape.rs:88 — NoNonoctalDecimalEscape::run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · JsFormatSyntaxRewriter · ×1
  • JsFormatSyntaxRewriter::visit_parenthesized (cognitive 31) crates/biome_js_formatter/src/syntax_rewriter.rs:133 — JsFormatSyntaxRewriter::visit_parenthesized has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, loops 2 (4 pts), match/switch 3 (4 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ProseItemCollector · ×1
  • ProseItemCollector::collect (cognitive 31) crates/biome_markdown_formatter/src/words.rs:741 — ProseItemCollector::collect has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (12 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extract-utilities.extractFunctionalBranches (cognitive 31) · ×1
  • extract-utilities.extractFunctionalBranches (cognitive 31) packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:319 — extract-utilities.extractFunctionalBranches has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (7 pts), ternaries 2 (7 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SummaryReporterVisitor · ×1
  • SummaryReporterVisitor::report_diagnostics (cognitive 30) crates/biome_cli/src/reporter/summary.rs:140 — SummaryReporterVisitor::report_diagnostics has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · biome_configuration_macros · ×1
  • biome_configuration_macros::group_struct::generate_group_struct (cognitive 30) crates/biome_configuration_macros/src/group_struct.rs:8 — biome_configuration_macros::group_struct::generate_group_struct has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 4 (7 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CssLexer · ×1
  • CssLexer::consume_slash (cognitive 30) crates/biome_css_parser/src/lexer/mod.rs:1463 — CssLexer::consume_slash has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ResolvedSelector · ×1
  • ResolvedSelector::normalize (cognitive 30) crates/biome_css_semantic/src/semantic_model/model.rs:499 — ResolvedSelector::normalize has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUnreachable · ×1
  • NoUnreachable::diagnostic (cognitive 30) crates/biome_js_analyze/src/lint/correctness/no_unreachable.rs:97 — NoUnreachable::diagnostic has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2 (6 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoRedundantUseStrict · ×1
  • NoRedundantUseStrict::run (cognitive 30) crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs:114 — NoRedundantUseStrict::run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (6 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnyJsParameterList · ×1
  • AnyJsParameterList::try_merge (cognitive 30) crates/biome_js_analyze/src/lint/style/use_unified_type_signatures.rs:434 — AnyJsParameterList::try_merge has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 4, loops 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BiomeManifest · ×1
  • BiomeManifest::validate (cognitive 30) crates/biome_manifest/src/lib.rs:205 — BiomeManifest::validate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 6 (10 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatYamlVerbatimNode · ×1
  • FormatYamlVerbatimNode::fmt (cognitive 30) crates/biome_yaml_formatter/src/verbatim.rs:49 — FormatYamlVerbatimNode::fmt has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 5 (7 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditorConfig · ×1
  • EditorConfig::from_str (cognitive 29) crates/biome_configuration/src/editorconfig.rs:224 — EditorConfig::from_str has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ControlFlowGraph · ×1
  • ControlFlowGraph::fmt (cognitive 29) crates/biome_control_flow/src/lib.rs:179 — ControlFlowGraph::fmt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatHtmlElement · ×1
  • FormatHtmlElement::fmt_inner (cognitive 29) crates/biome_html_formatter/src/html/auxiliary/element.rs:147 — FormatHtmlElement::fmt_inner has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, if/else 11 (12 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · UseValidForDirection · ×1
  • UseValidForDirection::run (cognitive 29) crates/biome_js_analyze/src/lint/correctness/use_valid_for_direction.rs:61 — UseValidForDirection::run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseSingleVarDeclarator · ×1
  • UseSingleVarDeclarator::action (cognitive 29) crates/biome_js_analyze/src/lint/style/use_single_var_declarator.rs:77 — UseSingleVarDeclarator::action has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatJsDecoratorList · ×1
  • FormatJsDecoratorList::fmt (cognitive 29) crates/biome_js_formatter/src/js/lists/decorator_list.rs:17 — FormatJsDecoratorList::fmt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SanitizeAdapter · ×1
  • SanitizeAdapter::write_str (cognitive 28) crates/biome_console/src/write/termcolor.rs:166 — SanitizeAdapter::write_str has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NoDuplicateSelectors · ×1
  • NoDuplicateSelectors::run (cognitive 28) crates/biome_css_analyze/src/lint/suspicious/no_duplicate_selectors.rs:131 — NoDuplicateSelectors::run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 3 (9 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUnsafeReturn · ×1
  • NoUnsafeReturn::run (cognitive 28) crates/biome_js_analyze/src/lint/nursery/no_unsafe_return.rs:110 — NoUnsafeReturn::run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 6, match/switch 4 (5 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UseExhaustiveSwitchCases · ×1
  • UseExhaustiveSwitchCases::run (cognitive 28) crates/biome_js_analyze/src/lint/nursery/use_exhaustive_switch_cases.rs:154 — UseExhaustiveSwitchCases::run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseEnumInitializers · ×1
  • UseEnumInitializers::action (cognitive 28) crates/biome_js_analyze/src/lint/style/use_enum_initializers.rs:125 — UseEnumInitializers::action has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 2 (7 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatTemplateElement · ×1
  • FormatTemplateElement::fmt (cognitive 28) crates/biome_js_formatter/src/js/auxiliary/template_element.rs:106 — FormatTemplateElement::fmt has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 6 (9 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BooleanCoercionVisitor · ×1
  • BooleanCoercionVisitor::enter (cognitive 28) crates/biome_js_type_info/src/inferred_type/boolean_coercion.rs:149 — BooleanCoercionVisitor::enter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 5 (10 pts), boolean chains 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ProseItemList · ×1
  • ProseItemList::outdented_setext_word_group (cognitive 28) crates/biome_markdown_formatter/src/words.rs:672 — ProseItemList::outdented_setext_word_group has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (17 pts), loops 3 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_markdown_syntax · ×1
  • biome_markdown_syntax::block_ext::line_start_column (cognitive 28) crates/biome_markdown_syntax/src/block_ext.rs:172 — biome_markdown_syntax::block_ext::line_start_column has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NamingConventionSelection · ×1
  • NamingConventionSelection::selectors (cognitive 27) crates/biome_cli/src/execute/migrate/eslint_typescript.rs:267 — NamingConventionSelection::selectors has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConsoleTraversalSummary · ×1
  • ConsoleTraversalSummary::fmt (cognitive 27) crates/biome_cli/src/reporter/terminal.rs:229 — ConsoleTraversalSummary::fmt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (27 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContainerAttrs · ×1
  • ContainerAttrs::try_from (cognitive 27) crates/biome_deserialize_macros/src/deserializable_derive/container_attrs.rs:48 — ContainerAttrs::try_from has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (10 pts), boolean chains 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrintAdvices · ×1
  • PrintAdvices::record_table (cognitive 27) crates/biome_diagnostics/src/display.rs:567 — PrintAdvices::record_table has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GritExecContext · ×1
  • GritExecContext::exec_step (cognitive 27) crates/biome_grit_patterns/src/grit_context.rs:139 — GritExecContext::exec_step has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseExhaustiveDependencies · ×1
  • UseExhaustiveDependencies::run (cognitive 27) crates/biome_js_analyze/src/lint/correctness/use_exhaustive_dependencies.rs:479 — UseExhaustiveDependencies::run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (6 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rules_check · ×1
  • rules_check::check_rules (cognitive 27) xtask/rules_check/src/lib.rs:48 — rules_check::check_rules has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13, boolean chains 9, loops 3 (5 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Suppressions · ×1
  • Suppressions::suppresses (cognitive 26) crates/biome_analyze/src/suppressions.rs:442 — Suppressions::suppresses has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (8 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlatConfigData · ×1
  • FlatConfigData::into_biome_config (cognitive 26) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:520 — FlatConfigData::into_biome_config has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultFinalizer · ×1
  • DefaultFinalizer::finalize (cognitive 26) crates/biome_cli/src/runner/impls/finalizers/default.rs:29 — DefaultFinalizer::finalize has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseButtonType · ×1
  • UseButtonType::run (cognitive 26) crates/biome_js_analyze/src/lint/a11y/use_button_type.rs:119 — UseButtonType::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseDestructuring · ×1
  • UseDestructuring::run (cognitive 26) crates/biome_js_analyze/src/lint/style/use_destructuring.rs:115 — UseDestructuring::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 3 (7 pts), boolean chains 3 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatGfmTableDelimiterCell · ×1
  • FormatGfmTableDelimiterCell::fmt_fields (cognitive 26) crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_cell.rs:21 — FormatGfmTableDelimiterCell::fmt_fields has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (15 pts), if/else 7 (8 pts), match/switch 1 (3 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Includes · ×1
  • Includes::run (cognitive 26) crates/biome_migrate/src/analyzers/includes.rs:25 — Includes::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · State · ×1
  • State::to_includes (cognitive 26) crates/biome_migrate/src/analyzers/includes.rs:145 — State::to_includes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CssModuleVisitor · ×1
  • CssModuleVisitor::visit (cognitive 26) crates/biome_module_graph/src/css_module_info/visitor.rs:29 — CssModuleVisitor::visit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseNamingConventionOptions · ×1
  • UseNamingConventionOptions::from (cognitive 26) crates/biome_cli/src/execute/migrate/eslint_typescript.rs:155 — UseNamingConventionOptions::from has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatYamlBlockContent · ×1
  • FormatYamlBlockContent::fmt_fields (cognitive 26) crates/biome_yaml_formatter/src/yaml/auxiliary/block_content.rs:22 — FormatYamlBlockContent::fmt_fields has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (6 pts), boolean chains 4, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SymbolsMicrosoftTestCase · ×1
  • SymbolsMicrosoftTestCase::run (cognitive 26) xtask/coverage/src/symbols/msts.rs:40 — SymbolsMicrosoftTestCase::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigurationInspector · ×1
  • ConfigurationInspector::inspect_key (cognitive 25) crates/biome_cli/src/commands/inspect/config/configuration.rs:79 — ConfigurationInspector::inspect_key has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CheckstyleReporterVisitor · ×1
  • CheckstyleReporterVisitor::report_diagnostics (cognitive 25) crates/biome_cli/src/reporter/checkstyle.rs:50 — CheckstyleReporterVisitor::report_diagnostics has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (6 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseVueVForKey · ×1
  • UseVueVForKey::run (cognitive 25) crates/biome_html_analyze/src/lint/correctness/use_vue_v_for_key.rs:58 — UseVueVForKey::run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HtmlSplitChunksIterator · ×1
  • HtmlSplitChunksIterator::next (cognitive 25) crates/biome_html_formatter/src/utils/children.rs:752 — HtmlSplitChunksIterator::next has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatTsIntersectionTypeElementList · ×1
  • FormatTsIntersectionTypeElementList::fmt (cognitive 25) crates/biome_js_formatter/src/ts/lists/intersection_type_element_list.rs:13 — FormatTsIntersectionTypeElementList::fmt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TypeDataTransformer · ×1
  • TypeDataTransformer::transform (cognitive 25) crates/biome_js_type_info/src/type_transform.rs:253 — TypeDataTransformer::transform has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 4 (9 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.run (cognitive 25) · ×1
  • index.run (cognitive 25) packages/prettier-compare/src/index.tsx:128 — index.run has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 7 (8 pts), error handling 3 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CheckProcessFile · ×1
  • CheckProcessFile::process_file (cognitive 24) crates/biome_cli/src/runner/impls/process_file/check.rs:17 — CheckProcessFile::process_file has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UseOptionalChain · ×1
  • UseOptionalChain::action (cognitive 24) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:185 — UseOptionalChain::action has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 3 (7 pts), loops 2 (4 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoVueSideEffectsInComputed · ×1
  • NoVueSideEffectsInComputed::run (cognitive 24) crates/biome_js_analyze/src/lint/nursery/no_vue_side_effects_in_computed.rs:111 — NoVueSideEffectsInComputed::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseVueValidDefineProps · ×1
  • UseVueValidDefineProps::run (cognitive 24) crates/biome_js_analyze/src/lint/nursery/use_vue_valid_define_props.rs:126 — UseVueValidDefineProps::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2 (4 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseVueDefineMacrosOrder · ×1
  • UseVueDefineMacrosOrder::run (cognitive 24) crates/biome_js_analyze/src/lint/style/use_vue_define_macros_order.rs:126 — UseVueDefineMacrosOrder::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoConstantBinaryExpressions · ×1
  • NoConstantBinaryExpressions::run (cognitive 24) crates/biome_js_analyze/src/lint/suspicious/no_constant_binary_expressions.rs:159 — NoConstantBinaryExpressions::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 3 (5 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MissingAwaitVisitor · ×1
  • MissingAwaitVisitor::visit (cognitive 24) crates/biome_js_analyze/src/lint/suspicious/use_await.rs:133 — MissingAwaitVisitor::visit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatClass · ×1
  • FormatClass::fmt (cognitive 24) crates/biome_js_formatter/src/utils/format_class.rs:40 — FormatClass::fmt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LSPServer · ×1
  • LSPServer::setup_capabilities (cognitive 24) crates/biome_lsp/src/server.rs:214 — LSPServer::setup_capabilities has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HtmlModuleVisitor · ×1
  • HtmlModuleVisitor::collect_js_imports (cognitive 24) crates/biome_module_graph/src/html_module_info/visitor.rs:140 — HtmlModuleVisitor::collect_js_imports has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProcessLint · ×1
  • ProcessLint::process_signal (cognitive 24) crates/biome_service/src/file_handlers/mod.rs:709 — ProcessLint::process_signal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseVueValidVSlot · ×1
  • UseVueValidVSlot::run (cognitive 23) crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_slot.rs:145 — UseVueValidVSlot::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseValidAnchor · ×1
  • UseValidAnchor::run (cognitive 23) crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs:157 — UseValidAnchor::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoComponentHookFactories · ×1
  • NoComponentHookFactories::run (cognitive 23) crates/biome_js_analyze/src/lint/correctness/no_component_hook_factories.rs:106 — NoComponentHookFactories::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseInlineScriptId · ×1
  • UseInlineScriptId::run (cognitive 23) crates/biome_js_analyze/src/lint/correctness/use_inline_script_id.rs:86 — UseInlineScriptId::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseBlockStatements · ×1
  • UseBlockStatements::action (cognitive 23) crates/biome_js_analyze/src/lint/style/use_block_statements.rs:179 — UseBlockStatements::action has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseConsistentCurlyBraces · ×1
  • UseConsistentCurlyBraces::action (cognitive 23) crates/biome_js_analyze/src/lint/style/use_consistent_curly_braces.rs:153 — UseConsistentCurlyBraces::action has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 3 (4 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoCommentText · ×1
  • NoCommentText::run (cognitive 23) crates/biome_js_analyze/src/lint/suspicious/no_comment_text.rs:91 — NoCommentText::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_js_factory · ×1
  • biome_js_factory::utils::escape (cognitive 23) crates/biome_js_factory/src/utils.rs:15 — biome_js_factory::utils::escape has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (9 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RageConfiguration · ×1
  • RageConfiguration::fmt (cognitive 22) crates/biome_cli/src/commands/rage.rs:208 — RageConfiguration::fmt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (5 pts), loops 1 (4 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatCustomIdentifier · ×1
  • FormatCustomIdentifier::fmt (cognitive 22) crates/biome_css_syntax/src/property_syntax/data.rs:477 — FormatCustomIdentifier::fmt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_fs · ×1
  • biome_fs::fs::os::handle_any_file (cognitive 22) crates/biome_fs/src/fs/os.rs:291 — biome_fs::fs::os::handle_any_file has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (20 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoAriaHiddenOnFocusable · ×1
  • NoAriaHiddenOnFocusable::run (cognitive 22) crates/biome_js_analyze/src/lint/a11y/no_aria_hidden_on_focusable.rs:71 — NoAriaHiddenOnFocusable::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NumberLiteral · ×1
  • NumberLiteral::try_from (cognitive 22) crates/biome_js_analyze/src/lint/complexity/use_simple_number_keys.rs:203 — NumberLiteral::try_from has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUnusedVariables · ×1
  • NoUnusedVariables::run (cognitive 22) crates/biome_js_analyze/src/lint/correctness/no_unused_variables.rs:271 — NoUnusedVariables::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 10 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NoUselessSpread · ×1
  • NoUselessSpread::run (cognitive 22) crates/biome_js_analyze/src/lint/nursery/no_useless_spread.rs:124 — NoUselessSpread::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoAwaitInLoops · ×1
  • NoAwaitInLoops::run (cognitive 22) crates/biome_js_analyze/src/lint/performance/no_await_in_loops.rs:58 — NoAwaitInLoops::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoInferrableTypes · ×1
  • NoInferrableTypes::run (cognitive 22) crates/biome_js_analyze/src/lint/style/no_inferrable_types.rs:113 — NoInferrableTypes::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsDeclarationKind · ×1
  • JsDeclarationKind::from_node (cognitive 22) crates/biome_js_semantic/src/semantic_model/binding.rs:129 — JsDeclarationKind::from_node has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (10 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CssPropertyTraversal · ×1
  • CssPropertyTraversal::last_property_in_module_context_from (cognitive 22) crates/biome_module_graph/src/css_module_info/traverse.rs:317 — CssPropertyTraversal::last_property_in_module_context_from has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnalyzerJsPlugin · ×1
  • AnalyzerJsPlugin::evaluate (cognitive 22) crates/biome_plugin_loader/src/analyzer_js_plugin.rs:203 — AnalyzerJsPlugin::evaluate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (5 pts), match/switch 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisplayDomains · ×1
  • DisplayDomains::fmt (cognitive 22) crates/biome_service/src/documentation/mod.rs:265 — DisplayDomains::fmt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunningBiomeServer · ×1
  • RunningBiomeServer::fmt (cognitive 21) crates/biome_cli/src/commands/rage.rs:118 — RunningBiomeServer::fmt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SelectorWalker · ×1
  • SelectorWalker::visit_selector (cognitive 21) crates/biome_css_analyze/src/lint/nursery/no_excessive_selector_complexity.rs:638 — SelectorWalker::visit_selector has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 4 (8 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GritTargetNode · ×1
  • GritTargetNode::matches_kinds_recursively_with (cognitive 21) crates/biome_grit_patterns/src/grit_target_node.rs:283 — GritTargetNode::matches_kinds_recursively_with has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsePlaywrightValidDescribeCallback · ×1
  • UsePlaywrightValidDescribeCallback::run (cognitive 21) crates/biome_js_analyze/src/lint/correctness/use_playwright_valid_describe_callback.rs:75 — UsePlaywrightValidDescribeCallback::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseVueMatchingComponentFileName · ×1
  • UseVueMatchingComponentFileName::run (cognitive 21) crates/biome_js_analyze/src/lint/nursery/use_vue_matching_component_file_name.rs:95 — UseVueMatchingComponentFileName::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUselessEscapeInString · ×1
  • NoUselessEscapeInString::run (cognitive 21) crates/biome_js_analyze/src/lint/suspicious/no_useless_escape_in_string.rs:76 — NoUselessEscapeInString::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseGuardForIn · ×1
  • UseGuardForIn::run (cognitive 21) crates/biome_js_analyze/src/lint/suspicious/use_guard_for_in.rs:72 — UseGuardForIn::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 3 (7 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · JsCallExpression · ×1
  • JsCallExpression::is_test_call_expression (cognitive 21) crates/biome_js_syntax/src/expr_ext.rs:2175 — JsCallExpression::is_test_call_expression has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoUntrustedLicenses · ×1
  • NoUntrustedLicenses::run (cognitive 21) crates/biome_json_analyze/src/lint/suspicious/no_untrusted_licenses.rs:199 — NoUntrustedLicenses::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_parser · ×1
  • biome_parser::event::process (cognitive 21) crates/biome_parser/src/event.rs:48 — biome_parser::event::process has cognitive complexity 21 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), match/switch 2 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectDb · ×1
  • ProjectDb::get_file_features (cognitive 21) crates/biome_service/src/projects.rs:224 — ProjectDb::get_file_features has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecessOrderMember · ×1
  • RecessOrderMember::kind (cognitive 20) crates/biome_css_analyze/src/assist/source/use_sorted_properties.rs:357 — RecessOrderMember::kind has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 4 (8 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatCssDeclarationOrRuleList · ×1
  • FormatCssDeclarationOrRuleList::fmt (cognitive 20) crates/biome_css_formatter/src/css/lists/declaration_or_rule_list.rs:8 — FormatCssDeclarationOrRuleList::fmt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommaGroupsWriter · ×1
  • CommaGroupsWriter::write_next_group (cognitive 20) crates/biome_css_formatter/src/utils/component_value_list/comma_groups.rs:167 — CommaGroupsWriter::write_next_group has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PageAtRuleItemList · ×1
  • PageAtRuleItemList::parse_element (cognitive 20) crates/biome_css_parser/src/syntax/at_rule/page.rs:221 — PageAtRuleItemList::parse_element has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoEmptyCharacterClassInRegex · ×1
  • NoEmptyCharacterClassInRegex::run (cognitive 20) crates/biome_js_analyze/src/lint/correctness/no_empty_character_class_in_regex.rs:61 — NoEmptyCharacterClassInRegex::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CharCaseIterator · ×1
  • CharCaseIterator::next (cognitive 20) crates/biome_js_analyze/src/lint/correctness/no_string_case_mismatch.rs:228 — CharCaseIterator::next has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (6 pts), match/switch 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoTanstackQueryVoidQueryFn · ×1
  • NoTanstackQueryVoidQueryFn::run (cognitive 20) crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:135 — NoTanstackQueryVoidQueryFn::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (5 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoDangerouslySetInnerHtml · ×1
  • NoDangerouslySetInnerHtml::run (cognitive 20) crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs:76 — NoDangerouslySetInnerHtml::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 1 (4 pts), match/switch 2 (3 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoJsxLiterals · ×1
  • NoJsxLiterals::run (cognitive 20) crates/biome_js_analyze/src/lint/style/no_jsx_literals.rs:144 — NoJsxLiterals::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseTrimStartEnd · ×1
  • UseTrimStartEnd::action (cognitive 20) crates/biome_js_analyze/src/lint/style/use_trim_start_end.rs:124 — UseTrimStartEnd::action has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (16 pts), match/switch 3 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · UseUnicodeRegex · ×1
  • UseUnicodeRegex::action (cognitive 20) crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs:128 — UseUnicodeRegex::action has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · JsSemanticModel · ×1
  • JsSemanticModel::init (cognitive 20) crates/biome_js_runtime/src/semantic.rs:54 — JsSemanticModel::init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · JsAssignmentExpression · ×1
  • JsAssignmentExpression::needs_parentheses (cognitive 20) crates/biome_js_syntax/src/parentheses/expression.rs:135 — JsAssignmentExpression::needs_parentheses has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatLiteralLines · ×1
  • FormatLiteralLines::fmt (cognitive 20) crates/biome_markdown_formatter/src/shared.rs:156 — FormatLiteralLines::fmt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpwardTraversal · ×1
  • UpwardTraversal::next_item (cognitive 20) crates/biome_module_graph/src/traverse.rs:138 — UpwardTraversal::next_item has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (13 pts), if/else 1 (5 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PreorderMatching · ×1
  • PreorderMatching::next (cognitive 20) crates/biome_rowan/src/cursor/node.rs:1005 — PreorderMatching::next has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RawLanguageSyntaxFactory · ×1
  • RawLanguageSyntaxFactory::make_syntax (cognitive 20) crates/biome_rowan/src/raw_language.rs:201 — RawLanguageSyntaxFactory::make_syntax has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Watcher · ×1
  • Watcher::handle_notify_event (cognitive 20) crates/biome_service/src/scanner/watcher.rs:254 — Watcher::handle_notify_event has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 5 (10 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlowSequenceEntryList · ×1
  • FlowSequenceEntryList::parse_element (cognitive 20) crates/biome_yaml_parser/src/parser/flow.rs:140 — FlowSequenceEntryList::parse_element has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · watch.createWatcher (cognitive 20) · ×1
  • watch.createWatcher (cognitive 20) packages/prettier-compare/src/watch.ts:63 — watch.createWatcher has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 5 (6 pts), loops 2, boolean chains 1 (nesting depth added 2). None of this is in the body itself: all 20 points belong to 8 function items inside it that branch (a function literal at line 120, visitDirectory, handleWatcherEvent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · App.App (cognitive 20) · ×1
  • App.App (cognitive 20) packages/prettier-compare/src/components/App.tsx:37 — App.App has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, ternaries 2 (5 pts), if/else 4, error handling 2 (3 pts) (nesting depth added 4). Of this number, 10 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoDuplicateAtImportRules · ×1
  • NoDuplicateAtImportRules::run (cognitive 19) crates/biome_css_analyze/src/lint/suspicious/no_duplicate_at_import_rules.rs:76 — NoDuplicateAtImportRules::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffReport · ×1
  • DiffReport::print (cognitive 19) crates/biome_formatter_test/src/diff_report.rs:100 — DiffReport::print has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4 (8 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseSortedTypeFields · ×1
  • UseSortedTypeFields::run (cognitive 19) crates/biome_graphql_analyze/src/assist/source/use_sorted_type_fields.rs:66 — UseSortedTypeFields::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatHtmlVerbatimNode · ×1
  • FormatHtmlVerbatimNode::fmt (cognitive 19) crates/biome_html_formatter/src/verbatim.rs:58 — FormatHtmlVerbatimNode::fmt has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 8, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · HtmlAttributeList · ×1
  • HtmlAttributeList::find_multiple_attributes_by_name (cognitive 19) crates/biome_html_syntax/src/attribute_ext.rs:339 — HtmlAttributeList::find_multiple_attributes_by_name has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoAdjacentSpacesInRegex · ×1
  • NoAdjacentSpacesInRegex::run (cognitive 19) crates/biome_js_analyze/src/lint/complexity/no_adjacent_spaces_in_regex.rs:66 — NoAdjacentSpacesInRegex::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUnusedPrivateClassMembers · ×1
  • NoUnusedPrivateClassMembers::action (cognitive 19) crates/biome_js_analyze/src/lint/correctness/no_unused_private_class_members.rs:212 — NoUnusedPrivateClassMembers::action has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 1 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NonTransparentLeaves · ×1
  • NonTransparentLeaves::next (cognitive 19) crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type/analysis.rs:655 — NonTransparentLeaves::next has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseAccessorPairs · ×1
  • UseAccessorPairs::run (cognitive 19) crates/biome_js_analyze/src/lint/nursery/use_accessor_pairs.rs:125 — UseAccessorPairs::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseConsistentFunctionStyle · ×1
  • UseConsistentFunctionStyle::run (cognitive 19) crates/biome_js_analyze/src/lint/nursery/use_consistent_function_style.rs:170 — UseConsistentFunctionStyle::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 3 (6 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseExplicitReturnType · ×1
  • UseExplicitReturnType::run (cognitive 19) crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:277 — UseExplicitReturnType::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoBarrelFile · ×1
  • NoBarrelFile::run (cognitive 19) crates/biome_js_analyze/src/lint/performance/no_barrel_file.rs:60 — NoBarrelFile::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatTsTypeArguments · ×1
  • FormatTsTypeArguments::fmt_fields (cognitive 19) crates/biome_js_formatter/src/ts/expressions/type_arguments.rs:14 — FormatTsTypeArguments::fmt_fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FormatBinaryLikeOperatorAndRight · ×1
  • FormatBinaryLikeOperatorAndRight::fmt (cognitive 19) crates/biome_js_formatter/src/utils/format_binary_like_expression.rs:381 — FormatBinaryLikeOperatorAndRight::fmt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatJsVerbatimNode · ×1
  • FormatJsVerbatimNode::fmt (cognitive 19) crates/biome_js_formatter/src/verbatim.rs:45 — FormatJsVerbatimNode::fmt has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 8, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · AnyJsExpression · ×1
  • AnyJsExpression::contains_a_test_pattern (cognitive 19) crates/biome_js_syntax/src/expr_ext.rs:977 — AnyJsExpression::contains_a_test_pattern has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (17 pts), if/else 2 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatJsonVerbatimNode · ×1
  • FormatJsonVerbatimNode::fmt (cognitive 19) crates/biome_json_formatter/src/verbatim.rs:44 — FormatJsonVerbatimNode::fmt has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 8, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · FormatMdListMarkerPrefix · ×1
  • FormatMdListMarkerPrefix::fmt_fields (cognitive 19) crates/biome_markdown_formatter/src/markdown/auxiliary/list_marker_prefix.rs:16 — FormatMdListMarkerPrefix::fmt_fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GuardFunctions · ×1
  • GuardFunctions::guard (cognitive 19) crates/biome_module_graph/src/js_module_info/flow/guards.rs:265 — GuardFunctions::guard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 5 (8 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlowRootScanner · ×1
  • FlowRootScanner::enter (cognitive 19) crates/biome_module_graph/src/js_module_info/flow/scanner.rs:87 — FlowRootScanner::enter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CodeBlock · ×1
  • CodeBlock::from_str (cognitive 19) crates/biome_ruledoc_utils/src/codeblock.rs:124 — CodeBlock::from_str has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VcsIgnoredPatterns · ×1
  • VcsIgnoredPatterns::is_ignored (cognitive 19) crates/biome_service/src/settings.rs:1477 — VcsIgnoredPatterns::is_ignored has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · biome_ungrammar · ×1
  • biome_ungrammar::lexer::advance (cognitive 19) crates/biome_ungrammar/src/lexer.rs:96 — biome_ungrammar::lexer::advance has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (15 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RuleSignal · ×1
  • RuleSignal::actions (cognitive 18) crates/biome_analyze/src/signals.rs:631 — RuleSignal::actions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RangeSuppressions · ×1
  • RangeSuppressions::push_suppression (cognitive 18) crates/biome_analyze/src/suppressions.rs:233 — RangeSuppressions::push_suppression has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_deserialize_macros · ×1
  • biome_deserialize_macros::deserializable_derive::generate_deserializable_struct (cognitive 18) crates/biome_deserialize_macros/src/deserializable_derive.rs:326 — biome_deserialize_macros::deserializable_derive::generate_deserializable_struct has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TransformSourceMap · ×1
  • TransformSourceMap::map_markers (cognitive 18) crates/biome_formatter/src/source_map.rs:229 — TransformSourceMap::map_markers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatHtmlAttributeInitializerClause · ×1
  • FormatHtmlAttributeInitializerClause::fmt_fields (cognitive 18) crates/biome_html_formatter/src/html/auxiliary/attribute_initializer_clause.rs:71 — FormatHtmlAttributeInitializerClause::fmt_fields has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseValidLang · ×1
  • UseValidLang::run (cognitive 18) crates/biome_js_analyze/src/lint/a11y/use_valid_lang.rs:64 — UseValidLang::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoExtraBooleanCast · ×1
  • NoExtraBooleanCast::run (cognitive 18) crates/biome_js_analyze/src/lint/complexity/no_extra_boolean_cast.rs:115 — NoExtraBooleanCast::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UnusedLabelVisitor · ×1
  • UnusedLabelVisitor::visit (cognitive 18) crates/biome_js_analyze/src/lint/correctness/no_unused_labels.rs:157 — UnusedLabelVisitor::visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoSvelteUselessDerivedBy · ×1
  • NoSvelteUselessDerivedBy::run (cognitive 18) crates/biome_js_analyze/src/lint/nursery/no_svelte_useless_derived_by.rs:82 — NoSvelteUselessDerivedBy::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseIteratorZip · ×1
  • UseIteratorZip::run (cognitive 18) crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:117 — UseIteratorZip::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoDelete · ×1
  • NoDelete::run (cognitive 18) crates/biome_js_analyze/src/lint/performance/no_delete.rs:82 — NoDelete::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (18 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThisScopeVisitor · ×1
  • ThisScopeVisitor::visit (cognitive 18) crates/biome_js_analyze/src/services/semantic_class.rs:443 — ThisScopeVisitor::visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FormatJsCallArguments · ×1
  • FormatJsCallArguments::fmt_fields (cognitive 18) crates/biome_js_formatter/src/js/expressions/call_arguments.rs:27 — FormatJsCallArguments::fmt_fields has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JsExecContext · ×1
  • JsExecContext::load_rules (cognitive 18) crates/biome_js_runtime/src/context.rs:141 — JsExecContext::load_rules has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsxAttributeList · ×1
  • JsxAttributeList::find_by_names (cognitive 18) crates/biome_js_syntax/src/jsx_ext.rs:279 — JsxAttributeList::find_by_names has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseSeparatedList · ×1
  • ParseSeparatedList::parse_list (cognitive 18) crates/biome_parser/src/parse_lists.rs:152 — ParseSeparatedList::parse_list has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportSourceKind · ×1
  • ImportSourceKind::from_source (cognitive 18) crates/biome_rule_options/src/organize_imports/import_source.rs:91 — ImportSourceKind::from_source has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 2 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Settings · ×1
  • Settings::apply_configuration (cognitive 18) crates/biome_service/src/settings.rs:308 — Settings::apply_configuration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SummaryReporter · ×1
  • SummaryReporter::test_completed (cognitive 18) xtask/coverage/src/reporters.rs:286 — SummaryReporter::test_completed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extract-utilities.addKeywordBranches (cognitive 18) · ×1
  • extract-utilities.addKeywordBranches (cognitive 18) packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:403 — extract-utilities.addKeywordBranches has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseAriaSpec (cognitive 18) · ×1
  • parseAriaSpec (cognitive 18) packages/aria-data/generate-aria-data.js:6 — parseAriaSpec has cognitive complexity 18 (threshold 15). Drivers by points: other 15, loops 3. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · InspectionDiagnostic · ×1
  • InspectionDiagnostic::source_advices (cognitive 17) crates/biome_cli/src/commands/inspect.rs:331 — InspectionDiagnostic::source_advices has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StylelintMigrationResults · ×1
  • StylelintMigrationResults::advices (cognitive 17) crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs:130 — StylelintMigrationResults::advices has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScssStringScanner · ×1
  • ScssStringScanner::scan_body (cognitive 17) crates/biome_css_parser/src/lexer/scan_cursor.rs:812 — ScssStringScanner::scan_body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentsBuilder · ×1
  • CommentsBuilder::add_comment (cognitive 17) crates/biome_formatter/src/comments/builder.rs:589 — CommentsBuilder::add_comment has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 2 (5 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FileSystem · ×1
  • FileSystem::auto_search_files_with_predicate (cognitive 17) crates/biome_fs/src/fs.rs:184 — FileSystem::auto_search_files_with_predicate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatHtmlVerbatimElementChildren · ×1
  • FormatHtmlVerbatimElementChildren::fmt (cognitive 17) crates/biome_html_formatter/src/verbatim.rs:196 — FormatHtmlVerbatimElementChildren::fmt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExpressionExt · ×1
  • ExpressionExt::is_number (cognitive 17) crates/biome_js_analyze/src/lint/complexity/no_implicit_coercions.rs:555 — ExpressionExt::is_number has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseArrowFunction · ×1
  • UseArrowFunction::run (cognitive 17) crates/biome_js_analyze/src/lint/complexity/use_arrow_function.rs:107 — UseArrowFunction::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseJsonImportAttributes · ×1
  • UseJsonImportAttributes::run (cognitive 17) crates/biome_js_analyze/src/lint/correctness/use_json_import_attributes.rs:68 — UseJsonImportAttributes::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUndeclaredClasses · ×1
  • NoUndeclaredClasses::run (cognitive 17) crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:96 — NoUndeclaredClasses::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpliceReplacement · ×1
  • SpliceReplacement::from_arguments (cognitive 17) crates/biome_js_analyze/src/lint/nursery/no_useless_splice.rs:302 — SpliceReplacement::from_arguments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FlattenedArguments · ×1
  • FlattenedArguments::next (cognitive 17) crates/biome_js_analyze/src/lint/nursery/use_flat_math_min_max.rs:256 — FlattenedArguments::next has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoNonNullAssertion · ×1
  • NoNonNullAssertion::action (cognitive 17) crates/biome_js_analyze/src/lint/style/no_non_null_assertion.rs:98 — NoNonNullAssertion::action has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoParameterAssign · ×1
  • NoParameterAssign::run (cognitive 17) crates/biome_js_analyze/src/lint/style/no_parameter_assign.rs:125 — NoParameterAssign::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoDuplicateElseIf · ×1
  • NoDuplicateElseIf::run (cognitive 17) crates/biome_js_analyze/src/lint/suspicious/no_duplicate_else_if.rs:69 — NoDuplicateElseIf::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoPlaywrightNetworkidle · ×1
  • NoPlaywrightNetworkidle::run (cognitive 17) crates/biome_js_analyze/src/lint/suspicious/no_playwright_networkidle.rs:58 — NoPlaywrightNetworkidle::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUnknownAttribute · ×1
  • NoUnknownAttribute::run (cognitive 17) crates/biome_js_analyze/src/lint/suspicious/no_unknown_attribute.rs:104 — NoUnknownAttribute::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · biome_js_control_flow · ×1
  • biome_js_control_flow::nodes::is_truthy_literal (cognitive 17) crates/biome_js_control_flow/src/nodes.rs:40 — biome_js_control_flow::nodes::is_truthy_literal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatTypeVariant · ×1
  • FormatTypeVariant::fmt (cognitive 17) crates/biome_js_formatter/src/ts/lists/union_type_variant_list.rs:86 — FormatTypeVariant::fmt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SimpleArgument · ×1
  • SimpleArgument::is_simple_call_like_expression (cognitive 17) crates/biome_js_formatter/src/utils/member_chain/simple_argument.rs:87 — SimpleArgument::is_simple_call_like_expression has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoJsonUnsafeValues · ×1
  • NoJsonUnsafeValues::run (cognitive 17) crates/biome_json_analyze/src/lint/nursery/no_json_unsafe_values.rs:104 — NoJsonUnsafeValues::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · IgnoreScanner · ×1
  • IgnoreScanner::action (cognitive 17) crates/biome_migrate/src/analyzers/ignore_scanner.rs:49 — IgnoreScanner::action has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (8 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GreenChunks · ×1
  • GreenChunks::next (cognitive 17) crates/biome_rowan/src/syntax_node_text.rs:239 — GreenChunks::next has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnalyzerVisitorBuilder · ×1
  • AnalyzerVisitorBuilder::finish (cognitive 17) crates/biome_service/src/file_handlers/mod.rs:2611 — AnalyzerVisitorBuilder::finish has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OverrideSettingPattern · ×1
  • OverrideSettingPattern::apply_overrides_to_js_format_options (cognitive 17) crates/biome_service/src/settings.rs:2096 — OverrideSettingPattern::apply_overrides_to_js_format_options has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GitRepo · ×1
  • GitRepo::open (cognitive 17) xtask/codegen/src/formatter.rs:24 — GitRepo::open has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (5 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate-aria-data.parseConcept (cognitive 17) · ×1
  • generate-aria-data.parseConcept (cognitive 17) packages/aria-data/generate-aria-data.js:224 — generate-aria-data.parseConcept has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4, ternaries 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plainOutput.printComparison (cognitive 17) · ×1
  • plainOutput.printComparison (cognitive 17) packages/prettier-compare/src/plainOutput.ts:34 — plainOutput.printComparison has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 1 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SarifReporterVisitor · ×1
  • SarifReporterVisitor::report_diagnostics (cognitive 16) crates/biome_cli/src/reporter/sarif.rs:182 — SarifReporterVisitor::report_diagnostics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatScssEachMultiValueHeader · ×1
  • FormatScssEachMultiValueHeader::fmt (cognitive 16) crates/biome_css_formatter/src/scss/auxiliary/each_header.rs:149 — FormatScssEachMultiValueHeader::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatCssVerbatimNode · ×1
  • FormatCssVerbatimNode::fmt (cognitive 16) crates/biome_css_formatter/src/verbatim.rs:136 — FormatCssVerbatimNode::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, loops 4 (6 pts), match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MemoryTraversalScope · ×1
  • MemoryTraversalScope::evaluate (cognitive 16) crates/biome_fs/src/fs/memory.rs:307 — MemoryTraversalScope::evaluate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 1 (3 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseVueValidVOn · ×1
  • UseVueValidVOn::run (cognitive 16) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_on.rs:68 — UseVueValidVOn::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoVueUselessTemplateAttributes · ×1
  • NoVueUselessTemplateAttributes::run (cognitive 16) crates/biome_html_analyze/src/lint/nursery/no_vue_useless_template_attributes.rs:93 — NoVueUselessTemplateAttributes::run has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 2 (5 pts), boolean chains 4, if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UseConsistentBlockLang · ×1
  • UseConsistentBlockLang::run (cognitive 16) crates/biome_html_analyze/src/lint/nursery/use_consistent_block_lang.rs:142 — UseConsistentBlockLang::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HtmlCommentStyle · ×1
  • HtmlCommentStyle::place_comment (cognitive 16) crates/biome_html_formatter/src/comments.rs:54 — HtmlCommentStyle::place_comment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FormatHtmlOpeningElement · ×1
  • FormatHtmlOpeningElement::fmt_dangling_comments (cognitive 16) crates/biome_html_formatter/src/html/auxiliary/opening_element.rs:67 — FormatHtmlOpeningElement::fmt_dangling_comments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoUselessConstructor · ×1
  • NoUselessConstructor::run (cognitive 16) crates/biome_js_analyze/src/lint/complexity/no_useless_constructor.rs:156 — NoUselessConstructor::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · NoQwikUseVisibleTask · ×1
  • NoQwikUseVisibleTask::run (cognitive 16) crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs:51 — NoQwikUseVisibleTask::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BindingPatterIterator · ×1
  • BindingPatterIterator::next_binding (cognitive 16) crates/biome_js_analyze/src/lint/correctness/no_solid_destructured_props.rs:264 — BindingPatterIterator::next_binding has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoUndeclaredDependencies · ×1
  • NoUndeclaredDependencies::run (cognitive 16) crates/biome_js_analyze/src/lint/correctness/no_undeclared_dependencies.rs:148 — NoUndeclaredDependencies::run has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · UseBigintLiterals · ×1
  • UseBigintLiterals::action (cognitive 16) crates/biome_js_analyze/src/lint/nursery/use_bigint_literals.rs:137 — UseBigintLiterals::action has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UseSimplifiedBooleanReturn · ×1
  • UseSimplifiedBooleanReturn::action (cognitive 16) crates/biome_js_analyze/src/lint/nursery/use_simplified_boolean_return.rs:171 — UseSimplifiedBooleanReturn::action has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NoJsxPropsBind · ×1
  • NoJsxPropsBind::run (cognitive 16) crates/biome_js_analyze/src/lint/performance/no_jsx_props_bind.rs:76 — NoJsxPropsBind::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (6 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ErrorType · ×1
  • ErrorType::get_error_message (cognitive 16) crates/biome_js_analyze/src/lint/style/use_at_index.rs:201 — ErrorType::get_error_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (5 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UseExplicitLengthCheck · ×1
  • UseExplicitLengthCheck::run (cognitive 16) crates/biome_js_analyze/src/lint/style/use_explicit_length_check.rs:153 — UseExplicitLengthCheck::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoArrayIndexKey · ×1
  • NoArrayIndexKey::run (cognitive 16) crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs:133 — NoArrayIndexKey::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoDuplicateJsxProps · ×1
  • NoDuplicateJsxProps::run (cognitive 16) crates/biome_js_analyze/src/lint/suspicious/no_duplicate_jsx_props.rs:59 — NoDuplicateJsxProps::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoMisplacedAssertion · ×1
  • NoMisplacedAssertion::run (cognitive 16) crates/biome_js_analyze/src/lint/suspicious/no_misplaced_assertion.rs:146 — NoMisplacedAssertion::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatJsArrowFunctionExpression · ×1
  • FormatJsArrowFunctionExpression::fmt_fields (cognitive 16) crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:43 — FormatJsArrowFunctionExpression::fmt_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ArrowFunctionLayout · ×1
  • ArrowFunctionLayout::for_arrow (cognitive 16) crates/biome_js_formatter/src/js/expressions/arrow_function_expression.rs:805 — ArrowFunctionLayout::for_arrow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatJsImportNamedClause · ×1
  • FormatJsImportNamedClause::fmt_fields (cognitive 16) crates/biome_js_formatter/src/js/module/import_named_clause.rs:12 — FormatJsImportNamedClause::fmt_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatTsInterfaceDeclaration · ×1
  • FormatTsInterfaceDeclaration::fmt_fields (cognitive 16) crates/biome_js_formatter/src/ts/declarations/interface_declaration.rs:10 — FormatTsInterfaceDeclaration::fmt_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MemberChain · ×1
  • MemberChain::fmt (cognitive 16) crates/biome_js_formatter/src/utils/member_chain/mod.rs:350 — MemberChain::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsLanguage · ×1
  • JsLanguage::resolve_analyzer_options (cognitive 16) crates/biome_service/src/file_handlers/javascript.rs:370 — JsLanguage::resolve_analyzer_options has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DocumentFileSource · ×1
  • DocumentFileSource::try_from_extension (cognitive 16) crates/biome_languages/src/lib.rs:193 — DocumentFileSource::try_from_extension has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatMdInlineItalic · ×1
  • FormatMdInlineItalic::fmt_fields (cognitive 16) crates/biome_markdown_formatter/src/markdown/auxiliary/inline_italic.rs:77 — FormatMdInlineItalic::fmt_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatMdTextual · ×1
  • FormatMdTextual::fmt_fields (cognitive 16) crates/biome_markdown_formatter/src/markdown/auxiliary/textual.rs:13 — FormatMdTextual::fmt_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WordGroup · ×1
  • WordGroup::emphasis_marker_sequence (cognitive 16) crates/biome_markdown_formatter/src/words.rs:1199 — WordGroup::emphasis_marker_sequence has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MdParagraph · ×1
  • MdParagraph::is_html_comment (cognitive 16) crates/biome_markdown_syntax/src/block_ext.rs:234 — MdParagraph::is_html_comment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HtmlModuleInfoInner · ×1
  • HtmlModuleInfoInner::fmt (cognitive 16) crates/biome_module_graph/src/format_module_graph.rs:650 — HtmlModuleInfoInner::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, loops 4 (8 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RootBuilder · ×1
  • RootBuilder::statement (cognitive 16) crates/biome_module_graph/src/js_module_info/flow/builder.rs:273 — RootBuilder::statement has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SpdxExpression · ×1
  • SpdxExpression::check_trust (cognitive 16) crates/biome_package/src/license/expression.rs:73 — SpdxExpression::check_trust has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyntaxFactory · ×1
  • SyntaxFactory::make_separated_list_syntax (cognitive 16) crates/biome_rowan/src/syntax_factory.rs:65 — SyntaxFactory::make_separated_list_syntax has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Selector · ×1
  • Selector::check (cognitive 16) crates/biome_rule_options/src/use_naming_convention.rs:162 — Selector::check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · biome_suppression · ×1
  • biome_suppression::parse_suppression_comment_with_line_prefix (cognitive 16) crates/biome_suppression/src/lib.rs:106 — biome_suppression::parse_suppression_comment_with_line_prefix has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CandidateText · ×1
  • CandidateText::compare (cognitive 16) crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/sort_v4.rs:125 — CandidateText::compare has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceColumn · ×1
  • SourceColumn::compute (cognitive 16) crates/biome_yaml_formatter/src/comments.rs:471 — SourceColumn::compute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatYamlBlockInBlockNode · ×1
  • FormatYamlBlockInBlockNode::fmt_fields (cognitive 16) crates/biome_yaml_formatter/src/yaml/auxiliary/block_in_block_node.rs:11 — FormatYamlBlockInBlockNode::fmt_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Transport.processIncomingBody (cognitive 16) · ×1
  • Transport.processIncomingBody (cognitive 16) packages/@biomejs/backend-jsonrpc/src/transport.ts:255 — Transport.processIncomingBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyFields · ×1
  • TooManyFields: StatementStack crates/biome_js_control_flow/src/visitor.rs:93 — TooManyFields — 41 stored fields beside 3 methods. The bar is 30 stored fields; this is 11 over it, 1.37× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (7 members, 69 shared lines) · ×1
  • Near-duplicate member family (7 members, 69 shared lines) crates/biome_css_formatter/src/verbatim.rs:136 — crates/biome_css_formatter/src/verbatim.rs:136-261 | crates/biome_graphql_formatter/src/verbatim.rs:45-177 | crates/biome_grit_formatter/src/verbatim.rs:45-176 | crates/biome_html_formatter/src/verbatim.rs:58-186 | crates/biome_js_formatter/src/verbatim.rs:45-176 | crates/biome_json_formatter/src/verbatim.rs:44-175 | crates/biome_yaml_formatter/src/verbatim.rs:49-220 — These 7 members are variants of one another: a block of 69 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member family (7 members, 45 shared lines) · ×1
  • Near-duplicate member family (7 members, 45 shared lines) crates/biome_service/src/file_handlers/css.rs:878 — crates/biome_service/src/file_handlers/css.rs:878-1081 | crates/biome_service/src/file_handlers/graphql.rs:710-810 | crates/biome_service/src/file_handlers/html.rs:1366-1563 | crates/biome_service/src/file_handlers/javascript.rs:1569-1735 | crates/biome_service/src/file_handlers/json.rs:832-998 | crates/biome_service/src/file_handlers/md.rs:743-851 | crates/biome_service/src/file_handlers/yaml.rs:605-705 — These 7 members are variants of one another: a block of 45 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member family (7 members, 21 shared lines) · ×1
  • Near-duplicate member family (7 members, 21 shared lines) crates/biome_module_graph/src/db/type_inference/expressions.rs:847 — crates/biome_module_graph/src/db/type_inference/expressions.rs:847-910 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1126-1274 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1485-1534 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1536-1583 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2464-2521 | crates/biome_module_graph/src/db/type_inference/lookup.rs:740-783 | crates/biome_module_graph/src/db/type_inference/lookup.rs:864-959 — These 7 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 20 shared lines) · ×1
  • Near-duplicate member family (6 members, 20 shared lines) crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:118 — crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:118-148 | crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:114-148 | crates/biome_html_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:106-136 | crates/biome_js_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:127-157 | crates/biome_json_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:114-144 | crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:106-140 — These 6 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 25 shared lines) · ×1
  • Near-duplicate member family (5 members, 25 shared lines) crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:72 — crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:72-131 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:136-195 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:200-289 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:294-353 | crates/biome_grit_patterns/src/pattern_compiler/step_compiler.rs:21-105 — These 5 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 22 shared lines) · ×1
  • Near-duplicate member family (4 members, 22 shared lines) crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:326 — crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:326-385 | crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs:145-193 | crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:352-436 | crates/biome_js_analyze/src/utils/function_return.rs:19-70 — These 4 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member pair (137 shared lines) · ×1
  • Near-duplicate member pair (137 shared lines) crates/biome_syntax_codegen/src/generate_syntax_factory.rs:16 — crates/biome_syntax_codegen/src/generate_syntax_factory.rs:16-187 | xtask/codegen/src/generate_syntax_factory.rs:9-177 — These two members are variants of one another: 137 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (98 shared lines) · ×1
  • Near-duplicate member pair (98 shared lines) crates/biome_grit_parser/src/lexer/mod.rs:341 — crates/biome_grit_parser/src/lexer/mod.rs:341-472 | crates/biome_json_parser/src/lexer/mod.rs:386-523 — These two members are variants of one another: 98 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (61 shared lines) · ×1
  • Near-duplicate member pair (61 shared lines) crates/biome_grit_parser/src/lexer/mod.rs:474 — crates/biome_grit_parser/src/lexer/mod.rs:474-588 | crates/biome_json_parser/src/lexer/mod.rs:525-659 — These two members are variants of one another: 61 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (40 shared lines) · ×1
  • Near-duplicate member pair (40 shared lines) crates/biome_module_graph/src/db/queries.rs:36 — crates/biome_module_graph/src/db/queries.rs:36-120 | crates/biome_module_graph/src/db/queries.rs:127-203 — These two members are variants of one another: 40 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:78 — crates/biome_js_analyze/src/lint/suspicious/no_global_is_finite.rs:78-130 | crates/biome_js_analyze/src/lint/suspicious/no_global_is_nan.rs:79-131 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (12 members, 50+ identical tokens) crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_compound_selector_list.rs:17 — crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_compound_selector_list.rs:17-42 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_custom_identifier.rs:17-39 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_custom_identifier_list.rs:18-46 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_identifier.rs:13-38 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_nth.rs:13-35 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_relative_selector_list.rs:17-42 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_selector_list.rs:17-39 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_value_list.rs:13-34 | crates/biome_css_formatter/src/css/pseudo/pseudo_element_function_custom_identifier.rs:17-39 | crates/biome_css_formatter/src/css/selectors/pseudo_class_function_compound_selector.rs:17-39 | crates/biome_css_formatter/src/css/selectors/pseudo_class_function_selector.rs:13-35 | crates/biome_css_formatter/src/css/selectors/pseudo_element_function_selector.rs:13-35 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (11 members, 50+ identical tokens) crates/biome_grit_formatter/src/grit/auxiliary/like.rs:7 — crates/biome_grit_formatter/src/grit/auxiliary/like.rs:7-37 | crates/biome_grit_formatter/src/grit/auxiliary/map.rs:7-25 | crates/biome_grit_formatter/src/grit/auxiliary/sequential.rs:8-31 | crates/biome_grit_formatter/src/grit/patterns/curly_pattern.rs:7-25 | crates/biome_grit_formatter/src/grit/patterns/pattern_any.rs:8-27 | crates/biome_grit_formatter/src/grit/patterns/pattern_or.rs:8-27 | crates/biome_grit_formatter/src/grit/patterns/pattern_or_else.rs:8-27 | crates/biome_grit_formatter/src/grit/predicates/predicate_and.rs:8-26 | crates/biome_grit_formatter/src/grit/predicates/predicate_any.rs:8-26 | crates/biome_grit_formatter/src/grit/predicates/predicate_curly.rs:7-25 | crates/biome_grit_formatter/src/grit/predicates/predicate_or.rs:7-26 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) crates/biome_css_formatter/src/css/auxiliary/container_query_in_parens.rs:12 — crates/biome_css_formatter/src/css/auxiliary/container_query_in_parens.rs:12-29 | crates/biome_css_formatter/src/css/auxiliary/container_size_feature_in_parens.rs:12-29 | crates/biome_css_formatter/src/css/auxiliary/container_style_in_parens.rs:12-29 | crates/biome_css_formatter/src/css/auxiliary/media_condition_in_parens.rs:12-29 | crates/biome_css_formatter/src/css/auxiliary/media_feature_in_parens.rs:8-25 | crates/biome_css_formatter/src/css/auxiliary/parenthesized_expression.rs:12-29 | crates/biome_css_formatter/src/css/auxiliary/scope_edge.rs:8-25 | crates/biome_css_formatter/src/css/auxiliary/supports_feature_declaration.rs:12-29 | crates/biome_css_formatter/src/scss/auxiliary/supports_feature_declaration.rs:13-29 | crates/biome_css_formatter/src/tailwind/auxiliary/custom_variant_shorthand.rs:12-33 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Edited copy of a member (202 corresponding lines) · ×1
  • Edited copy of a member (202 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:806 — crates/biome_js_type_info/src/format_inferred_type_info.rs:806-1007 | crates/biome_js_type_info/src/format_type_info.rs:454-675 — These two members are one piece of code written twice and then edited apart: 202 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (90 corresponding lines) · ×1
  • Edited copy of a member (90 corresponding lines) crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:173 — crates/biome_html_analyze/src/lint/nursery/no_obsolete_attributes.rs:173-262 | crates/biome_js_analyze/src/lint/nursery/no_obsolete_attributes.rs:175-264 — These two members are one piece of code written twice and then edited apart: 90 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (102 corresponding lines) · ×1
  • Edited copy of a member (102 corresponding lines) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:907 — crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:907-1059 | crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:1068-1169 — These two members are one piece of code written twice and then edited apart: 102 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (76 corresponding lines) · ×1
  • Edited copy of a member (76 corresponding lines) crates/biome_module_graph/src/db/type_inference/expressions.rs:2957 — crates/biome_module_graph/src/db/type_inference/expressions.rs:2957-3043 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3049-3124 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (87 corresponding lines) · ×1
  • Edited copy of a member (87 corresponding lines) crates/biome_markdown_parser/src/syntax/list.rs:891 — crates/biome_markdown_parser/src/syntax/list.rs:891-995 | crates/biome_markdown_parser/src/syntax/list.rs:1306-1392 — These two members are one piece of code written twice and then edited apart: 87 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (88 corresponding lines) · ×1
  • Edited copy of a member (88 corresponding lines) crates/biome_syntax_codegen/src/generate_nodes.rs:1009 — crates/biome_syntax_codegen/src/generate_nodes.rs:1009-1100 | xtask/codegen/src/generate_nodes.rs:1056-1143 — These two members are one piece of code written twice and then edited apart: 88 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:87 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:87-139 | crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs:77-128 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (80 corresponding lines) · ×1
  • Edited copy of a member (80 corresponding lines) crates/biome_syntax_codegen/src/ast.rs:332 — crates/biome_syntax_codegen/src/ast.rs:332-411 | xtask/codegen/src/ast.rs:370-449 — These two members are one piece of code written twice and then edited apart: 80 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (67 corresponding lines) · ×1
  • Edited copy of a member (67 corresponding lines) crates/biome_formatter/src/lib.rs:1824 — crates/biome_formatter/src/lib.rs:1824-1890 | crates/biome_formatter/src/lib.rs:1900-1968 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) crates/biome_module_graph/src/db/queries/js_scc.rs:90 — crates/biome_module_graph/src/db/queries/js_scc.rs:90-163 | crates/biome_module_graph/src/db/type_inference/resolver.rs:156-221 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (79 corresponding lines) · ×1
  • Edited copy of a member (79 corresponding lines) crates/biome_formatter/src/trivia.rs:328 — crates/biome_formatter/src/trivia.rs:328-406 | crates/biome_html_formatter/src/verbatim.rs:405-486 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×1
  • Edited copy of a member (46 corresponding lines) crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_bind_style.rs:136 — crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_bind_style.rs:136-181 | crates/biome_html_analyze/src/lint/style/use_vue_consistent_v_on_style.rs:135-192 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:217 — crates/biome_js_analyze/src/lint/nursery/no_array_for_each.rs:217-273 | crates/biome_js_analyze/src/utils/indexed_collection.rs:14-82 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (70 corresponding lines) · ×1
  • Edited copy of a member (70 corresponding lines) crates/biome_js_formatter/src/jsx/attribute/spread_attribute.rs:13 — crates/biome_js_formatter/src/jsx/attribute/spread_attribute.rs:13-84 | crates/biome_js_formatter/src/jsx/auxiliary/spread_child.rs:13-82 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (60 corresponding lines) · ×1
  • Edited copy of a member (60 corresponding lines) crates/biome_analyze/src/analyzer_plugin.rs:144 — crates/biome_analyze/src/analyzer_plugin.rs:144-203 | crates/biome_analyze/src/analyzer_plugin.rs:267-327 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (53 corresponding lines) · ×1
  • Edited copy of a member (53 corresponding lines) crates/biome_module_graph/src/db/type_inference/expressions.rs:1053 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1053-1105 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1021-1092 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×1
  • Edited copy of a member (54 corresponding lines) crates/biome_js_type_info/src/local_inference.rs:91 — crates/biome_js_type_info/src/local_inference.rs:91-144 | crates/biome_js_type_info/src/local_inference.rs:209-263 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 36+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 36+ corresponding lines) crates/biome_languages/src/lib.rs:141 — crates/biome_languages/src/lib.rs:141-186 | crates/biome_languages/src/lib.rs:196-244 | crates/biome_languages/src/lib.rs:255-290 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) crates/biome_grit_parser/src/lexer/mod.rs:641 — crates/biome_grit_parser/src/lexer/mod.rs:641-715 | crates/biome_grit_parser/src/lexer/mod.rs:893-960 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) crates/biome_js_type_info/src/format_inferred_type_info.rs:297 — crates/biome_js_type_info/src/format_inferred_type_info.rs:297-347 | crates/biome_js_type_info/src/format_type_info.rs:224-274 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 42+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 42+ corresponding lines) crates/biome_service/src/file_handlers/astro.rs:70 — crates/biome_service/src/file_handlers/astro.rs:70-112 | crates/biome_service/src/file_handlers/svelte.rs:101-142 | crates/biome_service/src/file_handlers/vue.rs:104-145 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 42 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 30+ corresponding lines) crates/biome_formatter/src/comments/map.rs:73 — crates/biome_formatter/src/comments/map.rs:73-104 | crates/biome_formatter/src/comments/map.rs:110-141 | crates/biome_formatter/src/comments/map.rs:147-176 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 41+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 41+ corresponding lines) crates/biome_service/src/file_handlers/graphql.rs:359 — crates/biome_service/src/file_handlers/graphql.rs:359-399 | crates/biome_service/src/file_handlers/grit.rs:297-337 | crates/biome_service/src/file_handlers/html.rs:654-694 | crates/biome_service/src/file_handlers/javascript.rs:659-701 | crates/biome_service/src/file_handlers/json.rs:428-470 | crates/biome_service/src/file_handlers/md.rs:379-419 | crates/biome_service/src/file_handlers/yaml.rs:337-377 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 38+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 38+ corresponding lines) crates/biome_project_layout/src/project_layout.rs:285 — crates/biome_project_layout/src/project_layout.rs:285-322 | crates/biome_project_layout/src/project_layout.rs:326-363 | crates/biome_project_layout/src/project_layout.rs:374-411 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 29+ corresponding lines) crates/biome_service/src/workspace/server.rs:3326 — crates/biome_service/src/workspace/server.rs:3326-3359 | crates/biome_service/src/workspace/server.rs:4166-4204 | crates/biome_service/src/workspace/server.rs:4207-4246 | crates/biome_service/src/workspace/server.rs:4506-4534 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 24+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:209 — crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:209-236 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:245-272 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:353-380 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:386-413 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:652-679 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:692-719 | crates/biome_css_parser/src/syntax/at_rule/media.rs:411-434 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 33+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 33+ corresponding lines) crates/biome_project_layout/src/project_layout.rs:170 — crates/biome_project_layout/src/project_layout.rs:170-202 | crates/biome_project_layout/src/project_layout.rs:208-240 | crates/biome_project_layout/src/project_layout.rs:246-279 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 28+ corresponding lines) crates/biome_css_parser/src/syntax/selector/pseudo_class/function_compound_selector_list.rs:29 — crates/biome_css_parser/src/syntax/selector/pseudo_class/function_compound_selector_list.rs:29-56 | crates/biome_css_parser/src/syntax/selector/pseudo_class/function_custom_identifier_list.rs:25-55 | crates/biome_css_parser/src/syntax/selector/pseudo_class/function_relative_selector_list.rs:25-55 | crates/biome_css_parser/src/syntax/selector/pseudo_class/function_selector_list.rs:21-52 | crates/biome_css_parser/src/syntax/selector/pseudo_class/function_value_list.rs:28-55 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 28+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:187 — crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:187-214 | crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:221-248 | crates/biome_css_parser/src/syntax/value/if.rs:452-479 | crates/biome_css_parser/src/syntax/value/if.rs:498-525 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 27+ corresponding lines) crates/biome_js_formatter/src/js/module/export_named_clause.rs:13 — crates/biome_js_formatter/src/js/module/export_named_clause.rs:13-51 | crates/biome_js_formatter/src/js/module/named_import_specifiers.rs:11-37 | crates/biome_js_formatter/src/ts/types/tuple_type.rs:10-40 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 19+ corresponding lines) crates/biome_service/src/file_handlers/css.rs:433 — crates/biome_service/src/file_handlers/css.rs:433-451 | crates/biome_service/src/file_handlers/graphql.rs:169-187 | crates/biome_service/src/file_handlers/html.rs:630-648 | crates/biome_service/src/file_handlers/javascript.rs:635-653 | crates/biome_service/src/file_handlers/json.rs:404-422 | crates/biome_service/src/file_handlers/md.rs:355-373 | crates/biome_service/src/file_handlers/yaml.rs:313-331 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 27+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 27+ corresponding lines) crates/biome_css_parser/src/syntax/selector/pseudo_class/function_compound_selector.rs:23 — crates/biome_css_parser/src/syntax/selector/pseudo_class/function_compound_selector.rs:23-50 | crates/biome_css_parser/src/syntax/selector/pseudo_class/function_custom_identifier.rs:22-48 | crates/biome_css_parser/src/syntax/selector/pseudo_class/function_nth.rs:41-71 | crates/biome_css_parser/src/syntax/selector/pseudo_element.rs:86-113 | crates/biome_css_parser/src/syntax/selector/pseudo_element.rs:187-214 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 28+ corresponding lines) crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:58 — crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:58-85 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_enum_value_names.rs:79-106 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_field_definition_names.rs:112-139 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_input_field_names.rs:58-85 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_variable_names.rs:59-86 | crates/biome_graphql_analyze/src/lint/suspicious/no_duplicate_graphql_operation_name.rs:80-113 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 16+ corresponding lines) crates/biome_service/src/workspace/server.rs:3276 — crates/biome_service/src/workspace/server.rs:3276-3298 | crates/biome_service/src/workspace/server.rs:3303-3324 | crates/biome_service/src/workspace/server.rs:3361-3376 | crates/biome_service/src/workspace/server.rs:3381-3400 | crates/biome_service/src/workspace/server.rs:3402-3421 | crates/biome_service/src/workspace/server.rs:4327-4351 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 20+ corresponding lines) crates/biome_html_parser/src/syntax/angular.rs:12 — crates/biome_html_parser/src/syntax/angular.rs:12-37 | crates/biome_html_parser/src/syntax/angular.rs:56-81 | crates/biome_html_parser/src/syntax/angular.rs:83-108 | crates/biome_html_parser/src/syntax/angular.rs:110-129 | crates/biome_html_parser/src/syntax/angular.rs:131-150 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 29+ corresponding lines) crates/biome_grit_parser/src/lexer/mod.rs:147 — crates/biome_grit_parser/src/lexer/mod.rs:147-175 | crates/biome_json_parser/src/lexer/mod.rs:134-163 | crates/biome_parser/src/lexer.rs:88-117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 25+ corresponding lines) crates/biome_service/src/file_handlers/css.rs:285 — crates/biome_service/src/file_handlers/css.rs:285-310 | crates/biome_service/src/file_handlers/graphql.rs:273-298 | crates/biome_service/src/file_handlers/grit.rs:170-195 | crates/biome_service/src/file_handlers/html.rs:511-535 | crates/biome_service/src/file_handlers/javascript.rs:487-512 | crates/biome_service/src/file_handlers/json.rs:293-318 | crates/biome_service/src/file_handlers/md.rs:207-232 | crates/biome_service/src/file_handlers/yaml.rs:162-187 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 17+ corresponding lines) crates/biome_service/src/file_handlers/css.rs:408 — crates/biome_service/src/file_handlers/css.rs:408-424 | crates/biome_service/src/file_handlers/graphql.rs:144-160 | crates/biome_service/src/file_handlers/grit.rs:275-291 | crates/biome_service/src/file_handlers/html.rs:605-621 | crates/biome_service/src/file_handlers/javascript.rs:610-626 | crates/biome_service/src/file_handlers/json.rs:379-395 | crates/biome_service/src/file_handlers/md.rs:330-346 | crates/biome_service/src/file_handlers/yaml.rs:267-283 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 16+ corresponding lines) crates/biome_graphql_parser/src/parser/definitions/enum.rs:39 — crates/biome_graphql_parser/src/parser/definitions/enum.rs:39-57 | crates/biome_graphql_parser/src/parser/definitions/input_object.rs:40-58 | crates/biome_graphql_parser/src/parser/definitions/interface.rs:50-71 | crates/biome_graphql_parser/src/parser/definitions/object.rs:39-60 | crates/biome_graphql_parser/src/parser/definitions/scalar.rs:30-45 | crates/biome_graphql_parser/src/parser/definitions/schema.rs:38-55 | crates/biome_graphql_parser/src/parser/definitions/union.rs:44-62 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 22+ corresponding lines) crates/biome_css_parser/src/token_source.rs:71 — crates/biome_css_parser/src/token_source.rs:71-95 | crates/biome_graphql_parser/src/token_source.rs:32-55 | crates/biome_html_parser/src/token_source.rs:298-321 | crates/biome_js_parser/src/token_source.rs:41-62 | crates/biome_markdown_parser/src/token_source.rs:87-115 | crates/biome_yaml_parser/src/token_source.rs:44-69 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:72 — crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:72-89 | crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:107-124 | crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:142-159 | crates/biome_module_graph/src/db/queries/type_inference/lookups.rs:173-190 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 11+ corresponding lines) crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:27 — crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:27-37 | crates/biome_grit_patterns/src/pattern_compiler/and_compiler.rs:65-75 | crates/biome_grit_patterns/src/pattern_compiler/any_compiler.rs:15-26 | crates/biome_grit_patterns/src/pattern_compiler/any_compiler.rs:35-46 | crates/biome_grit_patterns/src/pattern_compiler/list_compiler.rs:20-31 | crates/biome_grit_patterns/src/pattern_compiler/or_compiler.rs:15-26 | crates/biome_grit_patterns/src/pattern_compiler/or_compiler.rs:35-46 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 11+ corresponding lines) crates/biome_js_analyze/src/lint/a11y/no_access_key.rs:103 — crates/biome_js_analyze/src/lint/a11y/no_access_key.rs:103-113 | crates/biome_js_analyze/src/lint/a11y/use_valid_aria_props.rs:108-122 | crates/biome_js_analyze/src/lint/complexity/no_useless_constructor.rs:245-255 | crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs:192-203 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:118 — crates/biome_css_analyze/src/lint/style/no_excessive_lines_per_file.rs:118-133 | crates/biome_graphql_analyze/src/lint/style/no_excessive_lines_per_file.rs:118-133 | crates/biome_html_analyze/src/lint/style/no_excessive_lines_per_file.rs:118-133 | crates/biome_js_analyze/src/lint/style/no_excessive_lines_per_file.rs:132-147 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 10+ corresponding lines) crates/biome_html_analyze/src/lint/a11y/no_access_key.rs:91 — crates/biome_html_analyze/src/lint/a11y/no_access_key.rs:91-101 | crates/biome_html_analyze/src/lint/a11y/no_autofocus.rs:105-115 | crates/biome_html_analyze/src/lint/a11y/no_distracting_elements.rs:89-100 | crates/biome_html_analyze/src/lint/a11y/no_header_scope.rs:94-104 | crates/biome_html_analyze/src/lint/a11y/use_anchor_content.rs:162-173 | crates/biome_html_analyze/src/lint/a11y/use_valid_aria_props.rs:92-104 | crates/biome_html_analyze/src/lint/nursery/no_svelte_at_debug_tags.rs:73-84 | crates/biome_html_analyze/src/lint/nursery/use_svelte_shorthand_directive.rs:126-135 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 9+ corresponding lines) crates/biome_lsp/src/server.rs:528 — crates/biome_lsp/src/server.rs:528-537 | crates/biome_lsp/src/server.rs:539-549 | crates/biome_lsp/src/server.rs:554-563 | crates/biome_lsp/src/server.rs:568-576 | crates/biome_lsp/src/server.rs:581-591 | crates/biome_lsp/src/server.rs:596-606 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 8+ corresponding lines) crates/biome_css_parser/src/lib.rs:265 — crates/biome_css_parser/src/lib.rs:265-277 | crates/biome_graphql_parser/src/lib.rs:153-166 | crates/biome_grit_parser/src/lib.rs:124-136 | crates/biome_html_parser/src/lib.rs:132-144 | crates/biome_js_parser/src/parse.rs:426-433 | crates/biome_json_parser/src/lib.rs:157-169 | crates/biome_yaml_parser/src/lib.rs:119-131 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 19+ corresponding lines) crates/biome_json_parser/src/lexer/mod.rs:109 — crates/biome_json_parser/src/lexer/mod.rs:109-128 | crates/biome_markdown_parser/src/lexer/mod.rs:717-735 | crates/biome_parser/src/lexer.rs:159-178 | crates/biome_yaml_parser/src/lexer/mod.rs:1807-1828 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 7+ corresponding lines) crates/biome_css_parser/src/lib.rs:61 — crates/biome_css_parser/src/lib.rs:61-73 | crates/biome_graphql_parser/src/lib.rs:28-40 | crates/biome_grit_parser/src/lib.rs:26-38 | crates/biome_html_parser/src/lib.rs:22-34 | crates/biome_js_parser/src/parse.rs:315-321 | crates/biome_json_parser/src/lib.rs:56-68 | crates/biome_tailwind_parser/src/lib.rs:49-61 | crates/biome_yaml_parser/src/lib.rs:22-34 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 10+ corresponding lines) crates/biome_project_layout/src/project_layout.rs:49 — crates/biome_project_layout/src/project_layout.rs:49-58 | crates/biome_project_layout/src/project_layout.rs:120-129 | crates/biome_project_layout/src/project_layout.rs:139-150 | crates/biome_project_layout/src/project_layout.rs:446-456 | crates/biome_project_layout/src/project_layout.rs:476-486 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 10+ corresponding lines) crates/biome_js_analyze/src/services/embedded.rs:62 — crates/biome_js_analyze/src/services/embedded.rs:62-72 | crates/biome_js_analyze/src/services/embedded.rs:74-84 | crates/biome_js_analyze/src/services/embedded.rs:86-95 | crates/biome_js_analyze/src/services/embedded.rs:97-106 | crates/biome_js_analyze/src/services/embedded.rs:108-117 | crates/biome_js_analyze/src/services/embedded.rs:122-131 | crates/biome_js_analyze/src/services/embedded.rs:138-147 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 18+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/supports_and_condition.rs:8 — crates/biome_css_formatter/src/css/auxiliary/supports_and_condition.rs:8-25 | crates/biome_css_formatter/src/css/auxiliary/supports_or_condition.rs:8-25 | crates/biome_css_formatter/src/css/auxiliary/value_at_rule_named_import_specifier.rs:16-33 | crates/biome_css_formatter/src/tailwind/statements/custom_variant_at_rule.rs:8-27 | crates/biome_css_formatter/src/tailwind/statements/utility_at_rule.rs:8-25 | crates/biome_css_formatter/src/tailwind/statements/variant_at_rule.rs:8-25 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 14+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:329 — crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:329-347 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:472-489 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:756-774 | crates/biome_css_parser/src/syntax/at_rule/media.rs:369-382 | crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:255-272 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) crates/biome_js_syntax/src/expr_ext.rs:302 — crates/biome_js_syntax/src/expr_ext.rs:302-307 | crates/biome_js_syntax/src/expr_ext.rs:310-315 | crates/biome_js_syntax/src/expr_ext.rs:318-323 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 17+ corresponding lines) crates/biome_css_formatter/src/css/auxiliary/custom_media_at_rule_declarator.rs:13 — crates/biome_css_formatter/src/css/auxiliary/custom_media_at_rule_declarator.rs:13-32 | crates/biome_css_formatter/src/css/auxiliary/media_at_rule_declarator.rs:13-46 | crates/biome_css_formatter/src/css/statements/page_at_rule.rs:8-25 | crates/biome_css_formatter/src/scss/statements/import_at_rule.rs:10-26 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 4+ corresponding lines) crates/biome_css_syntax/src/lib.rs:47 — crates/biome_css_syntax/src/lib.rs:47-50 | crates/biome_graphql_syntax/src/lib.rs:22-25 | crates/biome_html_syntax/src/lib.rs:31-34 | crates/biome_js_syntax/src/lib.rs:56-59 | crates/biome_json_syntax/src/lib.rs:17-20 | crates/biome_markdown_syntax/src/lib.rs:24-27 | crates/biome_yaml_syntax/src/lib.rs:31-34 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 3+ corresponding lines) crates/biome_css_parser/src/syntax/at_rule/function.rs:186 — crates/biome_css_parser/src/syntax/at_rule/function.rs:186-188 | crates/biome_css_parser/src/syntax/value/attr.rs:277-283 | crates/biome_css_parser/src/syntax/value/type.rs:259-261 | crates/biome_html_parser/src/syntax/svelte.rs:992-994 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) crates/biome_service/src/file_handlers/css.rs:1091 — crates/biome_service/src/file_handlers/css.rs:1091-1094 | crates/biome_service/src/file_handlers/javascript.rs:2169-2172 | crates/biome_service/src/file_handlers/json.rs:1008-1011 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) crates/biome_grit_patterns/src/pattern_compiler/every_compiler.rs:12 — crates/biome_grit_patterns/src/pattern_compiler/every_compiler.rs:12-16 | crates/biome_grit_patterns/src/pattern_compiler/maybe_compiler.rs:15-19 | crates/biome_grit_patterns/src/pattern_compiler/some_compiler.rs:12-16 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (185 lines × 2) · ×1
  • Duplicated block (185 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:17 — crates/biome_syntax_codegen/src/generate_nodes.rs:17-201 | xtask/codegen/src/generate_nodes.rs:27-211 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (198 lines × 2) · ×1
  • Duplicated block (198 lines × 2) crates/biome_syntax_codegen/src/generate_node_factory.rs:17 — crates/biome_syntax_codegen/src/generate_node_factory.rs:17-214 | xtask/codegen/src/generate_node_factory.rs:10-207 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_node_factory.rs` and `xtask/codegen/src/generate_node_factory.rs` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_node_factory.rs:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (146 lines × 2) · ×1
  • Duplicated block (146 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:744 — crates/biome_syntax_codegen/src/generate_nodes.rs:744-889 | xtask/codegen/src/generate_nodes.rs:787-932 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:744` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (86 lines × 2) · ×1
  • Duplicated block (86 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:614 — crates/biome_syntax_codegen/src/generate_nodes.rs:614-699 | xtask/codegen/src/generate_nodes.rs:634-719 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:614` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (83 lines × 2) · ×1
  • Duplicated block (83 lines × 2) crates/biome_syntax_codegen/src/generate_nodes_mut.rs:10 — crates/biome_syntax_codegen/src/generate_nodes_mut.rs:10-92 | xtask/codegen/src/generate_nodes_mut.rs:7-89 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes_mut.rs` and `xtask/codegen/src/generate_nodes_mut.rs` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes_mut.rs:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `xtask/codegen/src/generate_nodes_mut.rs:91` calls `reformat` and `crates/biome_syntax_codegen/src/generate_nodes_mut.rs:94` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (67 lines × 2) · ×1
  • Duplicated block (67 lines × 2) crates/biome_syntax_codegen/src/ast.rs:157 — crates/biome_syntax_codegen/src/ast.rs:157-223 | xtask/codegen/src/ast.rs:195-261 — before extracting anything, compare `crates/biome_syntax_codegen/src/ast.rs` and `xtask/codegen/src/ast.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 344 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (68–69 lines × 2) · ×1
  • Duplicated block (68–69 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_valid_lang.rs:76 — crates/biome_html_analyze/src/lint/a11y/use_valid_lang.rs:76-143 | crates/biome_js_analyze/src/lint/a11y/use_valid_lang.rs:70-138 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) crates/biome_syntax_codegen/src/generate_macros.rs:11 — crates/biome_syntax_codegen/src/generate_macros.rs:11-68 | xtask/codegen/src/generate_macros.rs:8-65 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_macros.rs` and `xtask/codegen/src/generate_macros.rs` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (46–54 lines × 2) · ×1
  • Duplicated block (46–54 lines × 2) crates/biome_css_parser/src/lexer/mod.rs:1281 — crates/biome_css_parser/src/lexer/mod.rs:1281-1334 | crates/biome_tailwind_parser/src/lexer/mod.rs:751-796 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×1
  • Duplicated block (52 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_restricted_dependencies.rs:95 — crates/biome_js_analyze/src/lint/nursery/no_restricted_dependencies.rs:95-146 | crates/biome_json_analyze/src/lint/nursery/no_restricted_dependencies.rs:97-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_restricted_dependencies.rs:95` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (80–97 lines × 2) · ×1
  • Duplicated block (80–97 lines × 2) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:958 — crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:958-1054 | crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:1085-1164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:958` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×1
  • Duplicated block (51 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:1050 — crates/biome_syntax_codegen/src/generate_nodes.rs:1050-1100 | xtask/codegen/src/generate_nodes.rs:1093-1143 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:1050` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (45–47 lines × 2) · ×1
  • Duplicated block (45–47 lines × 2) crates/biome_js_formatter/src/jsx/attribute/spread_attribute.rs:15 — crates/biome_js_formatter/src/jsx/attribute/spread_attribute.rs:15-61 | crates/biome_js_formatter/src/jsx/auxiliary/spread_child.rs:15-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/jsx/attribute/spread_attribute.rs:15` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsxSpreadAttribute` in one and `&JsxSpreadChild` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (40–41 lines × 3) · ×1
  • Duplicated block (40–41 lines × 3) crates/biome_graphql_parser/src/lexer/mod.rs:681 — crates/biome_graphql_parser/src/lexer/mod.rs:681-720 | crates/biome_grit_parser/src/lexer/mod.rs:724-763 | crates/biome_json_parser/src/lexer/mod.rs:668-708 — before extracting anything, compare `crates/biome_graphql_parser/src/lexer/mod.rs` and `crates/biome_grit_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_parser/src/lexer/mod.rs:681` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (38–40 lines × 2) · ×1
  • Duplicated block (38–40 lines × 2) crates/biome_embeds/src/visitor.rs:1207 — crates/biome_embeds/src/visitor.rs:1207-1246 | crates/biome_embeds/src/visitor.rs:1538-1575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_embeds/src/visitor.rs:1207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (39 lines × 3) · ×1
  • Duplicated block (39 lines × 3) crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:123 — crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_cloak.rs:123-161 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_once.rs:124-162 | crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_pre.rs:124-162 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (36–39 lines × 2) · ×1
  • Duplicated block (36–39 lines × 2) crates/biome_js_formatter/src/jsx/attribute/expression_attribute_value.rs:28 — crates/biome_js_formatter/src/jsx/attribute/expression_attribute_value.rs:28-63 | crates/biome_js_formatter/src/jsx/auxiliary/expression_child.rs:33-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/jsx/attribute/expression_attribute_value.rs:28` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35–38 lines × 3) · ×1
  • Duplicated block (35–38 lines × 3) crates/biome_lsp/src/handlers/formatting.rs:30 — crates/biome_lsp/src/handlers/formatting.rs:30-67 | crates/biome_lsp/src/handlers/formatting.rs:116-150 | crates/biome_lsp/src/handlers/formatting.rs:224-258 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_lsp/src/handlers/formatting.rs:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (34 lines × 5) · ×1
  • Duplicated block (34 lines × 5) crates/biome_graphql_formatter/src/verbatim.rs:47 — crates/biome_graphql_formatter/src/verbatim.rs:47-80 | crates/biome_grit_formatter/src/verbatim.rs:47-80 | crates/biome_html_formatter/src/verbatim.rs:60-93 | crates/biome_js_formatter/src/verbatim.rs:47-80 | crates/biome_json_formatter/src/verbatim.rs:46-79 — before extracting anything, compare `crates/biome_graphql_formatter/src/verbatim.rs` and `crates/biome_grit_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/verbatim.rs:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<GraphqlFormatContext>` in one and `&mut Formatter<GritFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (30–34 lines × 2) · ×1
  • Duplicated block (30–34 lines × 2) crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:12 — crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:12-45 | crates/biome_css_formatter/src/scss/statements/use_at_rule.rs:11-40 — before extracting anything, compare `crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs` and `crates/biome_css_formatter/src/scss/statements/use_at_rule.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:12` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&ScssForwardAtRule` in one and `&ScssUseAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) crates/biome_markdown_parser/src/lexer/mod.rs:533 — crates/biome_markdown_parser/src/lexer/mod.rs:533-565 | crates/biome_markdown_parser/src/to_html.rs:1910-1943 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/lexer/mod.rs:533` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) crates/biome_yaml_formatter/src/yaml/lists/flow_map_entry_list.rs:11 — crates/biome_yaml_formatter/src/yaml/lists/flow_map_entry_list.rs:11-43 | crates/biome_yaml_formatter/src/yaml/lists/flow_sequence_entry_list.rs:11-43 — before extracting anything, compare `crates/biome_yaml_formatter/src/yaml/lists/flow_map_entry_list.rs` and `crates/biome_yaml_formatter/src/yaml/lists/flow_sequence_entry_list.rs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&YamlFlowMapEntryList` in one and `&YamlFlowSequenceEntryList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (28–32 lines × 6) · ×1
  • Duplicated block (28–32 lines × 6) crates/biome_css_formatter/src/verbatim.rs:159 — crates/biome_css_formatter/src/verbatim.rs:159-189 | crates/biome_graphql_formatter/src/verbatim.rs:74-105 | crates/biome_grit_formatter/src/verbatim.rs:74-104 | crates/biome_html_formatter/src/verbatim.rs:87-114 | crates/biome_js_formatter/src/verbatim.rs:74-104 | crates/biome_json_formatter/src/verbatim.rs:73-103 — before extracting anything, compare `crates/biome_css_formatter/src/verbatim.rs` and `crates/biome_graphql_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/verbatim.rs:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<CssFormatContext>` in one and `&mut Formatter<GraphqlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) crates/biome_syntax_codegen/src/generate_nodes.rs:919 — crates/biome_syntax_codegen/src/generate_nodes.rs:919-950 | xtask/codegen/src/generate_nodes.rs:959-990 — before extracting anything, compare `crates/biome_syntax_codegen/src/generate_nodes.rs` and `xtask/codegen/src/generate_nodes.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 933 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_syntax_codegen/src/generate_nodes.rs:919` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `xtask/codegen/src/generate_nodes.rs:992` calls `reformat` and `crates/biome_syntax_codegen/src/generate_nodes.rs:952` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31 lines × 5) · ×1
  • Duplicated block (31 lines × 5) crates/biome_service/src/file_handlers/css.rs:622 — crates/biome_service/src/file_handlers/css.rs:622-652 | crates/biome_service/src/file_handlers/graphql.rs:509-539 | crates/biome_service/src/file_handlers/grit.rs:449-479 | crates/biome_service/src/file_handlers/javascript.rs:1793-1823 | crates/biome_service/src/file_handlers/json.rs:582-612 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) crates/biome_graphql_parser/src/lexer/mod.rs:201 — crates/biome_graphql_parser/src/lexer/mod.rs:201-230 | crates/biome_grit_parser/src/lexer/mod.rs:230-260 — before extracting anything, compare `crates/biome_graphql_parser/src/lexer/mod.rs` and `crates/biome_grit_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29–31 lines × 2) · ×1
  • Duplicated block (29–31 lines × 2) crates/biome_html_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:97 — crates/biome_html_analyze/src/lint/a11y/no_aria_unsupported_elements.rs:97-125 | crates/biome_html_analyze/src/lint/a11y/use_valid_aria_props.rs:108-138 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (36 lines × 7) · ×1
  • Duplicated block (36 lines × 7) crates/biome_css_formatter/src/verbatim.rs:200 — crates/biome_css_formatter/src/verbatim.rs:200-235 | crates/biome_graphql_formatter/src/verbatim.rs:116-151 | crates/biome_grit_formatter/src/verbatim.rs:115-150 | crates/biome_html_formatter/src/verbatim.rs:125-160 | crates/biome_js_formatter/src/verbatim.rs:115-150 | crates/biome_json_formatter/src/verbatim.rs:114-149 | crates/biome_yaml_formatter/src/verbatim.rs:149-184 — before extracting anything, compare `crates/biome_css_formatter/src/verbatim.rs` and `crates/biome_graphql_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<CssFormatContext>` in one and `&mut Formatter<GraphqlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (28–29 lines × 3) · ×1
  • Duplicated block (28–29 lines × 3) crates/biome_service/src/file_handlers/astro.rs:71 — crates/biome_service/src/file_handlers/astro.rs:71-99 | crates/biome_service/src/file_handlers/svelte.rs:102-129 | crates/biome_service/src/file_handlers/vue.rs:105-132 — before extracting anything, compare `crates/biome_service/src/file_handlers/astro.rs` and `crates/biome_service/src/file_handlers/svelte.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/astro.rs:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) xtask/codegen/src/generate_configuration.rs:602 — xtask/codegen/src/generate_configuration.rs:602-642 | xtask/codegen/src/generate_configuration.rs:758-798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `xtask/codegen/src/generate_configuration.rs:602` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28 lines × 4) · ×1
  • Duplicated block (28 lines × 4) crates/biome_css_formatter/src/comments.rs:57 — crates/biome_css_formatter/src/comments.rs:57-84 | crates/biome_graphql_formatter/src/comments.rs:29-56 | crates/biome_grit_formatter/src/comments.rs:45-72 | crates/biome_json_formatter/src/comments.rs:30-57 — before extracting anything, compare `crates/biome_css_formatter/src/comments.rs` and `crates/biome_json_formatter/src/comments.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/comments.rs:57` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `comment` to `&SourceComment<CssLanguage>` in one and `&SourceComment<GraphqlLanguage>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (27 lines × 7) · ×1
  • Duplicated block (27 lines × 7) crates/biome_service/src/file_handlers/css.rs:888 — crates/biome_service/src/file_handlers/css.rs:888-914 | crates/biome_service/src/file_handlers/graphql.rs:713-739 | crates/biome_service/src/file_handlers/html.rs:1369-1395 | crates/biome_service/src/file_handlers/javascript.rs:1576-1602 | crates/biome_service/src/file_handlers/json.rs:835-861 | crates/biome_service/src/file_handlers/md.rs:746-772 | crates/biome_service/src/file_handlers/yaml.rs:608-634 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_service/src/file_handlers/html.rs:1398` calls `syntax`, `text_range_with_trivia`, `into` and `crates/biome_service/src/file_handlers/javascript.rs:1604` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (26 lines × 3) · ×1
  • Duplicated block (26 lines × 3) crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:86 — crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:86-111 | crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:162-187 | crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:240-265 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `specifiers1` to `&JsExportNamedFromSpecifierList` in one and `&JsExportNamedSpecifierList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:84` calls `specifiers` and `crates/biome_js_analyze/src/assist/source/organize_imports/specifiers_attributes.rs:161` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (24–25 lines × 4) · ×1
  • Duplicated block (24–25 lines × 4) crates/biome_service/src/file_handlers/html.rs:1175 — crates/biome_service/src/file_handlers/html.rs:1175-1198 | crates/biome_service/src/file_handlers/html.rs:1408-1432 | crates/biome_service/src/file_handlers/html.rs:1475-1499 | crates/biome_service/src/file_handlers/html.rs:1525-1548 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) crates/biome_js_formatter/src/js/module/import_assertion.rs:13 — crates/biome_js_formatter/src/js/module/import_assertion.rs:13-35 | crates/biome_js_formatter/src/ts/module/import_type_assertion.rs:12-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/module/import_assertion.rs:13` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsImportAssertion` in one and `&TsImportTypeAssertion` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_formatter/src/ts/module/import_type_assertion.rs:38` calls `format` and `crates/biome_js_formatter/src/js/module/import_assertion.rs:37` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–25 lines × 2) · ×1
  • Duplicated block (12–25 lines × 2) crates/biome_js_parser/src/syntax/module.rs:1203 — crates/biome_js_parser/src/syntax/module.rs:1203-1227 | crates/biome_js_parser/src/syntax/module.rs:1235-1246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_parser/src/syntax/module.rs:1203` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (22–25 lines × 2) · ×1
  • Duplicated block (22–25 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:971 — crates/biome_markdown_parser/src/syntax/list.rs:971-992 | crates/biome_markdown_parser/src/syntax/list.rs:1364-1388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_parser/src/syntax/list.rs:1364` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (24 lines × 4) · ×1
  • Duplicated block (24 lines × 4) crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:92 — crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:92-115 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:157-180 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:251-274 | crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:315-338 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:156` calls `Files` and `crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs:314` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) crates/biome_js_type_info/src/interned_types.rs:677 — crates/biome_js_type_info/src/interned_types.rs:677-699 | crates/biome_js_type_info/src/type_data.rs:458-479 — before extracting anything, compare `crates/biome_js_type_info/src/interned_types.rs` and `crates/biome_js_type_info/src/type_data.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_type_info/src/type_data.rs:457` calls `ImportNamespace` and `crates/biome_js_type_info/src/interned_types.rs:676` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) crates/biome_html_parser/src/syntax/astro.rs:68 — crates/biome_html_parser/src/syntax/astro.rs:68-89 | crates/biome_html_parser/src/syntax/svelte.rs:381-400 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_parser/src/syntax/astro.rs:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–22 lines × 2) · ×1
  • Duplicated block (14–22 lines × 2) crates/biome_js_parser/src/syntax/class.rs:2571 — crates/biome_js_parser/src/syntax/class.rs:2571-2584 | crates/biome_js_parser/src/syntax/class.rs:2613-2634 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_parser/src/syntax/class.rs:2571` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18–22 lines × 2) · ×1
  • Duplicated block (18–22 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:480 — crates/biome_js_type_info/src/format_inferred_type_info.rs:480-497 | crates/biome_js_type_info/src/format_type_info.rs:400-421 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 4) · ×1
  • Duplicated block (21 lines × 4) crates/biome_html_parser/src/lexer/mod.rs:1899 — crates/biome_html_parser/src/lexer/mod.rs:1899-1919 | crates/biome_js_parser/src/lexer/mod.rs:250-270 | crates/biome_markdown_parser/src/lexer/mod.rs:197-217 | crates/biome_tailwind_parser/src/lexer/mod.rs:664-684 — before extracting anything, compare `crates/biome_html_parser/src/lexer/mod.rs` and `crates/biome_tailwind_parser/src/lexer/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) crates/biome_cli/src/execute/migrate.rs:259 — crates/biome_cli/src/execute/migrate.rs:259-279 | crates/biome_cli/src/execute/migrate.rs:339-359 | crates/biome_cli/src/execute/migrate.rs:424-444 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate.rs:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–21 lines × 3) · ×1
  • Duplicated block (13–21 lines × 3) crates/biome_js_parser/src/syntax/class.rs:2572 — crates/biome_js_parser/src/syntax/class.rs:2572-2584 | crates/biome_js_parser/src/syntax/class.rs:2614-2634 | crates/biome_js_parser/src/syntax/class.rs:2677-2690 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_parser/src/syntax/class.rs:2572` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18–21 lines × 2) · ×1
  • Duplicated block (18–21 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:102 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:102-122 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:308-325 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_undeclared_classes.rs:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `ctx` to `&RuleContext<Self>` in one and `&RuleContext<NoUndeclaredClasses>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:346 — crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:346-379 | crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:435-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/use_react_function_component_definition.rs:346` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (16–21 lines × 2) · ×1
  • Duplicated block (16–21 lines × 2) crates/biome_js_formatter/src/js/auxiliary/module.rs:15 — crates/biome_js_formatter/src/js/auxiliary/module.rs:15-30 | crates/biome_js_formatter/src/ts/auxiliary/declaration_module.rs:14-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/auxiliary/module.rs:15` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsModule` in one and `&TsDeclarationModule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (17–21 lines × 2) · ×1
  • Duplicated block (17–21 lines × 2) crates/biome_markdown_parser/src/syntax/list.rs:3250 — crates/biome_markdown_parser/src/syntax/list.rs:3250-3270 | crates/biome_markdown_parser/src/syntax/list.rs:3358-3374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18–20 lines × 7) · ×1
  • Duplicated block (18–20 lines × 7) crates/biome_service/src/file_handlers/css.rs:961 — crates/biome_service/src/file_handlers/css.rs:961-978 | crates/biome_service/src/file_handlers/graphql.rs:761-778 | crates/biome_service/src/file_handlers/html.rs:1454-1471 | crates/biome_service/src/file_handlers/javascript.rs:1644-1663 | crates/biome_service/src/file_handlers/json.rs:903-920 | crates/biome_service/src/file_handlers/md.rs:798-815 | crates/biome_service/src/file_handlers/yaml.rs:656-673 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:961` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_service/src/file_handlers/javascript.rs:1665` calls `js_analyzer_services_for_fix` and `crates/biome_service/src/file_handlers/md.rs:818` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) crates/biome_service/src/file_handlers/css.rs:794 — crates/biome_service/src/file_handlers/css.rs:794-812 | crates/biome_service/src/file_handlers/html.rs:1282-1300 | crates/biome_service/src/file_handlers/javascript.rs:1480-1499 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/html.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) crates/biome_markdown_formatter/src/markdown/auxiliary/inline_emphasis.rs:28 — crates/biome_markdown_formatter/src/markdown/auxiliary/inline_emphasis.rs:28-44 | crates/biome_markdown_formatter/src/markdown/auxiliary/inline_link.rs:25-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/markdown/auxiliary/inline_emphasis.rs:28` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19 lines × 6) · ×1
  • Duplicated block (19 lines × 6) crates/biome_service/src/file_handlers/css.rs:785 — crates/biome_service/src/file_handlers/css.rs:785-803 | crates/biome_service/src/file_handlers/graphql.rs:641-659 | crates/biome_service/src/file_handlers/html.rs:1273-1291 | crates/biome_service/src/file_handlers/javascript.rs:1471-1489 | crates/biome_service/src/file_handlers/md.rs:675-693 | crates/biome_service/src/file_handlers/yaml.rs:538-556 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_service/src/file_handlers/graphql.rs:663` calls `diagnostic_offset` and `crates/biome_service/src/file_handlers/md.rs:697` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18–19 lines × 5) · ×1
  • Duplicated block (18–19 lines × 5) crates/biome_service/src/file_handlers/astro.rs:94 — crates/biome_service/src/file_handlers/astro.rs:94-112 | crates/biome_service/src/file_handlers/graphql.rs:382-399 | crates/biome_service/src/file_handlers/grit.rs:320-337 | crates/biome_service/src/file_handlers/svelte.rs:124-142 | crates/biome_service/src/file_handlers/vue.rs:127-145 — before extracting anything, compare `crates/biome_service/src/file_handlers/astro.rs` and `crates/biome_service/src/file_handlers/svelte.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/astro.rs:94` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–19 lines × 3) · ×1
  • Duplicated block (17–19 lines × 3) crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:347 — crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:347-363 | crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs:160-177 | crates/biome_js_analyze/src/lint/suspicious/use_iterable_callback_return.rs:395-413 — before extracting anything, compare `crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs` and `crates/biome_js_analyze/src/lint/nursery/use_vue_render_return.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_tanstack_query_void_query_fn.rs:347` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) crates/biome_service/src/file_handlers/mod.rs:868 — crates/biome_service/src/file_handlers/mod.rs:868-886 | crates/biome_service/src/file_handlers/mod.rs:913-929 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/mod.rs:868` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_service/src/file_handlers/mod.rs:887` calls `saturating_sub` and `crates/biome_service/src/file_handlers/mod.rs:930` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (17–18 lines × 4) · ×1
  • Duplicated block (17–18 lines × 4) crates/biome_service/src/file_handlers/javascript.rs:1312 — crates/biome_service/src/file_handlers/javascript.rs:1312-1328 | crates/biome_service/src/file_handlers/json.rs:642-659 | crates/biome_service/src/file_handlers/md.rs:580-597 | crates/biome_service/src/file_handlers/yaml.rs:472-489 — before extracting anything, compare `crates/biome_service/src/file_handlers/javascript.rs` and `crates/biome_service/src/file_handlers/json.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:226 — crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:226-243 | crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:263-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:226` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (33–37 lines × 2) · ×1
  • Duplicated block (33–37 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:388 — crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:388-420 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:533-569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:388` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (13–18 lines × 2) · ×1
  • Duplicated block (13–18 lines × 2) crates/biome_js_type_info/src/format_inferred_type_info.rs:1176 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1176-1193 | crates/biome_js_type_info/src/format_type_info.rs:1054-1066 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) crates/biome_yaml_parser/src/lexer/mod.rs:1245 — crates/biome_yaml_parser/src/lexer/mod.rs:1245-1262 | crates/biome_yaml_parser/src/lexer/mod.rs:1268-1282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–17 lines × 10) · ×1
  • Duplicated block (13–17 lines × 10) crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_compound_selector_list.rs:26 — crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_compound_selector_list.rs:26-42 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_custom_identifier.rs:26-39 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_nth.rs:22-35 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_relative_selector_list.rs:26-42 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_selector_list.rs:26-39 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_value_list.rs:22-34 | crates/biome_css_formatter/src/css/pseudo/pseudo_element_function_custom_identifier.rs:26-39 | crates/biome_css_formatter/src/css/selectors/pseudo_class_function_compound_selector.rs:26-39 | crates/biome_css_formatter/src/css/selectors/pseudo_class_function_selector.rs:22-35 | crates/biome_css_formatter/src/css/selectors/pseudo_element_function_selector.rs:22-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 10 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_compound_selector_list.rs:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 5) · ×1
  • Duplicated block (17 lines × 5) crates/biome_css_formatter/src/verbatim.rs:245 — crates/biome_css_formatter/src/verbatim.rs:245-261 | crates/biome_graphql_formatter/src/verbatim.rs:161-177 | crates/biome_grit_formatter/src/verbatim.rs:160-176 | crates/biome_js_formatter/src/verbatim.rs:160-176 | crates/biome_json_formatter/src/verbatim.rs:159-175 — before extracting anything, compare `crates/biome_css_formatter/src/verbatim.rs` and `crates/biome_graphql_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/verbatim.rs:245` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<CssFormatContext>` in one and `&mut Formatter<GraphqlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (14–17 lines × 4) · ×1
  • Duplicated block (14–17 lines × 4) crates/biome_js_type_info/src/format_inferred_type_info.rs:1090 — crates/biome_js_type_info/src/format_inferred_type_info.rs:1090-1103 | crates/biome_js_type_info/src/format_inferred_type_info.rs:1111-1127 | crates/biome_js_type_info/src/format_type_info.rs:1077-1090 | crates/biome_js_type_info/src/format_type_info.rs:1099-1115 — before extracting anything, compare `crates/biome_js_type_info/src/format_inferred_type_info.rs` and `crates/biome_js_type_info/src/format_type_info.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_type_info/src/format_inferred_type_info.rs:1090` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<FormatInferredTypeContext<'db>>` in one and `&mut Formatter<FormatTypeContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (16–17 lines × 4) · ×1
  • Duplicated block (16–17 lines × 4) crates/biome_service/src/file_handlers/css.rs:794 — crates/biome_service/src/file_handlers/css.rs:794-810 | crates/biome_service/src/file_handlers/html.rs:1282-1298 | crates/biome_service/src/file_handlers/javascript.rs:1480-1495 | crates/biome_service/src/file_handlers/javascript.rs:2032-2048 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/html.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:794` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–17 lines × 3) · ×1
  • Duplicated block (14–17 lines × 3) crates/biome_css_formatter/src/css/auxiliary/container_style_query_in_parens.rs:20 — crates/biome_css_formatter/src/css/auxiliary/container_style_query_in_parens.rs:20-33 | crates/biome_css_formatter/src/css/auxiliary/if_function.rs:17-33 | crates/biome_css_formatter/src/css/auxiliary/import_named_layer.rs:16-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/container_style_query_in_parens.rs:20` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:13 — crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:13-29 | crates/biome_css_formatter/src/scss/statements/use_at_rule.rs:12-28 | crates/biome_css_formatter/src/tailwind/statements/plugin_at_rule.rs:10-25 — before extracting anything, compare `crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs` and `crates/biome_css_formatter/src/scss/statements/use_at_rule.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:13` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&ScssForwardAtRule` in one and `&ScssUseAtRule` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (11–17 lines × 3) · ×1
  • Duplicated block (11–17 lines × 3) crates/biome_grit_formatter/src/grit/patterns/pattern_definition.rs:12 — crates/biome_grit_formatter/src/grit/patterns/pattern_definition.rs:12-27 | crates/biome_js_formatter/src/js/module/export_from_clause.rs:16-26 | crates/biome_js_formatter/src/ts/declarations/enum_declaration.rs:12-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/patterns/pattern_definition.rs:12` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut GritFormatter` in one and `&mut JsFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (13–17 lines × 2) · ×1
  • Duplicated block (13–17 lines × 2) crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:58 — crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:58-74 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:50-62 — before extracting anything, compare `crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs` and `crates/biome_js_analyze/src/lint/nursery/no_undeclared_custom_properties.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_undeclared_custom_properties.rs:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:353 — crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:353-366 | crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:472-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_undeclared_classes.rs:353` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–16 lines × 12) · ×1
  • Duplicated block (14–16 lines × 12) crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_compound_selector_list.rs:19 — crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_compound_selector_list.rs:19-34 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_custom_identifier.rs:19-33 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_custom_identifier_list.rs:20-35 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_identifier.rs:15-30 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_nth.rs:15-29 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_relative_selector_list.rs:19-34 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_selector_list.rs:19-33 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_value_list.rs:15-28 | crates/biome_css_formatter/src/css/pseudo/pseudo_element_function_custom_identifier.rs:19-33 | crates/biome_css_formatter/src/css/selectors/pseudo_class_function_compound_selector.rs:19-33 | crates/biome_css_formatter/src/css/selectors/pseudo_class_function_selector.rs:15-29 | crates/biome_css_formatter/src/css/selectors/pseudo_element_function_selector.rs:15-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 12 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 12 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/pseudo/pseudo_class_function_compound_selector_list.rs:19` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssPseudoClassFunctionCompoundSelectorList` in one and `&CssPseudoClassFunctionCustomIdentifier` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (16 lines × 8) · ×1
  • Duplicated block (16 lines × 8) crates/biome_module_graph/src/db/type_inference/expressions.rs:889 — crates/biome_module_graph/src/db/type_inference/expressions.rs:889-904 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1220-1235 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1514-1529 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1563-1578 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1726-1741 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2438-2453 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3154-3169 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3205-3220 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:887` calls `Tuple` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:2436` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–16 lines × 8) · ×1
  • Duplicated block (15–16 lines × 8) crates/biome_module_graph/src/db/type_inference/expressions.rs:1067 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1067-1081 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1199-1214 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2343-2358 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2418-2433 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3001-3016 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3083-3098 | crates/biome_module_graph/src/db/type_inference/lookup.rs:812-826 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1050-1065 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 7) · ×1
  • Duplicated block (16 lines × 7) crates/biome_service/src/file_handlers/css.rs:855 — crates/biome_service/src/file_handlers/css.rs:855-870 | crates/biome_service/src/file_handlers/graphql.rs:688-703 | crates/biome_service/src/file_handlers/html.rs:1343-1358 | crates/biome_service/src/file_handlers/javascript.rs:1546-1561 | crates/biome_service/src/file_handlers/json.rs:809-824 | crates/biome_service/src/file_handlers/md.rs:721-736 | crates/biome_service/src/file_handlers/yaml.rs:583-598 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:855` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–16 lines × 6) · ×1
  • Duplicated block (14–16 lines × 6) crates/biome_css_formatter/src/verbatim.rs:191 — crates/biome_css_formatter/src/verbatim.rs:191-206 | crates/biome_graphql_formatter/src/verbatim.rs:107-122 | crates/biome_grit_formatter/src/verbatim.rs:106-121 | crates/biome_html_formatter/src/verbatim.rs:118-131 | crates/biome_js_formatter/src/verbatim.rs:106-121 | crates/biome_json_formatter/src/verbatim.rs:105-120 — before extracting anything, compare `crates/biome_css_formatter/src/verbatim.rs` and `crates/biome_graphql_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/verbatim.rs:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<CssFormatContext>` in one and `&mut Formatter<GraphqlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (15–16 lines × 6) · ×1
  • Duplicated block (15–16 lines × 6) crates/biome_service/src/file_handlers/astro.rs:90 — crates/biome_service/src/file_handlers/astro.rs:90-104 | crates/biome_service/src/file_handlers/css.rs:470-485 | crates/biome_service/src/file_handlers/graphql.rs:378-392 | crates/biome_service/src/file_handlers/json.rs:447-462 | crates/biome_service/src/file_handlers/svelte.rs:120-134 | crates/biome_service/src/file_handlers/vue.rs:123-137 — before extracting anything, compare `crates/biome_service/src/file_handlers/astro.rs` and `crates/biome_service/src/file_handlers/svelte.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/astro.rs:90` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_service/src/file_handlers/css.rs:469` calls `Some` and `crates/biome_service/src/file_handlers/astro.rs:89` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–16 lines × 5) · ×1
  • Duplicated block (9–16 lines × 5) crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:15 — crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:15-30 | crates/biome_graphql_formatter/src/graphql/definitions/input_object_type_definition.rs:17-32 | crates/biome_graphql_formatter/src/graphql/definitions/interface_type_definition.rs:16-24 | crates/biome_graphql_formatter/src/graphql/definitions/object_type_definition.rs:16-31 | crates/biome_graphql_formatter/src/graphql/definitions/scalar_type_definition.rs:14-29 — before extracting anything, compare `crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs` and `crates/biome_graphql_formatter/src/graphql/definitions/input_object_type_definition.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:15` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlEnumTypeDefinition` in one and `&GraphqlInputObjectTypeDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_graphql_formatter/src/graphql/definitions/enum_type_definition.rs:32` calls `space`, `format` and `crates/biome_graphql_formatter/src/graphql/definitions/scalar_type_definition.rs:31` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:102 — crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:102-116 | crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:98-112 | crates/biome_html_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:90-104 | crates/biome_js_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:111-125 | crates/biome_json_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:98-112 | crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:90-104 — before extracting anything, compare `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` and `crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14–15 lines × 6) · ×1
  • Duplicated block (14–15 lines × 6) crates/biome_grit_formatter/src/grit/patterns/pattern_any.rs:10 — crates/biome_grit_formatter/src/grit/patterns/pattern_any.rs:10-24 | crates/biome_grit_formatter/src/grit/patterns/pattern_or.rs:10-24 | crates/biome_grit_formatter/src/grit/patterns/pattern_or_else.rs:10-24 | crates/biome_grit_formatter/src/grit/predicates/predicate_and.rs:10-23 | crates/biome_grit_formatter/src/grit/predicates/predicate_any.rs:10-23 | crates/biome_grit_formatter/src/grit/predicates/predicate_or.rs:9-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/patterns/pattern_any.rs:10` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritPatternAny` in one and `&GritPatternOr` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) crates/biome_html_analyze/src/lint/a11y/use_anchor_content.rs:191 — crates/biome_html_analyze/src/lint/a11y/use_anchor_content.rs:191-202 | crates/biome_html_analyze/src/lint/a11y/use_heading_content.rs:241-255 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/a11y/use_anchor_content.rs:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–14 lines × 11) · ×1
  • Duplicated block (11–14 lines × 11) crates/biome_grit_formatter/src/grit/auxiliary/like.rs:24 — crates/biome_grit_formatter/src/grit/auxiliary/like.rs:24-37 | crates/biome_grit_formatter/src/grit/auxiliary/map.rs:15-25 | crates/biome_grit_formatter/src/grit/auxiliary/sequential.rs:19-31 | crates/biome_grit_formatter/src/grit/patterns/curly_pattern.rs:15-25 | crates/biome_grit_formatter/src/grit/patterns/pattern_any.rs:17-27 | crates/biome_grit_formatter/src/grit/patterns/pattern_or.rs:17-27 | crates/biome_grit_formatter/src/grit/patterns/pattern_or_else.rs:17-27 | crates/biome_grit_formatter/src/grit/predicates/predicate_and.rs:16-26 | crates/biome_grit_formatter/src/grit/predicates/predicate_any.rs:16-26 | crates/biome_grit_formatter/src/grit/predicates/predicate_curly.rs:15-25 | crates/biome_grit_formatter/src/grit/predicates/predicate_or.rs:16-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 11 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/auxiliary/like.rs:24` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 10) · ×1
  • Duplicated block (11–14 lines × 10) crates/biome_css_formatter/src/css/auxiliary/container_query_in_parens.rs:14 — crates/biome_css_formatter/src/css/auxiliary/container_query_in_parens.rs:14-26 | crates/biome_css_formatter/src/css/auxiliary/container_size_feature_in_parens.rs:14-26 | crates/biome_css_formatter/src/css/auxiliary/container_style_in_parens.rs:14-26 | crates/biome_css_formatter/src/css/auxiliary/media_condition_in_parens.rs:14-26 | crates/biome_css_formatter/src/css/auxiliary/media_feature_in_parens.rs:10-22 | crates/biome_css_formatter/src/css/auxiliary/parenthesized_expression.rs:14-26 | crates/biome_css_formatter/src/css/auxiliary/scope_edge.rs:10-22 | crates/biome_css_formatter/src/css/auxiliary/supports_feature_declaration.rs:14-26 | crates/biome_css_formatter/src/scss/auxiliary/supports_feature_declaration.rs:15-25 | crates/biome_css_formatter/src/tailwind/auxiliary/custom_variant_shorthand.rs:15-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 10 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/container_query_in_parens.rs:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssContainerQueryInParens` in one and `&CssContainerSizeFeatureInParens` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (14–15 lines × 8) · ×1
  • Duplicated block (14–15 lines × 8) crates/biome_js_formatter/src/js/classes/setter_class_member.rs:23 — crates/biome_js_formatter/src/js/classes/setter_class_member.rs:23-37 | crates/biome_js_formatter/src/js/declarations/catch_declaration.rs:38-52 | crates/biome_js_formatter/src/js/expressions/call_arguments.rs:77-90 | crates/biome_js_formatter/src/js/expressions/parenthesized_expression.rs:35-49 | crates/biome_js_formatter/src/js/objects/computed_member_name.rs:18-32 | crates/biome_js_formatter/src/js/objects/setter_object_member.rs:22-36 | crates/biome_js_formatter/src/js/statements/for_in_statement.rs:23-37 | crates/biome_js_formatter/src/js/statements/for_of_statement.rs:26-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_js_formatter/src/js/expressions/parenthesized_expression.rs:52` calls `format` and `crates/biome_js_formatter/src/js/statements/for_in_statement.rs:39` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14 lines × 7) · ×1
  • Duplicated block (14 lines × 7) crates/biome_css_formatter/src/verbatim.rs:239 — crates/biome_css_formatter/src/verbatim.rs:239-252 | crates/biome_graphql_formatter/src/verbatim.rs:155-168 | crates/biome_grit_formatter/src/verbatim.rs:154-167 | crates/biome_html_formatter/src/verbatim.rs:164-177 | crates/biome_js_formatter/src/verbatim.rs:154-167 | crates/biome_json_formatter/src/verbatim.rs:153-166 | crates/biome_yaml_formatter/src/verbatim.rs:196-209 — before extracting anything, compare `crates/biome_css_formatter/src/verbatim.rs` and `crates/biome_graphql_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<CssFormatContext>` in one and `&mut Formatter<GraphqlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (13–14 lines × 6) · ×1
  • Duplicated block (13–14 lines × 6) crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:119 — crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:119-132 | crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:115-127 | crates/biome_html_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:107-120 | crates/biome_js_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:128-141 | crates/biome_json_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:115-128 | crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:107-119 — before extracting anything, compare `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` and `crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) crates/biome_module_graph/src/db/type_inference/expressions.rs:1089 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1089-1102 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1172-1185 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1800-1813 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2505-2518 | crates/biome_module_graph/src/db/type_inference/lookup.rs:767-780 | crates/biome_module_graph/src/db/type_inference/lookup.rs:835-848 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1088` calls `Union` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1799` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–14 lines × 6) · ×1
  • Duplicated block (12–14 lines × 6) crates/biome_service/src/file_handlers/graphql.rs:581 — crates/biome_service/src/file_handlers/graphql.rs:581-592 | crates/biome_service/src/file_handlers/html.rs:1103-1114 | crates/biome_service/src/file_handlers/javascript.rs:1319-1331 | crates/biome_service/src/file_handlers/json.rs:649-662 | crates/biome_service/src/file_handlers/md.rs:587-600 | crates/biome_service/src/file_handlers/yaml.rs:479-492 — before extracting anything, compare `crates/biome_service/src/file_handlers/graphql.rs` and `crates/biome_service/src/file_handlers/html.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/javascript.rs:1319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_service/src/file_handlers/graphql.rs:579` calls `tree` and `crates/biome_service/src/file_handlers/javascript.rs:1319` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) crates/biome_module_graph/src/db/type_inference/promise_classification.rs:831 — crates/biome_module_graph/src/db/type_inference/promise_classification.rs:831-844 | crates/biome_module_graph/src/db/type_inference/promise_classification.rs:875-887 | crates/biome_module_graph/src/db/type_inference/promise_classification.rs:895-907 | crates/biome_module_graph/src/db/type_inference/promise_classification.rs:1013-1026 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_module_graph/src/db/type_inference/promise_classification.rs:831` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–14 lines × 3) · ×1
  • Duplicated block (8–14 lines × 3) crates/biome_graphql_formatter/src/graphql/definitions/enum_value_definition.rs:14 — crates/biome_graphql_formatter/src/graphql/definitions/enum_value_definition.rs:14-21 | crates/biome_graphql_formatter/src/graphql/definitions/field_definition.rs:17-30 | crates/biome_graphql_formatter/src/graphql/definitions/schema_definition.rs:15-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/definitions/enum_value_definition.rs:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GraphqlEnumValueDefinition` in one and `&GraphqlFieldDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_graphql_formatter/src/graphql/definitions/field_definition.rs:31` calls `format` and `crates/biome_graphql_formatter/src/graphql/definitions/schema_definition.rs:29` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–14 lines × 3) · ×1
  • Duplicated block (12–14 lines × 3) crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:235 — crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:235-246 | crates/biome_js_analyze/src/lint/correctness/no_unused_variables.rs:451-462 | crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:192-205 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:235` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_js_analyze/src/lint/correctness/no_unused_function_parameters.rs:234` calls `model` and `crates/biome_js_analyze/src/lint/suspicious/no_parameters_only_used_in_recursion.rs:189` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 7) · ×1
  • Duplicated block (13 lines × 7) crates/biome_service/src/file_handlers/css.rs:698 — crates/biome_service/src/file_handlers/css.rs:698-710 | crates/biome_service/src/file_handlers/graphql.rs:587-599 | crates/biome_service/src/file_handlers/html.rs:1109-1121 | crates/biome_service/src/file_handlers/javascript.rs:1326-1338 | crates/biome_service/src/file_handlers/json.rs:657-669 | crates/biome_service/src/file_handlers/md.rs:595-607 | crates/biome_service/src/file_handlers/yaml.rs:487-499 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:698` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) crates/biome_css_analyze/src/suppression.rs:15 — crates/biome_css_analyze/src/suppression.rs:15-27 | crates/biome_graphql_analyze/src/suppression.rs:15-27 | crates/biome_html_analyze/src/suppression.rs:15-27 | crates/biome_js_analyze/src/suppression.rs:15-27 | crates/biome_json_analyze/src/suppression.rs:15-27 | crates/biome_yaml_analyze/src/suppression.rs:15-27 — before extracting anything, compare `crates/biome_css_analyze/src/suppression.rs` and `crates/biome_graphql_analyze/src/suppression.rs` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) crates/biome_css_formatter/src/comments.rs:52 — crates/biome_css_formatter/src/comments.rs:52-64 | crates/biome_graphql_formatter/src/comments.rs:24-36 | crates/biome_grit_formatter/src/comments.rs:40-52 | crates/biome_js_formatter/src/comments.rs:39-51 | crates/biome_json_formatter/src/comments.rs:25-37 — before extracting anything, compare `crates/biome_css_formatter/src/comments.rs` and `crates/biome_js_formatter/src/comments.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/comments.rs:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `comment` to `&SourceComment<CssLanguage>` in one and `&SourceComment<GraphqlLanguage>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (11–13 lines × 4) · ×1
  • Duplicated block (11–13 lines × 4) crates/biome_js_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:127 — crates/biome_js_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:127-137 | crates/biome_js_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:239-249 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:143-155 | crates/biome_js_analyze/src/lint/nursery/use_tailwind_variables_shorthand.rs:99-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:122 — crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:122-131 | crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:427-439 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 10) · ×1
  • Duplicated block (12 lines × 10) crates/biome_module_graph/src/db/type_inference/expressions.rs:1072 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1072-1083 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1205-1216 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2349-2360 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2424-2435 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2852-2863 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3007-3018 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3089-3100 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3190-3201 | crates/biome_module_graph/src/db/type_inference/lookup.rs:817-828 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1056-1067 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1218` calls `Tuple` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1085` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–12 lines × 3) · ×1
  • Duplicated block (7–12 lines × 3) crates/biome_lsp/src/capabilities.rs:38 — crates/biome_lsp/src/capabilities.rs:38-49 | crates/biome_lsp/src/capabilities.rs:51-62 | crates/biome_lsp/src/capabilities.rs:63-69 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_lsp/src/capabilities.rs:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_lsp/src/capabilities.rs:38` calls `and_then` and `crates/biome_lsp/src/capabilities.rs:63` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 13) · ×1
  • Duplicated block (11 lines × 13) crates/biome_module_graph/src/db/type_inference/expressions.rs:884 — crates/biome_module_graph/src/db/type_inference/expressions.rs:884-894 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1164-1174 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1215-1225 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1509-1519 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1558-1568 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1721-1731 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2497-2507 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2862-2872 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3149-3159 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3200-3210 | crates/biome_module_graph/src/db/type_inference/lookup.rs:759-769 | crates/biome_module_graph/src/db/type_inference/lookup.rs:827-837 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1066-1076 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1214` calls `Interface` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:883` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 11) · ×1
  • Duplicated block (10–11 lines × 11) crates/biome_module_graph/src/db/type_inference/expressions.rs:896 — crates/biome_module_graph/src/db/type_inference/expressions.rs:896-906 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1227-1237 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1521-1531 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1570-1580 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1733-1743 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2228-2237 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2368-2378 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2445-2455 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2873-2883 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3161-3171 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3212-3222 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:895` calls `Extends` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:2227` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 9) · ×1
  • Duplicated block (10–11 lines × 9) crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:226 — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:226-236 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:238-248 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:266-276 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:278-288 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:306-316 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:318-328 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:330-340 | crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:342-352 | crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs:171-180 — before extracting anything, compare `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs` and `crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) crates/biome_migrate/src/analyzers/rule_mover.rs:279 — crates/biome_migrate/src/analyzers/rule_mover.rs:279-288 | crates/biome_migrate/src/analyzers/rule_mover.rs:361-370 | crates/biome_migrate/src/analyzers/rule_mover.rs:388-397 | crates/biome_migrate/src/analyzers/tailwind_options.rs:314-324 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_migrate/src/analyzers/tailwind_options.rs:313` calls `extend`, `into_iter` and `crates/biome_migrate/src/analyzers/rule_mover.rs:360` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–11 lines × 4) · ×1
  • Duplicated block (9–11 lines × 4) crates/biome_service/src/file_handlers/mod.rs:2437 — crates/biome_service/src/file_handlers/mod.rs:2437-2445 | crates/biome_service/src/file_handlers/mod.rs:2459-2469 | crates/biome_service/src/file_handlers/mod.rs:2474-2482 | crates/biome_service/src/file_handlers/mod.rs:2511-2521 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/mod.rs:2459` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 12) · ×1
  • Duplicated block (10 lines × 12) crates/biome_module_graph/src/db/type_inference/expressions.rs:897 — crates/biome_module_graph/src/db/type_inference/expressions.rs:897-906 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1228-1237 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1522-1531 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1571-1580 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1734-1743 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2369-2378 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2446-2455 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2874-2883 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2935-2944 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3162-3171 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3213-3222 | crates/biome_module_graph/src/db/type_inference/lookup.rs:947-956 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:895` calls `Extends` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:2367` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 11) · ×1
  • Duplicated block (10 lines × 11) crates/biome_module_graph/src/db/type_inference/expressions.rs:1075 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1075-1084 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1208-1217 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2352-2361 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2427-2436 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2855-2864 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3010-3019 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3092-3101 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3142-3151 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3193-3202 | crates/biome_module_graph/src/db/type_inference/lookup.rs:820-829 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1059-1068 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1218` calls `Tuple` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1085` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 10) · ×1
  • Duplicated block (10 lines × 10) crates/biome_module_graph/src/db/type_inference/expressions.rs:1210 — crates/biome_module_graph/src/db/type_inference/expressions.rs:1210-1219 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1716-1725 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2213-2222 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2857-2866 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3012-3021 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3094-3103 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3144-3153 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3195-3204 | crates/biome_module_graph/src/db/type_inference/lookup.rs:822-831 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1061-1070 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:1222` calls `Union` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:2225` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–10 lines × 7) · ×1
  • Duplicated block (9–10 lines × 7) crates/biome_css_formatter/src/verbatim.rs:178 — crates/biome_css_formatter/src/verbatim.rs:178-186 | crates/biome_graphql_formatter/src/verbatim.rs:93-102 | crates/biome_grit_formatter/src/verbatim.rs:93-101 | crates/biome_html_formatter/src/verbatim.rs:106-114 | crates/biome_js_formatter/src/verbatim.rs:93-101 | crates/biome_json_formatter/src/verbatim.rs:92-100 | crates/biome_yaml_formatter/src/verbatim.rs:117-125 — before extracting anything, compare `crates/biome_css_formatter/src/verbatim.rs` and `crates/biome_graphql_formatter/src/verbatim.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut Formatter<CssFormatContext>` in one and `&mut Formatter<GraphqlFormatContext>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/eslint_config.rs:139 — crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/eslint_config.rs:139-147 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:149-158 | crates/biome_json_analyze/src/assist/source/use_sorted_package_json/sorters/helpers.rs:190-198 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (9 lines × 14) · ×1
  • Duplicated block (9 lines × 14) crates/biome_module_graph/src/db/type_inference/expressions.rs:888 — crates/biome_module_graph/src/db/type_inference/expressions.rs:888-896 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1085-1093 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1168-1176 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1219-1227 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1513-1521 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1562-1570 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1725-1733 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2437-2445 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2501-2509 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3153-3161 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3204-3212 | crates/biome_module_graph/src/db/type_inference/lookup.rs:763-771 | crates/biome_module_graph/src/db/type_inference/lookup.rs:831-839 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1070-1078 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:897` calls `InstanceOf` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1177` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) crates/biome_service/src/file_handlers/css.rs:840 — crates/biome_service/src/file_handlers/css.rs:840-849 | crates/biome_service/src/file_handlers/graphql.rs:674-682 | crates/biome_service/src/file_handlers/html.rs:1328-1337 | crates/biome_service/src/file_handlers/json.rs:794-803 | crates/biome_service/src/file_handlers/md.rs:707-715 | crates/biome_service/src/file_handlers/yaml.rs:569-577 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:840` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_service/src/file_handlers/html.rs:1327` calls `Some` and `crates/biome_service/src/file_handlers/css.rs:839` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–9 lines × 5) · ×1
  • Duplicated block (6–9 lines × 5) crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:25 — crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:25-33 | crates/biome_css_formatter/src/scss/statements/include_at_rule.rs:26-34 | crates/biome_css_formatter/src/scss/statements/use_at_rule.rs:24-32 | crates/biome_html_formatter/src/svelte/auxiliary/await_opening_block.rs:31-39 | crates/biome_js_formatter/src/ts/bindings/type_parameter.rs:23-28 — before extracting anything, compare `crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs` and `crates/biome_css_formatter/src/scss/statements/use_at_rule.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut CssFormatter` in one and `&mut HtmlFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_css_formatter/src/scss/statements/include_at_rule.rs:24` calls `format`, `with_text_case` and `crates/biome_css_formatter/src/scss/statements/forward_at_rule.rs:23` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 4) · ×1
  • Duplicated block (8–9 lines × 4) crates/biome_service/src/settings.rs:1149 — crates/biome_service/src/settings.rs:1149-1156 | crates/biome_service/src/settings.rs:1171-1178 | crates/biome_service/src/settings.rs:1197-1205 | crates/biome_service/src/settings.rs:1217-1225 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/settings.rs:1149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:182 — crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:182-188 | crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:213-219 | crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:318-326 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/correctness/no_unknown_media_feature_name.rs:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 17) · ×1
  • Duplicated block (8 lines × 17) crates/biome_module_graph/src/db/type_inference/expressions.rs:888 — crates/biome_module_graph/src/db/type_inference/expressions.rs:888-895 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1085-1092 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1168-1175 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1219-1226 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1513-1520 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1562-1569 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1725-1732 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2437-2444 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2501-2508 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2802-2809 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2927-2934 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3153-3160 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3204-3211 | crates/biome_module_graph/src/db/type_inference/lookup.rs:763-770 | crates/biome_module_graph/src/db/type_inference/lookup.rs:831-838 | crates/biome_module_graph/src/db/type_inference/lookup.rs:939-946 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1070-1077 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:897` calls `InstanceOf` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1177` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 15) · ×1
  • Duplicated block (8 lines × 15) crates/biome_module_graph/src/db/type_inference/expressions.rs:887 — crates/biome_module_graph/src/db/type_inference/expressions.rs:887-894 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1167-1174 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1218-1225 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1512-1519 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1561-1568 | crates/biome_module_graph/src/db/type_inference/expressions.rs:1724-1731 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2500-2507 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2618-2625 | crates/biome_module_graph/src/db/type_inference/expressions.rs:2865-2872 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3152-3159 | crates/biome_module_graph/src/db/type_inference/expressions.rs:3203-3210 | crates/biome_module_graph/src/db/type_inference/lookup.rs:762-769 | crates/biome_module_graph/src/db/type_inference/lookup.rs:830-837 | crates/biome_module_graph/src/db/type_inference/lookup.rs:938-945 | crates/biome_module_graph/src/db/type_inference/resolver.rs:1069-1076 — before extracting anything, compare `crates/biome_module_graph/src/db/type_inference/expressions.rs` and `crates/biome_module_graph/src/db/type_inference/lookup.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/biome_module_graph/src/db/type_inference/expressions.rs:897` calls `InstanceOf` and `crates/biome_module_graph/src/db/type_inference/expressions.rs:1177` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 9) · ×1
  • Duplicated block (8 lines × 9) crates/biome_configuration/src/overrides.rs:197 — crates/biome_configuration/src/overrides.rs:197-204 | crates/biome_configuration/src/overrides.rs:218-225 | crates/biome_configuration/src/overrides.rs:236-243 | crates/biome_configuration/src/overrides.rs:252-259 | crates/biome_configuration/src/overrides.rs:267-274 | crates/biome_configuration/src/overrides.rs:282-289 | crates/biome_configuration/src/overrides.rs:301-308 | crates/biome_configuration/src/overrides.rs:317-324 | crates/biome_configuration/src/overrides.rs:333-340 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–8 lines × 8) · ×1
  • Duplicated block (6–8 lines × 8) crates/biome_service/src/settings.rs:2105 — crates/biome_service/src/settings.rs:2105-2110 | crates/biome_service/src/settings.rs:2169-2174 | crates/biome_service/src/settings.rs:2210-2215 | crates/biome_service/src/settings.rs:2247-2253 | crates/biome_service/src/settings.rs:2280-2286 | crates/biome_service/src/settings.rs:2306-2313 | crates/biome_service/src/settings.rs:2364-2369 | crates/biome_service/src/settings.rs:2388-2394 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&mut JsFormatOptions` in one and `&mut JsonFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (5–8 lines × 7) · ×1
  • Duplicated block (5–8 lines × 7) crates/biome_service/src/settings.rs:2098 — crates/biome_service/src/settings.rs:2098-2102 | crates/biome_service/src/settings.rs:2161-2167 | crates/biome_service/src/settings.rs:2202-2208 | crates/biome_service/src/settings.rs:2239-2245 | crates/biome_service/src/settings.rs:2272-2278 | crates/biome_service/src/settings.rs:2297-2304 | crates/biome_service/src/settings.rs:2356-2361 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/settings.rs:2098` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&mut JsFormatOptions` in one and `&mut JsonFormatOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6–8 lines × 4) · ×1
  • Duplicated block (6–8 lines × 4) crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:73 — crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:73-80 | crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:99-104 | crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs:70-77 | crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs:140-145 — before extracting anything, compare `crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs` and `crates/biome_markdown_formatter/src/gfm/auxiliary/table_row.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_markdown_formatter/src/gfm/auxiliary/table_delimiter_row.rs:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:433 — crates/biome_js_analyze/src/lint/nursery/use_iterator_zip.rs:433-439 | crates/biome_js_analyze/src/lint/nursery/use_modern_math_apis.rs:183-188 | crates/biome_js_analyze/src/lint/nursery/use_set_size.rs:208-214 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:135 — crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:135-141 | crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:135-141 | crates/biome_html_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:123-129 | crates/biome_js_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:144-150 | crates/biome_json_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:131-137 | crates/biome_markdown_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:127-133 — before extracting anything, compare `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` and `crates/biome_graphql_analyze/src/lint/nursery/use_consistent_unicode_bom.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_analyze/src/lint/nursery/use_consistent_unicode_bom.rs:135` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) xtask/codegen/src/generate_migrate_eslint.rs:47 — xtask/codegen/src/generate_migrate_eslint.rs:47-52 | xtask/codegen/src/generate_migrate_eslint.rs:55-59 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `xtask/codegen/src/generate_migrate_eslint.rs:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • Duplicated block (5 lines × 6) crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:320 — crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:320-324 | crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:132-137 | crates/biome_js_analyze/src/lint/nursery/no_null.rs:148-153 | crates/biome_js_analyze/src/lint/nursery/no_useless_fallback_in_spread.rs:116-121 | crates/biome_js_analyze/src/lint/nursery/use_flat_math_min_max.rs:131-136 | crates/biome_js_analyze/src/lint/style/use_trim_start_end.rs:233-238 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/use_optional_chain.rs:320` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–5 lines × 5) · ×1
  • Duplicated block (3–5 lines × 5) crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:52 — crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:52-56 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_field_definition_names.rs:144-148 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_field_definition_names.rs:152-156 | crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_input_field_names.rs:52-56 | crates/biome_graphql_analyze/src/lint/suspicious/no_duplicate_fields.rs:213-215 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_analyze/src/lint/correctness/no_duplicate_argument_names.rs:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×1
  • Duplicated block (4–5 lines × 4) crates/biome_js_analyze/src/lint/nursery/no_console_spaces.rs:127 — crates/biome_js_analyze/src/lint/nursery/no_console_spaces.rs:127-130 | crates/biome_js_analyze/src/lint/nursery/use_vue_matching_component_file_name.rs:206-210 | crates/biome_js_analyze/src/lint/style/use_numeric_separators.rs:231-234 | crates/biome_js_analyze/src/lint/suspicious/no_octal_escape.rs:117-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/nursery/no_console_spaces.rs:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 7) · ×1
  • Duplicated block (11 lines × 7) crates/biome_css_formatter/src/css/auxiliary/declaration_block.rs:10 — crates/biome_css_formatter/src/css/auxiliary/declaration_block.rs:10-24 | crates/biome_css_formatter/src/css/auxiliary/declaration_or_at_rule_block.rs:14-28 | crates/biome_css_formatter/src/css/auxiliary/declaration_or_rule_block.rs:14-28 | crates/biome_css_formatter/src/css/auxiliary/font_feature_values_block.rs:14-28 | crates/biome_css_formatter/src/css/auxiliary/keyframes_block.rs:10-24 | crates/biome_css_formatter/src/css/auxiliary/page_at_rule_block.rs:10-24 | crates/biome_css_formatter/src/css/auxiliary/rule_block.rs:10-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/declaration_or_at_rule_block.rs:14` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssDeclarationBlock` in one and `&CssDeclarationOrAtRuleBlock` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) crates/biome_css_formatter/src/css/lists/compound_selector_list.rs:7 — crates/biome_css_formatter/src/css/lists/compound_selector_list.rs:7-29 | crates/biome_css_formatter/src/css/lists/keyframes_selector_list.rs:7-40 | crates/biome_css_formatter/src/css/lists/page_selector_list.rs:7-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssCompoundSelectorList` in one and `&CssKeyframesSelectorList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12 lines × 8) · ×1
  • Duplicated block (12 lines × 8) crates/biome_css_formatter/src/css/lists/declaration_list.rs:8 — crates/biome_css_formatter/src/css/lists/declaration_list.rs:8-21 | crates/biome_css_formatter/src/css/lists/declaration_or_at_rule_list.rs:8-21 | crates/biome_graphql_formatter/src/graphql/lists/definition_list.rs:8-19 | crates/biome_graphql_formatter/src/graphql/lists/enum_value_list.rs:7-18 | crates/biome_graphql_formatter/src/graphql/lists/field_definition_list.rs:7-18 | crates/biome_graphql_formatter/src/graphql/lists/input_field_list.rs:7-18 | crates/biome_graphql_formatter/src/graphql/lists/root_operation_type_definition_list.rs:13-24 | crates/biome_graphql_formatter/src/graphql/lists/selection_list.rs:7-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/graphql/lists/root_operation_type_definition_list.rs:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssDeclarationList` in one and `&CssDeclarationOrAtRuleList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) crates/biome_css_formatter/src/css/lists/font_feature_values_item_list.rs:7 — crates/biome_css_formatter/src/css/lists/font_feature_values_item_list.rs:7-17 | crates/biome_css_formatter/src/css/lists/root_item_list.rs:7-17 | crates/biome_css_formatter/src/css/lists/rule_list.rs:7-17 | crates/biome_js_formatter/src/js/lists/class_member_list.rs:10-18 | crates/biome_js_formatter/src/js/lists/switch_case_list.rs:10-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssFontFeatureValuesItemList` in one and `&CssRootItemList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) crates/biome_css_parser/src/token_source.rs:299 — crates/biome_css_parser/src/token_source.rs:299-309 | crates/biome_html_parser/src/token_source.rs:390-400 | crates/biome_js_parser/src/token_source.rs:196-206 | crates/biome_markdown_parser/src/token_source.rs:337-347 | crates/biome_tailwind_parser/src/token_source.rs:143-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `Self::Context` in one and `JsLexContext` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) crates/biome_graphql_formatter/src/lib.rs:261 — crates/biome_graphql_formatter/src/lib.rs:261-268 | crates/biome_grit_formatter/src/cst.rs:41-48 | crates/biome_html_formatter/src/lib.rs:208-215 | crates/biome_js_formatter/src/lib.rs:480-487 | crates/biome_json_formatter/src/lib.rs:295-302 | crates/biome_yaml_formatter/src/lib.rs:298-305 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_graphql_formatter/src/lib.rs:261` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `token` to `&GraphqlSyntaxToken` in one and `&GritSyntaxToken` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12 lines × 7) · ×1
  • Duplicated block (12 lines × 7) crates/biome_languages/src/css.rs:322 — crates/biome_languages/src/css.rs:322-333 | crates/biome_languages/src/graphql.rs:76-87 | crates/biome_languages/src/grit.rs:62-73 | crates/biome_languages/src/html.rs:222-233 | crates/biome_languages/src/json.rs:410-421 | crates/biome_languages/src/md.rs:81-92 | crates/biome_languages/src/yaml.rs:83-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) crates/biome_syntax_codegen/src/ast.rs:641 — crates/biome_syntax_codegen/src/ast.rs:641-646 | crates/biome_syntax_codegen/src/ast.rs:648-653 | xtask/codegen/src/js_kinds_src.rs:759-764 | xtask/codegen/src/js_kinds_src.rs:766-771 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (8 lines × 18) · ×1
  • Duplicated block (8 lines × 18) crates/biome_css_formatter/src/css/auxiliary/at_rule_declarator.rs:8 — crates/biome_css_formatter/src/css/auxiliary/at_rule_declarator.rs:8-15 | crates/biome_css_formatter/src/css/auxiliary/namespace.rs:8-15 | crates/biome_css_formatter/src/css/auxiliary/unicode_range.rs:8-15 | crates/biome_css_formatter/src/css/selectors/pseudo_element_selector.rs:12-19 | crates/biome_css_formatter/src/css/selectors/universal_selector.rs:8-15 | crates/biome_css_formatter/src/css/statements/custom_media_at_rule.rs:9-16 | crates/biome_css_formatter/src/css/value/percentage.rs:7-14 | crates/biome_css_formatter/src/scss/selectors/keyframes_selector.rs:8-15 | crates/biome_css_formatter/src/scss/selectors/placeholder_selector.rs:8-15 | crates/biome_grit_formatter/src/grit/auxiliary/language_specific_snippet.rs:11-18 | crates/biome_html_formatter/src/astro/auxiliary/opening_fragment.rs:7-14 | crates/biome_html_formatter/src/svelte/auxiliary/rest_binding.rs:7-14 | crates/biome_html_formatter/src/svelte/auxiliary/snippet_block.rs:7-14 | crates/biome_html_formatter/src/vue/auxiliary/modifier.rs:8-15 | crates/biome_html_formatter/src/vue/auxiliary/v_for_rest_binding.rs:8-15 | crates/biome_js_formatter/src/js/assignments/array_assignment_pattern_rest_element.rs:17-24 | crates/biome_js_formatter/src/js/assignments/object_assignment_pattern_rest.rs:15-22 | crates/biome_js_formatter/src/js/auxiliary/expression_template_root.rs:8-15 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 18 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 18 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/selectors/pseudo_element_selector.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssAtRuleDeclarator` in one and `&CssNamespace` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (5 lines × 19) · ×1
  • Duplicated block (5 lines × 19) crates/biome_css_formatter/src/css/auxiliary/attr_fallback_value.rs:9 — crates/biome_css_formatter/src/css/auxiliary/attr_fallback_value.rs:9-20 | crates/biome_css_formatter/src/css/auxiliary/nth_offset.rs:8-12 | crates/biome_css_formatter/src/css/statements/color_profile_at_rule.rs:9-13 | crates/biome_css_formatter/src/css/statements/container_at_rule.rs:9-13 | crates/biome_css_formatter/src/css/statements/counter_style_at_rule.rs:9-13 | crates/biome_css_formatter/src/css/statements/font_face_at_rule.rs:9-13 | crates/biome_css_formatter/src/css/statements/font_palette_values_at_rule.rs:13-17 | crates/biome_css_formatter/src/css/statements/function_at_rule.rs:10-14 | crates/biome_css_formatter/src/css/statements/media_at_rule.rs:9-13 | crates/biome_css_formatter/src/css/statements/position_try_at_rule.rs:8-12 | crates/biome_css_formatter/src/css/statements/property_at_rule.rs:9-13 | crates/biome_css_formatter/src/css/statements/scope_at_rule.rs:9-13 | crates/biome_css_formatter/src/css/statements/starting_style_at_rule.rs:9-13 | crates/biome_css_formatter/src/css/statements/supports_at_rule.rs:10-14 | crates/biome_css_formatter/src/css/statements/view_transition_at_rule.rs:8-12 | crates/biome_css_formatter/src/scss/auxiliary/parameter_default_value.rs:14-18 | crates/biome_graphql_formatter/src/graphql/auxiliary/type_condition.rs:11-15 | crates/biome_grit_formatter/src/grit/patterns/pattern_until_clause.rs:8-12 | crates/biome_html_formatter/src/svelte/auxiliary/each_index.rs:7-11 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 19 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 19 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/statements/font_palette_values_at_rule.rs:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssAttrFallbackValue` in one and `&CssNthOffset` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (5 lines × 8) · ×1
  • Duplicated block (5 lines × 8) crates/biome_css_formatter/src/css/auxiliary/attribute_modifier.rs:8 — crates/biome_css_formatter/src/css/auxiliary/attribute_modifier.rs:8-12 | crates/biome_css_formatter/src/css/auxiliary/else_keyword.rs:9-13 | crates/biome_css_formatter/src/css/auxiliary/font_face_at_rule_declarator.rs:13-20 | crates/biome_css_formatter/src/css/auxiliary/import_anonymous_layer.rs:8-12 | crates/biome_css_formatter/src/css/auxiliary/number_declarator.rs:9-15 | crates/biome_css_formatter/src/css/auxiliary/raw_string_declarator.rs:9-15 | crates/biome_css_formatter/src/css/pseudo/pseudo_class_nth_identifier.rs:12-16 | crates/biome_css_formatter/src/css/selectors/keyframes_ident_selector.rs:12-16 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/font_face_at_rule_declarator.rs:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssAttributeModifier` in one and `&CssElseKeyword` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (18 lines × 12) · ×1
  • Duplicated block (18 lines × 12) crates/biome_css_formatter/src/css/auxiliary/container_and_query.rs:8 — crates/biome_css_formatter/src/css/auxiliary/container_and_query.rs:8-25 | crates/biome_css_formatter/src/css/auxiliary/container_or_query.rs:8-25 | crates/biome_css_formatter/src/css/auxiliary/container_scroll_state_and_query.rs:11-28 | crates/biome_css_formatter/src/css/auxiliary/container_scroll_state_or_query.rs:11-28 | crates/biome_css_formatter/src/css/auxiliary/container_style_and_query.rs:12-29 | crates/biome_css_formatter/src/css/auxiliary/container_style_or_query.rs:12-29 | crates/biome_css_formatter/src/css/auxiliary/if_test_boolean_and_expr.rs:9-26 | crates/biome_css_formatter/src/css/auxiliary/if_test_boolean_or_expr.rs:9-26 | crates/biome_css_formatter/src/css/auxiliary/media_and_condition.rs:8-25 | crates/biome_css_formatter/src/css/auxiliary/media_and_type_query.rs:13-30 | crates/biome_css_formatter/src/css/auxiliary/media_or_condition.rs:8-25 | crates/biome_css_formatter/src/css/auxiliary/scope_range_interval.rs:8-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 12 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/container_scroll_state_and_query.rs:11` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssContainerAndQuery` in one and `&CssContainerOrQuery` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_css_formatter/src/css/auxiliary/media_and_type_query.rs:9` calls `fmt_node`, `fmt_media_query_node`, `syntax` and `crates/biome_css_formatter/src/css/auxiliary/container_and_query.rs:7` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) crates/biome_css_formatter/src/css/auxiliary/container_not_query.rs:8 — crates/biome_css_formatter/src/css/auxiliary/container_not_query.rs:8-19 | crates/biome_css_formatter/src/css/auxiliary/container_scroll_state_not_query.rs:11-22 | crates/biome_css_formatter/src/css/auxiliary/container_style_not_query.rs:11-22 | crates/biome_css_formatter/src/css/auxiliary/scope_range_end.rs:8-19 | crates/biome_css_formatter/src/css/selectors/keyframes_range_selector.rs:12-23 | crates/biome_css_formatter/src/css/statements/layer_at_rule.rs:8-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/container_scroll_state_not_query.rs:11` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssContainerNotQuery` in one and `&CssContainerScrollStateNotQuery` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) crates/biome_css_formatter/src/css/auxiliary/declaration_important.rs:8 — crates/biome_css_formatter/src/css/auxiliary/declaration_important.rs:8-21 | crates/biome_css_formatter/src/css/value/color.rs:8-21 | crates/biome_css_formatter/src/scss/auxiliary/extend_optional_modifier.rs:12-25 | crates/biome_css_formatter/src/scss/value/hash_value.rs:9-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/scss/auxiliary/extend_optional_modifier.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssDeclarationImportant` in one and `&CssColor` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) crates/biome_css_formatter/src/css/auxiliary/if_branch.rs:9 — crates/biome_css_formatter/src/css/auxiliary/if_branch.rs:9-25 | crates/biome_graphql_formatter/src/graphql/auxiliary/object_field.rs:8-19 | crates/biome_grit_formatter/src/grit/auxiliary/bubble.rs:7-23 | crates/biome_html_formatter/src/svelte/auxiliary/rename_binding.rs:7-18 | crates/biome_html_formatter/src/vue/auxiliary/v_for_object_property_binding.rs:12-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_formatter/src/vue/auxiliary/v_for_object_property_binding.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut CssFormatter` in one and `&mut GraphqlFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8 lines × 31) · ×1
  • Duplicated block (8 lines × 31) crates/biome_css_formatter/src/css/auxiliary/syntax_component_without_multiplier.rs:17 — crates/biome_css_formatter/src/css/auxiliary/syntax_component_without_multiplier.rs:17-32 | crates/biome_css_formatter/src/css/auxiliary/unicode_range_interval.rs:8-15 | crates/biome_css_formatter/src/scss/auxiliary/parameter.rs:10-25 | crates/biome_css_formatter/src/tailwind/auxiliary/value_theme_reference.rs:7-22 | crates/biome_graphql_formatter/src/graphql/auxiliary/list_type.rs:8-23 | crates/biome_grit_formatter/src/grit/auxiliary/bubble_scope.rs:7-22 | crates/biome_grit_formatter/src/grit/auxiliary/language_flavor.rs:7-22 | crates/biome_grit_formatter/src/grit/auxiliary/like_threshold.rs:7-22 | crates/biome_grit_formatter/src/grit/auxiliary/map_accessor.rs:7-15 | crates/biome_grit_formatter/src/grit/auxiliary/named_arg.rs:7-15 | crates/biome_grit_formatter/src/grit/patterns/bracketed_pattern.rs:7-22 | crates/biome_grit_formatter/src/grit/patterns/regex_pattern_variables.rs:11-26 | crates/biome_html_formatter/src/angular/auxiliary/structural_directive.rs:11-21 | crates/biome_html_formatter/src/angular/auxiliary/template_ref_variable.rs:11-21 | crates/biome_html_formatter/src/astro/auxiliary/closing_fragment.rs:7-22 | crates/biome_html_formatter/src/astro/auxiliary/expression.rs:8-23 | crates/biome_html_formatter/src/astro/auxiliary/fragment.rs:7-22 | crates/biome_html_formatter/src/html/auxiliary/cdata_section.rs:7-22 | crates/biome_html_formatter/src/html/auxiliary/member_name.rs:7-15 | crates/biome_html_formatter/src/svelte/auxiliary/await_closing_block.rs:11-26 | crates/biome_html_formatter/src/svelte/auxiliary/declaration_block.rs:7-22 | crates/biome_html_formatter/src/svelte/auxiliary/each_closing_block.rs:7-22 | crates/biome_html_formatter/src/svelte/auxiliary/each_key.rs:7-22 | crates/biome_html_formatter/src/svelte/auxiliary/member_property.rs:7-15 | crates/biome_html_formatter/src/svelte/auxiliary/snippet_closing_block.rs:11-26 | crates/biome_html_formatter/src/svelte/value/template_attribute_value.rs:11-18 | crates/biome_html_formatter/src/vue/auxiliary/dynamic_argument.rs:8-23 | crates/biome_html_formatter/src/vue/auxiliary/v_bind_shorthand_directive.rs:12-20 | crates/biome_markdown_formatter/src/gfm/auxiliary/strikethrough.rs:8-23 | crates/biome_markdown_formatter/src/markdown/auxiliary/frontmatter.rs:7-22 | crates/biome_markdown_formatter/src/markdown/auxiliary/reference_link_label.rs:11-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 31 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 31 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_css_formatter/src/css/auxiliary/syntax_component_without_multiplier.rs:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&CssSyntaxComponentWithoutMultiplier` in one and `&CssUnicodeRangeInterval` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (15 lines × 7) · ×1
  • Duplicated block (15 lines × 7) crates/biome_css_formatter/src/css/auxiliary/syntax_type.rs:9 — crates/biome_css_formatter/src/css/auxiliary/syntax_type.rs:9-24 | crates/biome_grit_formatter/src/grit/predicates/bracketed_predicate.rs:7-21 | crates/biome_html_formatter/src/svelte/auxiliary/await_block.rs:7-22 | crates/biome_html_formatter/src/svelte/auxiliary/if_closing_block.rs:8-23 | crates/biome_html_formatter/src/svelte/auxiliary/key_closing_block.rs:8-23 | crates/biome_html_formatter/src/svelte/auxiliary/square_destructured_name.rs:11-26 | crates/biome_js_formatter/src/ts/module/import_type_assertion_block.rs:12-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_formatter/src/svelte/auxiliary/square_destructured_name.rs:11` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `&mut CssFormatter` in one and `&mut GritFormatter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12 lines × 12) · ×1
  • Duplicated block (12 lines × 12) crates/biome_css_parser/src/syntax/at_rule/color_profile.rs:18 — crates/biome_css_parser/src/syntax/at_rule/color_profile.rs:18-29 | crates/biome_css_parser/src/syntax/at_rule/container/mod.rs:88-99 | crates/biome_css_parser/src/syntax/at_rule/counter_style.rs:18-29 | crates/biome_css_parser/src/syntax/at_rule/font_face.rs:15-26 | crates/biome_css_parser/src/syntax/at_rule/font_palette_values.rs:22-33 | crates/biome_css_parser/src/syntax/at_rule/function.rs:44-55 | crates/biome_css_parser/src/syntax/at_rule/position_try.rs:22-33 | crates/biome_css_parser/src/syntax/at_rule/property.rs:21-32 | crates/biome_css_parser/src/syntax/at_rule/scope.rs:19-30 | crates/biome_css_parser/src/syntax/at_rule/starting_style.rs:43-54 | crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:97-108 | crates/biome_css_parser/src/syntax/at_rule/view_transition.rs:16-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 12 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 12 times.
D4 · Code Duplication · Duplicated block (7 lines × 11) · ×1
  • Duplicated block (7 lines × 11) crates/biome_grit_formatter/src/grit/auxiliary/every.rs:7 — crates/biome_grit_formatter/src/grit/auxiliary/every.rs:7-14 | crates/biome_grit_formatter/src/grit/auxiliary/some.rs:7-14 | crates/biome_grit_formatter/src/grit/patterns/pattern_after.rs:7-14 | crates/biome_grit_formatter/src/grit/patterns/pattern_before.rs:7-14 | crates/biome_grit_formatter/src/grit/patterns/pattern_else_clause.rs:7-14 | crates/biome_grit_formatter/src/grit/patterns/pattern_includes.rs:7-14 | crates/biome_grit_formatter/src/grit/patterns/pattern_maybe.rs:7-14 | crates/biome_grit_formatter/src/grit/predicates/predicate_else_clause.rs:11-18 | crates/biome_grit_formatter/src/grit/predicates/predicate_maybe.rs:8-14 | crates/biome_grit_formatter/src/grit/predicates/predicate_return.rs:7-14 | crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_element.rs:8-15 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 11 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/predicates/predicate_else_clause.rs:11` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritEvery` in one and `&GritSome` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (17 lines × 11) · ×1
  • Duplicated block (17 lines × 11) crates/biome_grit_formatter/src/grit/auxiliary/list_accessor.rs:8 — crates/biome_grit_formatter/src/grit/auxiliary/list_accessor.rs:8-25 | crates/biome_grit_formatter/src/grit/auxiliary/node_like.rs:7-24 | crates/biome_grit_formatter/src/grit/predicates/predicate_call.rs:8-24 | crates/biome_html_formatter/src/angular/auxiliary/event_binding.rs:7-23 | crates/biome_html_formatter/src/angular/auxiliary/property_binding.rs:7-23 | crates/biome_html_formatter/src/angular/auxiliary/two_way_binding.rs:7-23 | crates/biome_html_formatter/src/html/auxiliary/spread_attribute.rs:7-24 | crates/biome_html_formatter/src/svelte/auxiliary/if_block.rs:7-24 | crates/biome_html_formatter/src/vue/auxiliary/directive.rs:8-25 | crates/biome_html_formatter/src/vue/auxiliary/v_on_shorthand_directive.rs:12-29 | crates/biome_html_formatter/src/vue/auxiliary/v_slot_shorthand_directive.rs:12-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 11 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_formatter/src/vue/auxiliary/v_on_shorthand_directive.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritListAccessor` in one and `&GritNodeLike` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (17 lines × 21) · ×1
  • Duplicated block (17 lines × 21) crates/biome_grit_formatter/src/grit/patterns/add_operation.rs:7 — crates/biome_grit_formatter/src/grit/patterns/add_operation.rs:7-24 | crates/biome_grit_formatter/src/grit/patterns/assignment_as_pattern.rs:11-28 | crates/biome_grit_formatter/src/grit/patterns/div_operation.rs:7-24 | crates/biome_grit_formatter/src/grit/patterns/mod_operation.rs:7-24 | crates/biome_grit_formatter/src/grit/patterns/mul_operation.rs:7-24 | crates/biome_grit_formatter/src/grit/patterns/pattern_accumulate.rs:7-23 | crates/biome_grit_formatter/src/grit/patterns/pattern_as.rs:7-24 | crates/biome_grit_formatter/src/grit/patterns/pattern_limit.rs:7-24 | crates/biome_grit_formatter/src/grit/patterns/sub_operation.rs:7-24 | crates/biome_grit_formatter/src/grit/predicates/predicate_accumulate.rs:12-29 | crates/biome_grit_formatter/src/grit/predicates/predicate_assignment.rs:12-29 | crates/biome_grit_formatter/src/grit/predicates/predicate_equal.rs:8-25 | crates/biome_grit_formatter/src/grit/predicates/predicate_greater.rs:7-24 | crates/biome_grit_formatter/src/grit/predicates/predicate_greater_equal.rs:11-28 | crates/biome_grit_formatter/src/grit/predicates/predicate_less.rs:7-24 | crates/biome_grit_formatter/src/grit/predicates/predicate_less_equal.rs:7-24 | crates/biome_grit_formatter/src/grit/predicates/predicate_match.rs:7-24 | crates/biome_grit_formatter/src/grit/predicates/predicate_not_equal.rs:7-24 | crates/biome_html_formatter/src/svelte/auxiliary/curly_destructured_name.rs:12-29 | crates/biome_html_formatter/src/vue/auxiliary/v_for_array_binding.rs:8-25 | crates/biome_html_formatter/src/vue/auxiliary/v_for_object_binding.rs:8-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 21 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 21 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_formatter/src/grit/patterns/assignment_as_pattern.rs:11` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&GritAddOperation` in one and `&GritAssignmentAsPattern` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) crates/biome_grit_patterns/src/pattern_compiler/add_compiler.rs:12 — crates/biome_grit_patterns/src/pattern_compiler/add_compiler.rs:12-17 | crates/biome_grit_patterns/src/pattern_compiler/divide_compiler.rs:12-17 | crates/biome_grit_patterns/src/pattern_compiler/modulo_compiler.rs:12-17 | crates/biome_grit_patterns/src/pattern_compiler/multiply_compiler.rs:12-17 | crates/biome_grit_patterns/src/pattern_compiler/subtract_compiler.rs:12-17 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_grit_patterns/src/pattern_compiler/add_compiler.rs:12` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) crates/biome_html_formatter/src/svelte/auxiliary/attach_attribute.rs:7 — crates/biome_html_formatter/src/svelte/auxiliary/attach_attribute.rs:7-25 | crates/biome_html_formatter/src/svelte/auxiliary/const_block.rs:7-25 | crates/biome_html_formatter/src/svelte/auxiliary/html_block.rs:7-25 | crates/biome_html_formatter/src/svelte/auxiliary/render_block.rs:7-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&SvelteAttachAttribute` in one and `&SvelteConstBlock` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×1
  • Duplicated block (9 lines × 8) crates/biome_js_formatter/src/js/assignments/parenthesized_assignment.rs:15 — crates/biome_js_formatter/src/js/assignments/parenthesized_assignment.rs:15-30 | crates/biome_js_formatter/src/js/expressions/import_meta_expression.rs:12-27 | crates/biome_js_formatter/src/js/expressions/new_target_expression.rs:12-27 | crates/biome_js_formatter/src/jsx/objects/member_name.rs:10-18 | crates/biome_js_formatter/src/ts/auxiliary/qualified_module_name.rs:11-19 | crates/biome_js_formatter/src/ts/auxiliary/qualified_name.rs:11-19 | crates/biome_js_formatter/src/ts/types/array_type.rs:10-24 | crates/biome_js_formatter/src/ts/types/template_literal_type.rs:11-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/assignments/parenthesized_assignment.rs:15` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsParenthesizedAssignment` in one and `&JsImportMetaExpression` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7 lines × 17) · ×1
  • Duplicated block (7 lines × 17) crates/biome_js_formatter/src/js/auxiliary/decorator.rs:8 — crates/biome_js_formatter/src/js/auxiliary/decorator.rs:8-15 | crates/biome_js_formatter/src/js/auxiliary/private_name.rs:11-18 | crates/biome_js_formatter/src/js/auxiliary/spread.rs:11-18 | crates/biome_js_formatter/src/js/bindings/array_binding_pattern_rest_element.rs:15-22 | crates/biome_js_formatter/src/js/expressions/post_update_expression.rs:12-19 | crates/biome_js_formatter/src/js/expressions/yield_expression.rs:12-19 | crates/biome_js_formatter/src/js/objects/private_class_member_name.rs:11-18 | crates/biome_js_formatter/src/ts/assignments/non_null_assertion_assignment.rs:16-22 | crates/biome_js_formatter/src/ts/auxiliary/definite_property_annotation.rs:15-22 | crates/biome_js_formatter/src/ts/auxiliary/definite_variable_annotation.rs:15-22 | crates/biome_js_formatter/src/ts/auxiliary/mapped_type_optional_modifier_clause.rs:17-24 | crates/biome_js_formatter/src/ts/auxiliary/mapped_type_readonly_modifier_clause.rs:17-23 | crates/biome_js_formatter/src/ts/auxiliary/optional_property_annotation.rs:15-22 | crates/biome_js_formatter/src/ts/bindings/this_parameter.rs:10-17 | crates/biome_js_formatter/src/ts/expressions/instantiation_expression.rs:13-20 | crates/biome_js_formatter/src/ts/expressions/non_null_assertion_expression.rs:16-23 | crates/biome_js_formatter/src/ts/types/reference_type.rs:10-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 17 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 17 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_formatter/src/js/bindings/array_binding_pattern_rest_element.rs:15` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&JsDecorator` in one and `&JsPrivateName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 15) · ×1
  • Duplicated block (6 lines × 15) crates/biome_service/src/file_handlers/css.rs:378 — crates/biome_service/src/file_handlers/css.rs:378-383 | crates/biome_service/src/file_handlers/css.rs:396-401 | crates/biome_service/src/file_handlers/graphql.rs:114-119 | crates/biome_service/src/file_handlers/graphql.rs:132-137 | crates/biome_service/src/file_handlers/grit.rs:263-268 | crates/biome_service/src/file_handlers/html.rs:575-580 | crates/biome_service/src/file_handlers/html.rs:593-598 | crates/biome_service/src/file_handlers/javascript.rs:580-585 | crates/biome_service/src/file_handlers/javascript.rs:598-603 | crates/biome_service/src/file_handlers/json.rs:140-145 | crates/biome_service/src/file_handlers/json.rs:158-163 | crates/biome_service/src/file_handlers/md.rs:300-305 | crates/biome_service/src/file_handlers/md.rs:318-323 | crates/biome_service/src/file_handlers/yaml.rs:255-260 | crates/biome_service/src/file_handlers/yaml.rs:299-304 — before extracting anything, compare `crates/biome_service/src/file_handlers/css.rs` and `crates/biome_service/src/file_handlers/graphql.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_service/src/file_handlers/css.rs:378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (1–8 lines × 5) · ×1
  • Duplicated block (1–8 lines × 5) crates/biome_js_runtime/src/semantic.rs:174 — crates/biome_js_runtime/src/semantic.rs:174-174 | crates/biome_js_runtime/src/semantic.rs:243-256 | crates/biome_js_runtime/src/semantic.rs:265-265 | crates/biome_js_runtime/src/semantic.rs:297-304 | crates/biome_js_runtime/src/semantic.rs:313-313 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_runtime/src/semantic.rs:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–7 lines × 4) · ×1
  • Duplicated block (3–7 lines × 4) crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:133 — crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:133-139 | crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:241-243 | crates/biome_html_analyze/src/lint/nursery/use_tailwind_shorthand_classes.rs:145-154 | crates/biome_html_analyze/src/lint/nursery/use_tailwind_variables_shorthand.rs:102-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:133` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/biome_html_analyze/src/lint/nursery/no_tailwind_legacy_utilities.rs:133` calls `Some` and `crates/biome_html_analyze/src/lint/nursery/no_tailwind_restricted_classes.rs:241` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 8) · ×1
  • Duplicated block (7 lines × 8) crates/biome_js_analyze/src/lint/complexity/no_this_in_static.rs:180 — crates/biome_js_analyze/src/lint/complexity/no_this_in_static.rs:180-186 | crates/biome_js_analyze/src/lint/complexity/no_useless_ternary.rs:191-197 | crates/biome_js_analyze/src/lint/correctness/no_process_global.rs:143-150 | crates/biome_js_analyze/src/lint/nursery/no_new_array.rs:149-155 | crates/biome_js_analyze/src/lint/nursery/no_single_promise_in_promise_methods.rs:186-192 | crates/biome_js_analyze/src/lint/nursery/use_block_statement_over_iife.rs:196-202 | crates/biome_js_analyze/src/lint/nursery/use_vue_emit_validator.rs:175-181 | crates/biome_js_analyze/src/lint/style/use_single_var_declarator.rs:210-216 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_js_analyze/src/lint/complexity/no_this_in_static.rs:180` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–5 lines × 8) · ×1
  • Duplicated block (3–5 lines × 8) crates/biome_configuration/src/overrides.rs:205 — crates/biome_configuration/src/overrides.rs:205-208 | crates/biome_configuration/src/overrides.rs:226-229 | crates/biome_configuration/src/overrides.rs:244-247 | crates/biome_configuration/src/overrides.rs:260-262 | crates/biome_configuration/src/overrides.rs:277-281 | crates/biome_configuration/src/overrides.rs:290-293 | crates/biome_configuration/src/overrides.rs:311-316 | crates/biome_configuration/src/overrides.rs:327-332 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/biome_configuration/src/overrides.rs:277` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D5 · Coupling · Unstable project @biomejs/biome · ×1
  • Unstable project @biomejs/biome — @biomejs/biome has instability 0.91 with 1 dependents.
D5 · Coupling · Unstable project biome_cli · ×1
  • Unstable project biome_cli — biome_cli has instability 0.98 with 1 dependents.
D5 · Coupling · Unstable project biome_configuration_macros · ×1
  • Unstable project biome_configuration_macros — biome_configuration_macros has instability 0.94 with 1 dependents.
D5 · Coupling · Unstable project biome_css_formatter · ×1
  • Unstable project biome_css_formatter — biome_css_formatter has instability 0.88 with 1 dependents.
D5 · Coupling · Unstable project biome_graphql_formatter · ×1
  • Unstable project biome_graphql_formatter — biome_graphql_formatter has instability 0.86 with 1 dependents.
D5 · Coupling · Unstable project biome_grit_formatter · ×1
  • Unstable project biome_grit_formatter — biome_grit_formatter has instability 0.86 with 1 dependents.
D5 · Coupling · Unstable project biome_grit_patterns · ×1
  • Unstable project biome_grit_patterns — biome_grit_patterns has instability 0.88 with 2 dependents.
D5 · Coupling · Unstable project biome_html_analyze · ×1
  • Unstable project biome_html_analyze — biome_html_analyze has instability 0.82 with 6 dependents.
D5 · Coupling · Unstable project biome_js_analyze · ×1
  • Unstable project biome_js_analyze — biome_js_analyze has instability 0.87 with 6 dependents.
D5 · Coupling · Unstable project biome_js_runtime · ×1
  • Unstable project biome_js_runtime — biome_js_runtime has instability 0.92 with 1 dependents.
D5 · Coupling · Unstable project biome_js_transform · ×1
  • Unstable project biome_js_transform — biome_js_transform has instability 0.88 with 1 dependents.
D5 · Coupling · Unstable project biome_lsp · ×1
  • Unstable project biome_lsp — biome_lsp has instability 0.93 with 1 dependents.
D5 · Coupling · Unstable project biome_markdown_formatter · ×1
  • Unstable project biome_markdown_formatter — biome_markdown_formatter has instability 0.83 with 2 dependents.
D5 · Coupling · Unstable project biome_migrate · ×1
  • Unstable project biome_migrate — biome_migrate has instability 0.90 with 1 dependents.
D5 · Coupling · Unstable project biome_plugin_loader · ×1
  • Unstable project biome_plugin_loader — biome_plugin_loader has instability 0.87 with 3 dependents.
D5 · Coupling · Unstable project biome_react_compiler · ×1
  • Unstable project biome_react_compiler — biome_react_compiler has instability 0.88 with 1 dependents.
D5 · Coupling · Unstable project biome_ruledoc_utils · ×1
  • Unstable project biome_ruledoc_utils — biome_ruledoc_utils has instability 0.98 with 1 dependents.
D5 · Coupling · Unstable project biome_service · ×1
  • Unstable project biome_service — biome_service has instability 0.92 with 5 dependents.
D5 · Coupling · Unstable project biome_tailwind_logic · ×1
  • Unstable project biome_tailwind_logic — biome_tailwind_logic has instability 0.89 with 2 dependents.
D5 · Coupling · Unstable project biome_vue_semantic · ×1
  • Unstable project biome_vue_semantic — biome_vue_semantic has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project biome_yaml_formatter · ×1
  • Unstable project biome_yaml_formatter — biome_yaml_formatter has instability 0.88 with 1 dependents.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — packages/@biomejs/backend-jsonrpc/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
R10 · Code Duplication · Duplicated block with local edits (34 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (34 matched lines × 2 locations) packages/@biomejs/biome/scripts/generate-packages.mjs:6 — packages/@biomejs/biome/scripts/generate-packages.mjs:6 · scripts/update-manifests.mjs:6 — the two spans are one implementation copied and then locally edited — 263 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×1
  • Duplicated block (32 lines × 2 locations) packages/aria-data/generate-aria-data.js:81 — packages/aria-data/generate-aria-data.js:81 · packages/aria-data/generate-aria-data.js:113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) packages/@biomejs/biome/scripts/update-beta-version.mjs:5 — packages/@biomejs/biome/scripts/update-beta-version.mjs:5 · packages/@biomejs/js-api/scripts/update-beta-version.mjs:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (14 matched lines × 2 locations) packages/@biomejs/biome/scripts/update-preview-version.mjs:5 — packages/@biomejs/biome/scripts/update-preview-version.mjs:5 · packages/@biomejs/js-api/scripts/update-preview-version.mjs:5 — the two spans are one implementation copied and then locally edited — 108 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) packages/@biomejs/biome/scripts/generate-packages.mjs:135 — packages/@biomejs/biome/scripts/generate-packages.mjs:135 · scripts/update-manifests.mjs:19 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×1
  • Duplicated block (9 lines × 2 locations) packages/aria-data/generate-aria-data.js:8 — packages/aria-data/generate-aria-data.js:8 · packages/aria-data/generate-aria-data.js:80 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×1
  • Duplicated block (8 lines × 2 locations) packages/aria-data/generate-aria-data.js:182 — packages/aria-data/generate-aria-data.js:182 · packages/aria-data/generate-aria-data.js:304 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×1
  • Duplicated block (6 lines × 2 locations) packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:224 — packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:224 · packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:278 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function App (cyclomatic 22, cognitive 17) · ×1
  • Complex function App (cyclomatic 22, cognitive 17) packages/prettier-compare/src/components/App.tsx:37 — App has cyclomatic complexity 22 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseAriaSpec (cyclomatic 19, cognitive 18) · ×1
  • Complex function parseAriaSpec (cyclomatic 19, cognitive 18) packages/aria-data/generate-aria-data.js:6 — parseAriaSpec has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function main (cyclomatic 17, cognitive 13) · ×1
  • Complex function main (cyclomatic 17, cognitive 13) scripts/update-crates-versions.ts:340 — main has cyclomatic complexity 17 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function traverseDir (cyclomatic 15, cognitive 31) · ×1
  • Complex function traverseDir (cyclomatic 15, cognitive 31) crates/biome_formatter_test/src/prettier/prepare_tests.js:29 — traverseDir has cyclomatic complexity 15 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function extractFunctionalBranches (cyclomatic 14, cognitive 30) · ×1
  • Complex function extractFunctionalBranches (cyclomatic 14, cognitive 30) packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:319 — extractFunctionalBranches has cyclomatic complexity 14 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function run (cyclomatic 14, cognitive 26) · ×1
  • Complex function run (cyclomatic 14, cognitive 26) packages/prettier-compare/src/index.tsx:128 — run has cyclomatic complexity 14 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function DiffView (cyclomatic 14, cognitive 13) · ×1
  • Complex function DiffView (cyclomatic 14, cognitive 13) packages/prettier-compare/src/components/DiffView.tsx:24 — DiffView has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateRepository (cyclomatic 12, cognitive 20) · ×1
  • Complex function validateRepository (cyclomatic 12, cognitive 20) scripts/update-crates-versions.ts:190 — validateRepository has cyclomatic complexity 12 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function addKeywordBranches (cyclomatic 12, cognitive 19) · ×1
  • Complex function addKeywordBranches (cyclomatic 12, cognitive 19) packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:403 — addKeywordBranches has cyclomatic complexity 12 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseConcept (cyclomatic 12, cognitive 17) · ×1
  • Complex function parseConcept (cyclomatic 12, cognitive 17) packages/aria-data/generate-aria-data.js:224 — parseConcept has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function printComparison (cyclomatic 11, cognitive 17) · ×1
  • Complex function printComparison (cyclomatic 11, cognitive 17) packages/prettier-compare/src/plainOutput.ts:34 — printComparison has cyclomatic complexity 11 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (top-level) (cyclomatic 11, cognitive 13) · ×1
  • Complex function (top-level) (cyclomatic 11, cognitive 13) packages/@biomejs/runtime/type-tests/traversal.test.ts:1 — (top-level) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts · ×1
  • packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts: 503 lines of code packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts:1 — packages/tailwindcss-config-analyzer/src/v4/extract-utilities.ts has 503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/@biomejs/js-api/src/common.ts · ×1
  • packages/@biomejs/js-api/src/common.ts: 473 lines of code packages/@biomejs/js-api/src/common.ts:1 — packages/@biomejs/js-api/src/common.ts has 473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · This test file cannot be loaded · ×1
  • This test file cannot be loaded crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/sub2/default_package_nested.js:10 — crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/sub2/default_package_nested.js:10 imports './sub', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
R6 · Tooling · The declared test suite includes a file that cannot be loaded · ×1
  • The declared test suite includes a file that cannot be loaded crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/sub2/default_package_nested.js:10 — This repository declares test tooling, and the ✓ above records that declaration — but crates/biome_js_analyze/tests/specs/correctness/noPrivateImports/sub2/default_package_nested.js cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
R7 · Dead Code · Dead file (~109 LoC) · ×1
  • Dead file (~109 LoC) scripts/update-manifests.mjs — no import path from any entry point (24 application, 13 tooling, 59 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~76 LoC) · ×1
  • Dead file (~76 LoC) packages/tailwindcss-config-analyzer/src/v4/parse-theme-color.ts — no import path from any entry point (24 application, 13 tooling, 59 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~27 LoC) · ×1
  • Dead file (~27 LoC) packages/@biomejs/js-api/scripts/update-preview-version.mjs — no import path from any entry point (24 application, 13 tooling, 59 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Minor — 448 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×291
  • Orphaned file crates/biome_package/src/node_js_package/turbo_json.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_graphql_semantic/src/events.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_parser/src/syntax/assignment.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_parser/src/syntax/typescript/statement.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_parser/src/syntax/object.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_cli/src/execute/migrate/eslint.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/style/no_yoda_expression.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_rule_options/src/organize_imports/import_source.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_formatter/src/js/bindings/parameters.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/correctness/no_nonoctal_decimal_escape.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_diagnostics/src/display/backtrace.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_diagnostics_macros/src/parse.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/style/use_global_this.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_formatter/src/ts/lists/union_type_variant_list.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/services/turborepo.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/complexity/no_playwright_useless_await.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/suspicious/no_duplicate_object_keys.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/suspicious/no_conditional_expect.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_formatter/src/token/number.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/style/use_array_literals.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_diagnostics/src/location.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_js_analyze/src/lint/suspicious/no_leaked_render.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_diagnostics_macros/src/generate.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/biome_parser/src/parsed_syntax.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 266 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate packages/@biomejs/biome/scripts/update-beta-version.mjs:11 — `typeof process.env.GITHUB_SHA !== "string" || process.env.GITHUB_SHA === ""` appears character-identically in 4 files — packages/@biomejs/biome/scripts/update-beta-version.mjs, packages/@biomejs/biome/scripts/update-preview-version.mjs, packages/@biomejs/js-api/scripts/update-beta-version.mjs, packages/@biomejs/js-api/scripts/update-preview-version.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/@biomejs/biome/scripts/update-beta-version.mjs:18 — `typeof version !== "string" || version === ""` appears character-identically in 2 files — packages/@biomejs/biome/scripts/update-beta-version.mjs, packages/@biomejs/js-api/scripts/update-beta-version.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:836 — `!CssSyntaxFeatures::Scss.is_supported(p) && is_legacy_ie_filter_property && is_at_legacy_ie_filter_value(p)` appears character-identically in 2 files — crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs, crates/biome_css_parser/src/syntax/property/mod.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_js_analyze/src/lint/nursery/no_vue_multiple_objects_in_class.rs:62 — `!embedding_kind.is_vue() || !embedding_kind.is_class_attribute()` appears character-identically in 2 files — crates/biome_js_analyze/src/lint/nursery/no_vue_multiple_objects_in_class.rs, crates/biome_js_analyze/src/lint/nursery/use_vue_separate_static_class.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_cli/src/reporter/summary.rs:73 — `!execution.is_ci() && summary.diagnostics_not_printed > 0` appears character-identically in 2 files — crates/biome_cli/src/reporter/summary.rs, crates/biome_cli/src/reporter/terminal.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_lsp/src/handlers/analysis.rs:102 — `!file_features.supports_lint() && !file_features.supports_assist()` appears character-identically in 2 files — crates/biome_lsp/src/handlers/analysis.rs, crates/biome_lsp/src/session.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_html_analyze/src/lint/a11y/use_alt_text.rs:137 — `!has_alt && !has_aria_label && !has_aria_labelledby && !aria_hidden` appears character-identically in 2 files — crates/biome_html_analyze/src/lint/a11y/use_alt_text.rs, crates/biome_js_analyze/src/lint/a11y/use_alt_text.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_interactions.rs:97 — `!has_event_handler(EVENT_HANDLER_TYPES, element) || is_content_editable(element) || aria_roles.is_presentation_role(element) || is_hidden_fr…` appears character-identically in 2 files — crates/biome_html_analyze/src/lint/a11y/no_noninteractive_element_interactions.rs, crates/biome_js_analyze/src/lint/a11y/no_noninteractive_element_interactions.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_html_analyze/src/lint/a11y/use_alt_text.rs:127 — `!has_title && !has_aria_label && !has_aria_labelledby && !aria_hidden` appears character-identically in 2 files — crates/biome_html_analyze/src/lint/a11y/use_alt_text.rs, crates/biome_js_analyze/src/lint/a11y/use_alt_text.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_html_analyze/src/lint/a11y/use_valid_lang.rs:110 — `!is_valid_script(script_or_country) && !is_valid_country(script_or_country)` appears character-identically in 2 files — crates/biome_html_analyze/src/lint/a11y/use_valid_lang.rs, crates/biome_js_analyze/src/lint/a11y/use_valid_lang.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_css_parser/src/syntax/scss/expression/precedence.rs:228 — `!p.has_preceding_whitespace() && !p.has_preceding_line_break()` appears character-identically in 2 files — crates/biome_css_parser/src/syntax/scss/expression/precedence.rs, crates/biome_css_parser/src/syntax/scss/value/any.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs:293 — `!reference.is_global_this() && !reference.has_name("window")` appears character-identically in 4 files — crates/biome_js_analyze/src/lint/complexity/use_regex_literals.rs, crates/biome_js_analyze/src/lint/nursery/use_global_regex_in_replace_all.rs, crates/biome_js_analyze/src/lint/style/use_named_capture_group.rs, crates/biome_js_analyze/src/lint/style/use_unicode_regex.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_cli/src/execute/migrate/eslint_to_biome.rs:142 — `!self.migrated.is_empty() && self.migrated.len() != self.rule_count()` appears character-identically in 2 files — crates/biome_cli/src/execute/migrate/eslint_to_biome.rs, crates/biome_cli/src/execute/migrate/stylelint_to_biome.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs:279 — `!source_type.is_typescript() || source_type.is_definition_file()` appears character-identically in 3 files — crates/biome_js_analyze/src/lint/nursery/use_explicit_return_type.rs, crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs, crates/biome_js_analyze/src/lint/suspicious/no_evolving_types.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_js_analyze/src/lint/style/use_export_type.rs:144 — `!source_type.language().is_typescript() || source_type.language().is_definition_file()` appears character-identically in 2 files — crates/biome_js_analyze/src/lint/style/use_export_type.rs, crates/biome_js_analyze/src/lint/style/use_import_type.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_syntax_codegen/src/generate_nodes.rs:1141 — `(!field.is_unordered() || last_was_ordered) && !current_group.is_empty()` appears character-identically in 2 files — crates/biome_syntax_codegen/src/generate_nodes.rs, xtask/codegen/src/generate_nodes.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_js_analyze/src/lint/nursery/no_single_promise_in_promise_methods.rs:374 — `(!keeps_leading && token.has_leading_comments()) || (!keeps_trailing && token.has_trailing_comments())` appears character-identically in 3 files — crates/biome_js_analyze/src/lint/nursery/no_single_promise_in_promise_methods.rs, crates/biome_js_analyze/src/lint/nursery/no_subtraction_comparison.rs, crates/biome_js_analyze/src/lint/nursery/no_svelte_useless_derived_by.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_html_formatter/src/utils/children.rs:843 — `(is_cjk_segment_break_character(before) && is_cjk_segment_break_character(after)) || is_cjk_punctuation(before) || is_cjk_punctuation(after)` appears character-identically in 2 files — crates/biome_html_formatter/src/utils/children.rs, crates/biome_markdown_formatter/src/words.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_parser/src/parse_lists.rs:157 — `(self.allow_empty() || !first) && (p.at(<Self::Parser<'_> as Parser>::Kind::EOF) || self.is_at_list_end(p))` appears character-identically in 2 files — crates/biome_parser/src/parse_lists.rs, crates/biome_tailwind_parser/src/syntax/variant.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_module_graph/src/css_module_info/visitor.rs:78 — `AnyCssPseudoClassFunctionSelector::cast(node) && pseudo_fn.is_global_pseudo()` appears character-identically in 2 files — crates/biome_module_graph/src/css_module_info/visitor.rs, crates/biome_module_graph/src/html_module_info/visitor.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_css_parser/src/syntax/block/declaration_or_rule_list_block.rs:208 — `CssSyntaxFeatures::Scss.is_supported(p) && is_at_scss_nesting_declaration(p)` appears character-identically in 2 files — crates/biome_css_parser/src/syntax/block/declaration_or_rule_list_block.rs, crates/biome_css_parser/src/syntax/declaration.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs:827 — `CssSyntaxFeatures::Scss.is_supported(p) && is_custom_property` appears character-identically in 2 files — crates/biome_css_parser/src/syntax/at_rule/supports/mod.rs, crates/biome_css_parser/src/syntax/property/mod.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_js_parser/src/state.rs:41 — `Self::can_merge(self, other) || Self::can_merge(other, self)` appears character-identically in 2 files — crates/biome_js_parser/src/state.rs, crates/biome_js_syntax/src/binding_ext.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs:90 — `autocompletes.len() == 1 && autocompletes[0] == "none"` appears character-identically in 2 files — crates/biome_html_analyze/src/lint/a11y/use_valid_autocomplete.rs, crates/biome_js_analyze/src/lint/a11y/use_valid_autocomplete.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/biome_markdown_analyze/src/lint/suspicious/no_empty_source.rs:87 — `block.is_newline() || block.is_continuation_indent()` appears character-identically in 2 files — crates/biome_markdown_analyze/src/lint/suspicious/no_empty_source.rs, crates/biome_markdown_formatter/src/bullet_list.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging crates/biome_service/src/workspace.rs:245 — `debug!` at line 245 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:163 — `info!` at line 163 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:218 — `error!` at line 218 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:223 — `warn!` at line 223 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:309 — `warn!` at line 309 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:448 — `warn!` at line 448 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:467 — `warn!` at line 467 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:473 — `warn!` at line 473 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:485 — `warn!` at line 485 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/scanner/watcher.rs:495 — `warn!` at line 495 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/javascript.rs:1535 — `debug!` at line 1535 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/javascript.rs:1745 — `debug!` at line 1745 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/javascript.rs:1751 — `error!` at line 1751 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/javascript.rs:1770 — `debug!` at line 1770 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/javascript.rs:1789 — `debug!` at line 1789 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/md.rs:536 — `debug!` at line 536 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/md.rs:542 — `error!` at line 542 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/svelte.rs:162 — `debug!` at line 162 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/svelte.rs:203 — `error!` at line 203 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/vue.rs:158 — `debug!` at line 158 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/vue.rs:194 — `error!` at line 194 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/yaml.rs:446 — `debug!` at line 446 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/file_handlers/yaml.rs:452 — `error!` at line 452 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/db/mod.rs:1224 — `debug!` at line 1224 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/biome_service/src/db/mod.rs:1286 — `debug!` at line 1286 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on Err · ×28
  • Silent fallback default on Err crates/biome_css_analyze/src/lint/nursery/no_scss_null_comparison.rs:73 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_css_analyze/src/lint/nursery/use_logical_properties.rs:220 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_formatter_test/src/test_prettier_snapshot.rs:114 — `load_ignored_tests` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_graphql_semantic/src/semantic_model/binding.rs:90 — `all_reference_nodes` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_graphql_semantic/src/semantic_model/binding.rs:103 — `all_reference_nodes` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_html_analyze/src/lint/nursery/no_vue_textarea_mustache.rs:85 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_html_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:173 — `get_accessible_child_text` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/correctness/no_invalid_use_before_declaration.rs:119 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/correctness/no_vue_import_compiler_macros.rs:83 — `run` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/nursery/no_console_spaces.rs:75 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/suspicious/no_comment_text.rs:93 — `run` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/suspicious/no_control_characters_in_regex.rs:72 — `run` turns every `Err` into `Default::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/a11y/no_ambiguous_anchor_text.rs:184 — `get_accessible_child_text` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/correctness/use_exhaustive_dependencies.rs:1694 — `get_relevant_capture_nodes` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/correctness/use_react_native_platform_components.rs:273 — `collect_require_destructured_names` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/style/no_magic_numbers.rs:396 — `get_sanitized_parent_node` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_analyze/src/lint/style/use_named_capture_group.rs:223 — `run_regex_literal` turns every `Err` into `Default::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_js_type_info/src/format_inferred_type_info.rs:68 — `format_inferred_type` turns every `Err` into `"unknown".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_json_analyze/src/lint/nursery/use_package_json_valid_cpu.rs:113 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_json_analyze/src/lint/nursery/use_package_json_valid_license.rs:103 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_markdown_parser/src/to_html.rs:739 — `enter` turns every `Err` into `1` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_markdown_parser/src/to_html.rs:1301 — `render_table_with_limit` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_migrate/src/analyzers/includes.rs:27 — `run` turns every `Err` into `Vec::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_migrate/src/analyzers/organize_imports.rs:25 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/biome_migrate/src/analyzers/rule_mover.rs:83 — `run` turns every `Err` into `Box::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • + 3 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×20
  • redundant comment crates/biome_js_analyze/tests/specs/correctness/useQwikClasslist/invalid.jsx:26 — "Invalid: classnames in nested call" repeats the code it sits on: 4 of its 4 words (invalid, classnames, nested, call) are already in `export const NestedClassnamesInvalid = () => (`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/nursery/noInvalidFetchOptions/valid.js:52 — "A body that is set to `undefined` through a variable is no body." repeats the code it sits on: 4 of its 5 words (body, set, undefined, no) are already in `const noBody = undefined;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/nursery/useValidTestTitle/valid.js:36 — "Valid suite calls" repeats the code it sits on: 3 of its 3 words (valid, suite, calls) are already in `suite('valid suite title', () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/style/useConsistentTestIt/invalidCommentTrivia.js:11 — "Block comment before call" repeats the code it sits on: 3 of its 3 words (block, comment, call) are already in `test.skip("block comment before skip", () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/style/useTemplate/invalid.js:96 — "`${foo && bar}baz`" repeats the code it sits on: 3 of its 3 words (foo, bar, baz) are already in `(foo && bar) + "baz";`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/style/useTemplate/invalid.js:98 — "`foo${bar && baz}`" repeats the code it sits on: 3 of its 3 words (foo, bar, baz) are already in `"foo" + (bar && baz);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/style/useTemplate/invalid.js:100 — "`${1 + foo && bar}baz`" repeats the code it sits on: 3 of its 3 words (foo, bar, baz) are already in `(1 + foo && bar) + "baz";`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/style/useTemplate/invalid.js:102 — "`foo${bar && baz + 1}`" repeats the code it sits on: 3 of its 3 words (foo, bar, baz) are already in `"foo" + (bar && baz + 1);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/style/useUnicodeRegex/invalid.js:33 — "globalThis.RegExp" repeats the code it sits on: 3 of its 3 words (global, reg, exp) are already in `globalThis.RegExp("foo", "gi");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/suspicious/noUndeclaredEnvVars/validDynamicAccess.js:25 — "Also with Deno.env.get - dynamic access" repeats the code it sits on: 4 of its 5 words (deno, env, get, dynamic) are already in `const dynamicDeno = Deno.env.get(key);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/suspicious/noUndeclaredEnvVars/validNoTurboJson.js:12 — "Also with import.meta.env" repeats the code it sits on: 3 of its 3 words (import, meta, env) are already in `const importMetaVar = import.meta.env.CUSTOM_META_VAR;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/suspicious/noUndeclaredEnvVars/validWithLegacyPipeline.js:7 — "Global env vars" repeats the code it sits on: 3 of its 3 words (global, env, vars) are already in `const globalVar = process.env.GLOBAL_VAR;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_analyze/tests/specs/suspicious/useExpect/valid/vitest-expect-variants.ts:24 — ""foo" extends string => T<string> extends T<"foo">" repeats the code it sits on: 3 of its 3 words (foo, extends, string) are already in `expectTypeOf("foo").toExtend<string>();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_formatter/tests/specs/jsx/element.jsx:1 — "Single string attribute" repeats the code it sits on: 3 of its 3 words (single, string, attribute) are already in `<div tooltip="A very long tooltip text that would otherwise make the attribute break onto the same line but it is not be …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_formatter/tests/specs/prettier/js/conditional/new-ternary-spec.js:30 — "when a consequent breaks in a chain:" repeats the code it sits on: 3 of its 3 words (consequent, breaks, chain) are already in `const chainedWithLongConsequent =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_formatter/tests/specs/prettier/js/conditional/new-ternary-spec.js:47 — "consequent and terminal alternate break:" repeats the code it sits on: 4 of its 4 words (consequent, terminal, alternate, break) are already in `const consequentAndTerminalAlternateBreak =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_formatter/tests/specs/prettier/js/conditional/new-ternary-spec.js:58 — "multiline conditions and consequents/alternates:" repeats the code it sits on: 4 of its 4 words (multiline, conditions, consequents, alternates) are already in `const multilineConditionsConsequentsAndAlternates =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment crates/biome_js_formatter/tests/specs/prettier/js/functional-composition/ramda_compose.js:11 — "getStateCode :: Maybe String -> Maybe String" repeats the code it sits on: 4 of its 5 words (get, state, code, maybe) are already in `var getStateCode = R.composeK(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/@biomejs/js-api/tests/spanConversion.test.ts:119 — "Convert the byte span to code unit span" repeats the code it sits on: 4 of its 5 words (byte, span, code, unit) are already in `const [startCodeUnits, endCodeUnits] = spanInBytesToSpanInCodeUnits(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/prettier-compare/src/index.tsx:153 — "No input provided" repeats the code it sits on: 3 of its 3 words (no, input, provided) are already in `console.error(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
X7 · Silent fallback defaults · Silent fallback default in catch · ×4
  • Silent fallback default in catch crates/biome_js_analyze/tests/specs/nursery/noReturnInFinally/invalid_nested_blocks.js:57 — `p.finally()` swallows every exception into `return 1` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch crates/biome_js_analyze/tests/specs/style/noUselessElse/missed.js:47 — `f` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/valid.js:62 — `f` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch crates/biome_js_analyze/tests/specs/suspicious/useGetterReturn/valid.js:62 — `bar` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 52 significant file(s) lose their only recent owner: crates/biome_service/src/db/state.rs, crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs, crates/biome_module_graph/src/db/type_inference/imports.rs, crates/biome_module_graph/src/type_inference/profiling.rs, crates/biome_css_syntax/src/property_syntax/parser.rs, crates/biome_manifest/src/lib.rs, crates/biome_markdown_formatter/src/markdown/auxiliary/link_title.rs, crates/biome_cli/src/commands/inspect.rs (+44 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 49 significant file(s) lose their only recent owner: crates/biome_css_parser/src/syntax/at_rule/feature.rs, crates/biome_css_parser/src/syntax/scss/expression/list.rs, crates/biome_css_parser/src/syntax/scss/declaration/nesting.rs, crates/biome_css_formatter/src/scss/auxiliary/each_header.rs, crates/biome_css_parser/src/syntax/scss/value/interpolated_value.rs, crates/biome_css_parser/src/syntax/scss/at_rule/module_clauses.rs, crates/biome_css_syntax/src/scss_ext/map.rs, crates/biome_css_formatter/src/utils/scss_interpolated_string/raw_interpolation.rs (+41 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 33 significant file(s) lose their only recent owner: xtask/codegen/src/generate_global_types/lower/generic.rs, crates/biome_analyze/src/unsupported_rules.rs, crates/biome_tailwind_logic/src/syntax_service.rs, crates/biome_analyze/src/profiling.rs, crates/biome_tailwind_logic/src/use_tailwind_sorted_classes/design_system.rs, crates/biome_tailwind_logic/src/no_tailwind_raw_colors.rs, crates/biome_js_analyze/src/lint/nursery/no_double_comparison.rs, crates/biome_yaml_formatter/src/yaml/auxiliary/block_content.rs (+25 more). Pair on, review, or document these before any departure.
D21 · Naming Consistency · `intervalID` spells `ID` where 102 names in the project spell it `Id` · ×2
  • `intervalID` spells `ID` where 102 names in the project spell it `Id` crates/biome_js_formatter/tests/specs/prettier/typescript/as/assignment.ts:28 — 102 of 104 names in project @biomejs/monorepo spell the token `Id` (102 of 104; unit: names in project @biomejs/monorepo containing `Id`). Peers: CanvasStore.getElementById (crates/biome_js_analyze/tests/specs/style/useDomQuerySelector/validIgnore.ts:3); ToastService._toastId (crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/valid.ts:662); indexValid.usageRange(userId) (crates/biome_js_analyze/tests/specs/suspicious/noUnnecessaryConditions/validOptionalChain/indexValid.ts:5); arrow-return-type.getVehicleDescriptor(vehicleId) (crates/biome_js_formatter/tests/specs/prettier/typescript/generic/arrow-return-type.ts:1); arrow-return-type.getVehicleDescriptor(vehicleId) (crates/biome_js_formatter/tests/specs/prettier/typescript/generic/arrow-return-type.ts:5). Rename to `intervalId`. [rule N6]
  • `intervalID` spells `ID` where 102 names in the project spell it `Id` crates/biome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts:19 — 102 of 104 names in project @biomejs/monorepo spell the token `Id` (102 of 104; unit: names in project @biomejs/monorepo containing `Id`). Peers: CanvasStore.getElementById (crates/biome_js_analyze/tests/specs/style/useDomQuerySelector/validIgnore.ts:3); ToastService._toastId (crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/valid.ts:662); indexValid.usageRange(userId) (crates/biome_js_analyze/tests/specs/suspicious/noUnnecessaryConditions/validOptionalChain/indexValid.ts:5); arrow-return-type.getVehicleDescriptor(vehicleId) (crates/biome_js_formatter/tests/specs/prettier/typescript/generic/arrow-return-type.ts:1); arrow-return-type.getVehicleDescriptor(vehicleId) (crates/biome_js_formatter/tests/specs/prettier/typescript/generic/arrow-return-type.ts:5). Rename to `intervalId`. [rule N6]
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 6 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (140 single-owned of 2103 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 2103 of the 4474 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/biome_js_analyze/src/lint/suspicious/no_identical_test_title.rs, scripts/version-check.ts, crates/biome_js_analyze/src/lint/nursery/no_misleading_return_type.rs, crates/biome_js_formatter/src/js/expressions/sequence_expression.rs, xtask/codegen/src/yaml_kinds_src.rs, crates/biome_css_formatter/src/css/lists/declaration_or_rule_list.rs.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found packages/prettier-compare/package.json:7 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `packages/prettier-compare/package.json` makes this repository a deployable product (line 7).
D21 · Naming Consistency · `ImgHTMLAttributes` spells `HTML` where 31 names in the project spell it `Html` · ×1
  • `ImgHTMLAttributes` spells `HTML` where 31 names in the project spell it `Html` crates/biome_js_analyze/tests/specs/correctness/noUnusedImports/issue_4888.ts:10 — 31 of 32 names in project @biomejs/monorepo spell the token `Html` (31 of 32; unit: names in project @biomejs/monorepo containing `Html`). Peers: crates.biome_js_formatter.tests.specs.prettier.typescript.last-argument-expansion.break.AddAssetHtmlPlugin (crates/biome_js_formatter/tests/specs/prettier/typescript/last-argument-expansion/break.ts:1); A11y.useHtmlLang (packages/@biomejs/backend-jsonrpc/src/workspace.ts:2010); Correctness.useVueValidVHtml (packages/@biomejs/backend-jsonrpc/src/workspace.ts:2914); Nursery.noAstroSetHtmlDirective (packages/@biomejs/backend-jsonrpc/src/workspace.ts:2984); Nursery.noSvelteAtHtmlTags (packages/@biomejs/backend-jsonrpc/src/workspace.ts:3389). Rename to `ImgHtmlAttributes`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 15 of 115 project(s) overshoot their size bounds, lowering Project Cohesion to 7.4/10. The most over is `crates/biome_js_analyze` (189765 LoC, 1510 module-visible types across 24 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low vulnerability · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 291 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: crates/biome_package/src/node_js_package/turbo_json.rs, crates/biome_graphql_semantic/src/events.rs, crates/biome_js_parser/src/syntax/assignment.rs, crates/biome_js_parser/src/syntax/typescript/statement.rs, crates/biome_js_parser/src/syntax/object.rs, crates/biome_cli/src/execute/migrate/eslint.rs, crates/biome_js_analyze/src/lint/style/no_yoda_expression.rs, crates/biome_rule_options/src/organize_imports/import_source.rs (and 283 more) (301 orphaned of 2103 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 2103 of the 4474 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P10 · Library API & versioning · Implementation type on the public API · ×1
  • Implementation type on the public API crates/biome_deserialize/src/impls.rs:45 — 1 public type in `biome_deserialize.impls` is marked as implementation by its own namespace, folder or name: `TextNumber` (crates/biome_deserialize/src/impls.rs:45, `impls`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 7/12 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/biome_wasm`, `packages/@biomejs/biome`, `packages/prettier-compare`, `xtask/codegen`, `xtask/rules_check`.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation package.json:22 — `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
R7 · Dead Code · Unused export 'parseDeclarations' · ×1
  • Unused export 'parseDeclarations' packages/tailwindcss-config-analyzer/src/v4/css-helpers.ts:21 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'variantOf' · ×1
  • Unused export 'variantOf' packages/tailwindcss-config-analyzer/src/v4/theme-namespaces.ts:45 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'prefixOf' · ×1
  • Unused export 'prefixOf' packages/tailwindcss-config-analyzer/src/v4/theme-namespaces.ts:49 — Nothing imports this binding — it is safe to review for removal.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 6/17 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X9 · Subsumed condition operand · Subsumed condition operand · ×1
  • Subsumed condition operand crates/biome_fs/src/fs/memory.rs:313 — `base.starts_with("./")` can never decide this `||` — every value satisfying `base.starts_with("./")` also satisfies `base.starts_with(".")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Minor — 23 finding(s)
D12 · Dependency Hygiene · Outdated · ×19
  • Outdated: backtrace — `backtrace` is locked at 0.3.76 but 0.3.77 is the current stable release on crates.io, and it already satisfies the `"0.3.76"` requirement declared in crates/biome_diagnostics/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p backtrace` and commit the updated REDACTED.
  • Outdated: bitvec — `bitvec` is locked at 1.0.1 but 1.1.1 is the current stable release on crates.io, and it already satisfies the `"1.0.1"` requirement declared in crates/biome_analyze/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bitvec` and commit the updated REDACTED.
  • Outdated: bpaf — `bpaf` is locked at 0.9.28 but 0.9.29 is the current stable release on crates.io, and it already satisfies the `"0.9.28"` requirement declared in crates/biome_cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bpaf` and commit the updated REDACTED.
  • Outdated: either — `either` is locked at 1.15.0 but 1.19.0 is the current stable release on crates.io, and it already satisfies the `"1.15.0"` requirement declared in crates/biome_analyze/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p either` and commit the updated REDACTED.
  • Outdated: futures — `futures` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3.32"` requirement declared in crates/biome_lsp/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures` and commit the updated REDACTED.
  • Outdated: htmlize — `htmlize` is locked at 1.0.6 but 1.1.0 is the current stable release on crates.io, and it already satisfies the `"1.0.6"` requirement declared in crates/biome_markdown_parser/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p htmlize` and commit the updated REDACTED.
  • Outdated: ignore — `ignore` is locked at 0.4.25 but 0.4.34 is the current stable release on crates.io, and it already satisfies the `"0.4.25"` requirement declared in crates/biome_service/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ignore` and commit the updated REDACTED.
  • Outdated: indicatif — `indicatif` is locked at 0.18.4 but 0.18.6 is the current stable release on crates.io, and it already satisfies the `"0.18.4"` requirement declared in xtask/coverage/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p indicatif` and commit the updated REDACTED.
  • Outdated: insta — `insta` is locked at 1.48.0 but 1.49.0 is the current stable release on crates.io, and it already satisfies the `"1.48.0"` requirement declared in crates/biome_formatter_test/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p insta` and commit the updated REDACTED.
  • Outdated: jiff — `jiff` is locked at 0.2.41 but 0.2.43 is the current stable release on crates.io, and it already satisfies the `"0.2.41"` requirement declared in crates/biome_graphql_analyze/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p jiff` and commit the updated REDACTED.
  • Outdated: js-sys — `js-sys` is locked at 0.3.94 but 0.3.107 is the current stable release on crates.io, and it already satisfies the `"0.3.94"` requirement declared in crates/biome_wasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p js-sys` and commit the updated REDACTED.
  • Outdated: owo-colors — `owo-colors` is locked at 4.3.0 but 4.4.0 is the current stable release on crates.io, and it already satisfies the `"4.3.0"` requirement declared in crates/biome_test_utils/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p owo-colors` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.53.3 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1.53.3"` requirement declared in crates/biome_cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: tracing-appender — `tracing-appender` is locked at 0.2.4 but 0.2.5 is the current stable release on crates.io, and it already satisfies the `"0.2.4"` requirement declared in crates/biome_cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tracing-appender` and commit the updated REDACTED.
  • Outdated: unicode-normalization — `unicode-normalization` is locked at 0.1.25 but 0.1.26 is the current stable release on crates.io, and it already satisfies the `"0.1.25"` requirement declared in crates/biome_json_analyze/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p unicode-normalization` and commit the updated REDACTED.
  • Outdated: unicode-segmentation — `unicode-segmentation` is locked at 1.13.2 but 1.13.3 is the current stable release on crates.io, and it already satisfies the `"1.13.2"` requirement declared in crates/biome_console/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p unicode-segmentation` and commit the updated REDACTED.
  • Outdated: unicode-width — `unicode-width` is locked at 0.2.2 but 0.2.3 is the current stable release on crates.io, and it already satisfies the `"0.2.2"` requirement declared in crates/biome_console/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p unicode-width` and commit the updated REDACTED.
  • Outdated: ureq — `ureq` is locked at 3.4.2 but 3.5.2 is the current stable release on crates.io, and it already satisfies the `"3.4.2"` requirement declared in crates/biome_cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.26.1 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1.26.1"` requirement declared in crates/biome_lsp/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
D24 · Comment Value · doc comments repeat the names · ×4
  • doc comments repeat the names packages/@biomejs/biome/scripts/generate-packages.mjs:109 — 0 of 1 documented parameters and 0 of 2 summaries in `@biomejs/biome` only repeat the member or parameter name (e.g. "" for `target`). 1 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names packages/@biomejs/js-api/src/common.ts:337 — 0 of 22 documented parameters and 2 of 45 summaries in `@biomejs/js-api` only repeat the member or parameter name (e.g. "It formats some content." for `formatContent`). 2 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names crates/biome_js_analyze/tests/specs/style/useObjectSpread/invalid.js:39 — 0 of 5 documented parameters and 1 of 52 summaries in `@biomejs/monorepo` only repeat the member or parameter name (e.g. "foo" for `foo`). 1 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names packages/prettier-compare/src/components/DiagnosticsView.tsx:10 — 0 of 8 documented parameters and 1 of 48 summaries in `@biomejs/prettier-compare` only repeat the member or parameter name (e.g. "Diagnostics from Biome" for `biomeDiagnostics`). Delete the restating tags, or add what the name does not say.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-947fb3a7fb854a45a72b9d80e998d176/history.json --exit-code 0 --source .12artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-947fb3a7fb854a45a72b9d80e998d176/tree.json --exit-code 0 --source .4artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude crates/biome_aria_metadata/aria-data --exclude crates/biome_configuration/src/generated --exclude crates/biome_css_factory/src/generated --exclude crates/biome_css_formatter/src/css/any --exclude crates/biome_css_formatter/src/scss/any --exclude crates/biome_css_formatter/src/tailwind/any --exclude crates/biome_css_syntax/src/generated --exclude crates/biome_graphql_factory/src/generated --exclude crates/biome_graphql_formatter/src/graphql/any --exclude crates/biome_graphql_syntax/src/generated --exclude crates/biome_grit_factory/src/generated --exclude crates/biome_grit_formatter/src/grit/any --exclude crates/biome_grit_patterns/src/grit_target_language/css_target_language --exclude crates/biome_grit_patterns/src/grit_target_language/js_target_language --exclude crates/biome_grit_patterns/src/grit_target_language/json_target_language --exclude crates/biome_grit_syntax/src/generated --exclude crates/biome_html_factory/src/generated --exclude crates/biome_html_formatter/src/angular/any --exclude crates/biome_html_formatter/src/astro/any --exclude crates/biome_html_formatter/src/html/any --exclude crates/biome_html_formatter/src/svelte/any --exclude crates/biome_html_formatter/src/vue/any --exclude crates/biome_html_parser/benches/fixtures --exclude crates/biome_html_syntax/src/generated --exclude crates/biome_js_analyze/tests/specs/correctness/useImportExtensions/sub/generated --exclude crates/biome_js_factory/src/generated --exclude crates/biome_js_formatter/src/js/any --exclude crates/biome_js_formatter/src/jsx/any --exclude crates/biome_js_formatter/src/ts/any --exclude crates/biome_js_runtime/src/generated --exclude crates/biome_js_syntax/src/generated --exclude crates/biome_js_type_info/src/generated --exclude crates/biome_json_factory/src/generated --exclude crates/biome_json_formatter/src/json/any --exclude crates/biome_json_syntax/src/generated --exclude crates/biome_markdown_factory/src/generated --exclude crates/biome_markdown_formatter/src/markdown/any --exclude crates/biome_markdown_syntax/src/generated --exclude crates/biome_module_replacements/src/generated --exclude crates/biome_tailwind_factory/src/generated --exclude crates/biome_tailwind_syntax/src/generated --exclude crates/biome_yaml_factory/src/generated --exclude crates/biome_yaml_formatter/src/yaml/any --exclude crates/biome_yaml_syntax/src/generated .12artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .17artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet . --skip-check-update0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 6 file(s) — `crates/biome_module_graph/benches/astro_server.mjs`, `packages/@biomejs/js-api/src/bundler.ts`, `packages/@biomejs/js-api/src/index.ts`, `packages/@biomejs/js-api/src/nodejs.ts`, `packages/@biomejs/js-api/src/web.ts`, … (+1 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1d91f-8f71-7c3e-bf4a-c0f557653c1f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md