Public report of web-infra-dev/rspack, published 27 October 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 reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). 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, 27 October 2026, 02:46 UTC · Survey ID cd_cb528f6a32b54bfdbdd6652622faabe3
web-infra-dev/rspack
Measured 27 October 2026, 02:21 UTC, at code version 67f1674
Regression: 3 dimensions fell since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAt riskDown 1 since the last survey
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 large codebase: 335,776 lines of product code in 127 projects, tests not counted · Estimated rebuild effort: about 2.7 person-years · Weakest lens: Code Health, 44
Findings by how serious they are
109 critical1969 serious235 minor
12 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 02:21 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 Watchdog. It is open to any tool that
implements it, and today Watchdog 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. Watchdog works 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 ▸
83of 83 dimensions measured by tools.
2238of 2313 findings point to an exact file and line, so you can open each one in the code. The other 75 concern the repository as a whole, such as missing documentation.
83dimensions across 7 lenses, read from 335,776 lines of product code in 127 projects.
web-infra-dev/rspack is rated At risk because critical security findings are open. It scores 52 out of 100, which the At risk rating leaves unchanged.
Code Health, at 44, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the password or key in the code, worth about 3 points. Turning on missing-value checks would lift Code Health itself, worth about 4 points. Raising Code Health to 70 would lift the score to about 58.
Thirty-nine passwords or keys in the code's history and one in the code are open to anyone who can read the repository. Twenty-seven pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline. Replacing each exposed password or key and passing outside input through environment variables would close both risks. Updating the vulnerable packages would fix the nine packages with a known security hole, and the four pipeline steps that run downloads without checking them need each download checked against a known checksum first. The 16 uses of packages that aren't listed need adding to the project's list of dependencies.
The product code is 335,776 lines, about €390,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 forThe 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.
If Code Health rose from 44 to 70, the lowest score rated Strong, the score would rise from 52 to about 58.
Code composition: what the lines of code are
Product code 81%Tests 19%
New since the last survey: 241 findings
These 241 critical or serious findings weren't in the previous survey, on 13 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 247 findings
These 247 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one. The first 100 are listed here.
Coupling · Off the main sequence: rspack_swc_plugin_import
Coupling · Off the main sequence: rspack_dojang
Rebuild cost: about €390,000 · Estimate
Cost to rebuild
€130,000 to €660,000, for 2,176 to 6,904 hours of work, about 2.7 person-years for 1 to 6 engineers
Difficulty of the problem
Standard, 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.7 at a score of 52. 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.
Size
Large: 335,776 lines of product code
What it is not
Not 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: Watchdog prices 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
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Raises the score by about 3 points · Low effort · Secret Scanning
2
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 `?`).
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 €390,000 to build again, about 2.7 person-years of work. Its weakest lens is Code Health, at 44 (Weak). 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
Resolve the 1 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 Secret Scanning findings. 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 7.0 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 525,939 lines over the last 90 days, which is about 2,132,975 lines a year. At that pace, the extra work comes to an estimated 128.6 to 771.4 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 Watchdog's 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.
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.
1348 modules, with 5430 dependencies between them. 24 loops run through 290 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 1308 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.
rspack_core uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core, while a change to rspack_core can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→31 rspack_core.compiler uses rspack_core.compilationpart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.compiler uses a type in rspack_core.compilation.
rspack_core.compiler uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.compiler, while a change to rspack_core.compiler can't break rspack_core.compilation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→39 rspack_core.dependency.dependency_category uses rspack_error.displayerpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.dependency_category uses a type in rspack_error.displayer.
rspack_core.dependency.dependency_category uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core.dependency.dependency_category, while a change to rspack_core.dependency.dependency_category can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→39 rspack_core.dependency.dependency_type uses rspack_error.displayerpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.dependency_type uses a type in rspack_error.displayer.
rspack_core.dependency.dependency_type uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core.dependency.dependency_type, while a change to rspack_core.dependency.dependency_type can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→30 rspack_core.dependency.module_dependency uses rspack_core.dependencypart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.module_dependency uses a type in rspack_core.dependency.
rspack_core.dependency.module_dependency uses rspack_core.dependency, so a change to rspack_core.dependency can break rspack_core.dependency.module_dependency, while a change to rspack_core.dependency.module_dependency can't break rspack_core.dependency.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→40 rspack_core.dependency.module_dependency uses css_module_lexer.dependency_typespart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.module_dependency uses a type in css_module_lexer.dependency_types.
rspack_core.dependency.module_dependency uses css_module_lexer.dependency_types, so a change to css_module_lexer.dependency_types can break rspack_core.dependency.module_dependency, while a change to rspack_core.dependency.module_dependency can't break css_module_lexer.dependency_types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→34 rspack_core.runtime uses rspack_hashpart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.runtime uses a type in rspack_hash.
rspack_core.runtime uses rspack_hash, so a change to rspack_hash can break rspack_core.runtime, while a change to rspack_core.runtime can't break rspack_hash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→39 rspack_core.runtime uses rspack_error.displayerpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.runtime uses a type in rspack_error.displayer.
rspack_core.runtime uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core.runtime, while a change to rspack_core.runtime can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→34 rspack_core.runtime_globals uses rspack_hashpart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.runtime_globals uses a type in rspack_hash.
rspack_core.runtime_globals uses rspack_hash, so a change to rspack_hash can break rspack_core.runtime_globals, while a change to rspack_core.runtime_globals can't break rspack_hash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→34 rspack_intern.atom uses rspack_hashpart of a loop✕
Connections
2 pairs of types, where a type in rspack_intern.atom uses a type in rspack_hash.
rspack_intern.atom uses rspack_hash, so a change to rspack_hash can break rspack_intern.atom, while a change to rspack_intern.atom can't break rspack_hash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→39 rspack_intern.atom uses rspack_error.displayerpart of a loop✕
Connections
1 pair of types, where a type in rspack_intern.atom uses a type in rspack_error.displayer.
rspack_intern.atom uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_intern.atom, while a change to rspack_intern.atom can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_javascript_compiler.ast uses rspack_core.cache.codec, so a change to rspack_core.cache.codec can break rspack_javascript_compiler.ast, while a change to rspack_javascript_compiler.ast can't break rspack_core.cache.codec.
Position
Below the diagonal: rspack_javascript_compiler.ast uses a module listed above it, which is the healthy direction.
rspack_binding_api.module uses rspack_core.compiler, so a change to rspack_core.compiler can break rspack_binding_api.module, while a change to rspack_binding_api.module can't break rspack_core.compiler.
Position
Below the diagonal: rspack_binding_api.module uses a module listed above it, which is the healthy direction.
rspack_core.module_graph uses rspack_core.artifacts.exports_info_artifact, so a change to rspack_core.artifacts.exports_info_artifact can break rspack_core.module_graph, while a change to rspack_core.module_graph can't break rspack_core.artifacts.exports_info_artifact.
Position
Below the diagonal: rspack_core.module_graph uses a module listed above it, which is the healthy direction.
rspack_core.module_graph uses rspack_core.dependency.dependency_id, so a change to rspack_core.dependency.dependency_id can break rspack_core.module_graph, while a change to rspack_core.module_graph can't break rspack_core.dependency.dependency_id.
Position
Below the diagonal: rspack_core.module_graph uses a module listed above it, which is the healthy direction.
rspack_core.module_graph uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.module_graph, while a change to rspack_core.module_graph can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.module_graph uses a module listed above it, which is the healthy direction.
rspack_core.module_graph uses rspack_intern.atom, so a change to rspack_intern.atom can break rspack_core.module_graph, while a change to rspack_core.module_graph can't break rspack_intern.atom.
Position
Below the diagonal: rspack_core.module_graph uses a module listed above it, which is the healthy direction.
17→28 rspack_core.module_graph uses rspack_core.dependency.dependency_traitpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.module_graph uses a type in rspack_core.dependency.dependency_trait.
rspack_core.module_graph uses rspack_core.dependency.dependency_trait, so a change to rspack_core.dependency.dependency_trait can break rspack_core.module_graph, while a change to rspack_core.module_graph can't break rspack_core.dependency.dependency_trait.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→29 rspack_core.module_graph uses rspack_core.modulepart of a loop✕
Connections
1 pair of types, where a type in rspack_core.module_graph uses a type in rspack_core.module.
rspack_core.module_graph uses rspack_core.module, so a change to rspack_core.module can break rspack_core.module_graph, while a change to rspack_core.module_graph can't break rspack_core.module.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→31 rspack_core.module_graph uses rspack_core.compilationpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.module_graph uses a type in rspack_core.compilation.
rspack_core.module_graph uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.module_graph, while a change to rspack_core.module_graph can't break rspack_core.compilation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.plugin.context uses rspack_core, so a change to rspack_core can break rspack_core.plugin.context, while a change to rspack_core.plugin.context can't break rspack_core.
Position
Below the diagonal: rspack_core.plugin.context uses a module listed above it, which is the healthy direction.
rspack_core.plugin.context uses rspack_core.compiler, so a change to rspack_core.compiler can break rspack_core.plugin.context, while a change to rspack_core.plugin.context can't break rspack_core.compiler.
Position
Below the diagonal: rspack_core.plugin.context uses a module listed above it, which is the healthy direction.
18→20 rspack_core.plugin.context uses rspack_core.options.modulepart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.plugin.context uses a type in rspack_core.options.module.
rspack_core.plugin.context uses rspack_core.options.module, so a change to rspack_core.options.module can break rspack_core.plugin.context, while a change to rspack_core.plugin.context can't break rspack_core.options.module.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18→31 rspack_core.plugin.context uses rspack_core.compilationpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.plugin.context uses a type in rspack_core.compilation.
rspack_core.plugin.context uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.plugin.context, while a change to rspack_core.plugin.context can't break rspack_core.compilation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.resolver.resolver_impl uses rspack_core.dependency.dependency_category, so a change to rspack_core.dependency.dependency_category can break rspack_core.resolver.resolver_impl, while a change to rspack_core.resolver.resolver_impl can't break rspack_core.dependency.dependency_category.
Position
Below the diagonal: rspack_core.resolver.resolver_impl uses a module listed above it, which is the healthy direction.
19→39 rspack_core.resolver.resolver_impl uses rspack_error.displayerpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.resolver.resolver_impl uses a type in rspack_error.displayer.
rspack_core.resolver.resolver_impl uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core.resolver.resolver_impl, while a change to rspack_core.resolver.resolver_impl can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.options.module uses rspack_core, so a change to rspack_core can break rspack_core.options.module, while a change to rspack_core.options.module can't break rspack_core.
Position
Below the diagonal: rspack_core.options.module uses a module listed above it, which is the healthy direction.
rspack_core.options.module uses rspack_core.plugin.context, so a change to rspack_core.plugin.context can break rspack_core.options.module, while a change to rspack_core.options.module can't break rspack_core.plugin.context.
Position
Below the diagonal: rspack_core.options.module uses a module listed above it, which is the healthy direction.
20→31 rspack_core.options.module uses rspack_core.compilationpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.options.module uses a type in rspack_core.compilation.
rspack_core.options.module uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.options.module, while a change to rspack_core.options.module can't break rspack_core.compilation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→32 rspack_core.options.module uses rspack_core.options.outputpart of a loop✕
Connections
3 pairs of types, where a type in rspack_core.options.module uses a type in rspack_core.options.output.
rspack_core.options.module uses rspack_core.options.output, so a change to rspack_core.options.output can break rspack_core.options.module, while a change to rspack_core.options.module can't break rspack_core.options.output.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→34 rspack_core.options.module uses rspack_hashpart of a loop✕
Connections
13 pairs of types, where a type in rspack_core.options.module uses a type in rspack_hash.
rspack_core.options.module uses rspack_hash, so a change to rspack_hash can break rspack_core.options.module, while a change to rspack_core.options.module can't break rspack_hash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→39 rspack_core.options.module uses rspack_error.displayerpart of a loop✕
Connections
3 pairs of types, where a type in rspack_core.options.module uses a type in rspack_error.displayer.
rspack_core.options.module uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core.options.module, while a change to rspack_core.options.module can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.runtime_template uses rspack_core.artifacts.exports_info_artifact, so a change to rspack_core.artifacts.exports_info_artifact can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_core.artifacts.exports_info_artifact.
Position
Below the diagonal: rspack_core.runtime_template uses a module listed above it, which is the healthy direction.
rspack_core.runtime_template uses rspack_core.dependency.dependency_id, so a change to rspack_core.dependency.dependency_id can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_core.dependency.dependency_id.
Position
Below the diagonal: rspack_core.runtime_template uses a module listed above it, which is the healthy direction.
rspack_core.runtime_template uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.runtime_template uses a module listed above it, which is the healthy direction.
rspack_core.runtime_template uses rspack_core.runtime_globals, so a change to rspack_core.runtime_globals can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_core.runtime_globals.
Position
Below the diagonal: rspack_core.runtime_template uses a module listed above it, which is the healthy direction.
rspack_core.runtime_template uses rspack_core.module_graph, so a change to rspack_core.module_graph can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_core.module_graph.
Position
Below the diagonal: rspack_core.runtime_template uses a module listed above it, which is the healthy direction.
21→29 rspack_core.runtime_template uses rspack_core.modulepart of a loop✕
Connections
6 pairs of types, where a type in rspack_core.runtime_template uses a type in rspack_core.module.
rspack_core.runtime_template uses rspack_core.module, so a change to rspack_core.module can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_core.module.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→30 rspack_core.runtime_template uses rspack_core.dependencypart of a loop✕
Connections
1 pair of types, where a type in rspack_core.runtime_template uses a type in rspack_core.dependency.
rspack_core.runtime_template uses rspack_core.dependency, so a change to rspack_core.dependency can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_core.dependency.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→31 rspack_core.runtime_template uses rspack_core.compilationpart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.runtime_template uses a type in rspack_core.compilation.
rspack_core.runtime_template uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_core.compilation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→35 rspack_core.runtime_template uses rspack_collections.identifierpart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.runtime_template uses a type in rspack_collections.identifier.
rspack_core.runtime_template uses rspack_collections.identifier, so a change to rspack_collections.identifier can break rspack_core.runtime_template, while a change to rspack_core.runtime_template can't break rspack_collections.identifier.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.dependency.dependency_template uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.dependency.dependency_template, while a change to rspack_core.dependency.dependency_template can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.dependency.dependency_template uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_template uses rspack_core.runtime_template, so a change to rspack_core.runtime_template can break rspack_core.dependency.dependency_template, while a change to rspack_core.dependency.dependency_template can't break rspack_core.runtime_template.
Position
Below the diagonal: rspack_core.dependency.dependency_template uses a module listed above it, which is the healthy direction.
22→31 rspack_core.dependency.dependency_template uses rspack_core.compilationpart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.dependency.dependency_template uses a type in rspack_core.compilation.
rspack_core.dependency.dependency_template uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.dependency.dependency_template, while a change to rspack_core.dependency.dependency_template can't break rspack_core.compilation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→34 rspack_core.dependency.dependency_template uses rspack_hashpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.dependency_template uses a type in rspack_hash.
rspack_core.dependency.dependency_template uses rspack_hash, so a change to rspack_hash can break rspack_core.dependency.dependency_template, while a change to rspack_core.dependency.dependency_template can't break rspack_hash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_core.dependency.dependency_location, so a change to rspack_core.dependency.dependency_location can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_core.dependency.dependency_location.
Position
Below the diagonal: rspack_plugin_javascript.visitors.dependency.parser uses a module listed above it, which is the healthy direction.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_core, so a change to rspack_core can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_core.
Position
Below the diagonal: rspack_plugin_javascript.visitors.dependency.parser uses a module listed above it, which is the healthy direction.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_intern.atom, so a change to rspack_intern.atom can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_intern.atom.
Position
Below the diagonal: rspack_plugin_javascript.visitors.dependency.parser uses a module listed above it, which is the healthy direction.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_javascript_compiler.ast, so a change to rspack_javascript_compiler.ast can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_javascript_compiler.ast.
Position
Below the diagonal: rspack_plugin_javascript.visitors.dependency.parser uses a module listed above it, which is the healthy direction.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_core.plugin.context, so a change to rspack_core.plugin.context can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_core.plugin.context.
Position
Below the diagonal: rspack_plugin_javascript.visitors.dependency.parser uses a module listed above it, which is the healthy direction.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_core.options.module, so a change to rspack_core.options.module can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_core.options.module.
Position
Below the diagonal: rspack_plugin_javascript.visitors.dependency.parser uses a module listed above it, which is the healthy direction.
23→24 rspack_plugin_javascript.visitors.dependency.parser uses rspack_dojang.evalpart of a loop✕
Connections
6 pairs of types, where a type in rspack_plugin_javascript.visitors.dependency.parser uses a type in rspack_dojang.eval.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_dojang.eval, so a change to rspack_dojang.eval can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_dojang.eval.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
23→29 rspack_plugin_javascript.visitors.dependency.parser uses rspack_core.modulepart of a loop✕
Connections
2 pairs of types, where a type in rspack_plugin_javascript.visitors.dependency.parser uses a type in rspack_core.module.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_core.module, so a change to rspack_core.module can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_core.module.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
23→37 rspack_plugin_javascript.visitors.dependency.parser uses rspack_error.diagnosticpart of a loop✕
Connections
1 pair of types, where a type in rspack_plugin_javascript.visitors.dependency.parser uses a type in rspack_error.diagnostic.
rspack_plugin_javascript.visitors.dependency.parser uses rspack_error.diagnostic, so a change to rspack_error.diagnostic can break rspack_plugin_javascript.visitors.dependency.parser, while a change to rspack_plugin_javascript.visitors.dependency.parser can't break rspack_error.diagnostic.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_dojang.eval uses rspack_core.cache.codec, so a change to rspack_core.cache.codec can break rspack_dojang.eval, while a change to rspack_dojang.eval can't break rspack_core.cache.codec.
Position
Below the diagonal: rspack_dojang.eval uses a module listed above it, which is the healthy direction.
rspack_dojang.eval uses rspack_javascript_compiler.ast, so a change to rspack_javascript_compiler.ast can break rspack_dojang.eval, while a change to rspack_dojang.eval can't break rspack_javascript_compiler.ast.
Position
Below the diagonal: rspack_dojang.eval uses a module listed above it, which is the healthy direction.
rspack_dojang.eval uses rspack_plugin_javascript.visitors.dependency.parser, so a change to rspack_plugin_javascript.visitors.dependency.parser can break rspack_dojang.eval, while a change to rspack_dojang.eval can't break rspack_plugin_javascript.visitors.dependency.parser.
Position
Below the diagonal: rspack_dojang.eval uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_core.cache.codec, so a change to rspack_core.cache.codec can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.cache.codec.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_core.dependency.dependency_id, so a change to rspack_core.dependency.dependency_id can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.dependency.dependency_id.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_core, so a change to rspack_core can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_core.dependency.dependency_category, so a change to rspack_core.dependency.dependency_category can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.dependency.dependency_category.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_javascript_compiler.ast, so a change to rspack_javascript_compiler.ast can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_javascript_compiler.ast.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_binding_api.module, so a change to rspack_binding_api.module can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_binding_api.module.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_core.module_graph, so a change to rspack_core.module_graph can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.module_graph.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_core.options.module, so a change to rspack_core.options.module can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.options.module.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_core.runtime_template, so a change to rspack_core.runtime_template can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.runtime_template.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
rspack_core.context_module uses rspack_dojang.eval, so a change to rspack_dojang.eval can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_dojang.eval.
Position
Below the diagonal: rspack_core.context_module uses a module listed above it, which is the healthy direction.
25→29 rspack_core.context_module uses rspack_core.modulepart of a loop✕
Connections
5 pairs of types, where a type in rspack_core.context_module uses a type in rspack_core.module.
rspack_core.context_module uses rspack_core.module, so a change to rspack_core.module can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.module.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→30 rspack_core.context_module uses rspack_core.dependencypart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.context_module uses a type in rspack_core.dependency.
rspack_core.context_module uses rspack_core.dependency, so a change to rspack_core.dependency can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.dependency.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→31 rspack_core.context_module uses rspack_core.compilationpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.context_module uses a type in rspack_core.compilation.
rspack_core.context_module uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_core.compilation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→35 rspack_core.context_module uses rspack_collections.identifierpart of a loop✕
Connections
3 pairs of types, where a type in rspack_core.context_module uses a type in rspack_collections.identifier.
rspack_core.context_module uses rspack_collections.identifier, so a change to rspack_collections.identifier can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_collections.identifier.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→37 rspack_core.context_module uses rspack_error.diagnosticpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.context_module uses a type in rspack_error.diagnostic.
rspack_core.context_module uses rspack_error.diagnostic, so a change to rspack_error.diagnostic can break rspack_core.context_module, while a change to rspack_core.context_module can't break rspack_error.diagnostic.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→40 rspack_core.context_module uses css_module_lexer.dependency_typespart of a loop✕
Connections
1 pair of types, where a type in rspack_core.context_module uses a type in css_module_lexer.dependency_types.
rspack_core.context_module uses css_module_lexer.dependency_types, so a change to css_module_lexer.dependency_types can break rspack_core.context_module, while a change to rspack_core.context_module can't break css_module_lexer.dependency_types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_plugin_javascript.parser_plugin.trait uses rspack_intern.atom, so a change to rspack_intern.atom can break rspack_plugin_javascript.parser_plugin.trait, while a change to rspack_plugin_javascript.parser_plugin.trait can't break rspack_intern.atom.
Position
Below the diagonal: rspack_plugin_javascript.parser_plugin.trait uses a module listed above it, which is the healthy direction.
rspack_plugin_javascript.parser_plugin.trait uses rspack_javascript_compiler.ast, so a change to rspack_javascript_compiler.ast can break rspack_plugin_javascript.parser_plugin.trait, while a change to rspack_plugin_javascript.parser_plugin.trait can't break rspack_javascript_compiler.ast.
Position
Below the diagonal: rspack_plugin_javascript.parser_plugin.trait uses a module listed above it, which is the healthy direction.
rspack_plugin_javascript.parser_plugin.trait uses rspack_plugin_javascript.visitors.dependency.parser, so a change to rspack_plugin_javascript.visitors.dependency.parser can break rspack_plugin_javascript.parser_plugin.trait, while a change to rspack_plugin_javascript.parser_plugin.trait can't break rspack_plugin_javascript.visitors.dependency.parser.
Position
Below the diagonal: rspack_plugin_javascript.parser_plugin.trait uses a module listed above it, which is the healthy direction.
rspack_plugin_javascript.parser_plugin.trait uses rspack_dojang.eval, so a change to rspack_dojang.eval can break rspack_plugin_javascript.parser_plugin.trait, while a change to rspack_plugin_javascript.parser_plugin.trait can't break rspack_dojang.eval.
Position
Below the diagonal: rspack_plugin_javascript.parser_plugin.trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.context_dependency uses rspack_core.context_module, so a change to rspack_core.context_module can break rspack_core.dependency.context_dependency, while a change to rspack_core.dependency.context_dependency can't break rspack_core.context_module.
Position
Below the diagonal: rspack_core.dependency.context_dependency uses a module listed above it, which is the healthy direction.
27→37 rspack_core.dependency.context_dependency uses rspack_error.diagnosticpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.context_dependency uses a type in rspack_error.diagnostic.
rspack_core.dependency.context_dependency uses rspack_error.diagnostic, so a change to rspack_error.diagnostic can break rspack_core.dependency.context_dependency, while a change to rspack_core.dependency.context_dependency can't break rspack_error.diagnostic.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27→40 rspack_core.dependency.context_dependency uses css_module_lexer.dependency_typespart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.context_dependency uses a type in css_module_lexer.dependency_types.
rspack_core.dependency.context_dependency uses css_module_lexer.dependency_types, so a change to css_module_lexer.dependency_types can break rspack_core.dependency.context_dependency, while a change to rspack_core.dependency.context_dependency can't break css_module_lexer.dependency_types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.dependency.dependency_trait uses rspack_core.artifacts.exports_info_artifact, so a change to rspack_core.artifacts.exports_info_artifact can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.artifacts.exports_info_artifact.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.cache.codec, so a change to rspack_core.cache.codec can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.cache.codec.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.dependency.dependency_id, so a change to rspack_core.dependency.dependency_id can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.dependency.dependency_id.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.dependency.dependency_location, so a change to rspack_core.dependency.dependency_location can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.dependency.dependency_location.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.dependency.dependency_category, so a change to rspack_core.dependency.dependency_category can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.dependency.dependency_category.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.dependency.dependency_type, so a change to rspack_core.dependency.dependency_type can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.dependency.dependency_type.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.dependency.module_dependency, so a change to rspack_core.dependency.module_dependency can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.dependency.module_dependency.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.module_graph, so a change to rspack_core.module_graph can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.module_graph.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.resolver.resolver_impl, so a change to rspack_core.resolver.resolver_impl can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.resolver.resolver_impl.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.options.module, so a change to rspack_core.options.module can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.options.module.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.dependency.dependency_template, so a change to rspack_core.dependency.dependency_template can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.dependency.dependency_template.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
rspack_core.dependency.dependency_trait uses rspack_core.dependency.context_dependency, so a change to rspack_core.dependency.context_dependency can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.dependency.context_dependency.
Position
Below the diagonal: rspack_core.dependency.dependency_trait uses a module listed above it, which is the healthy direction.
28→30 rspack_core.dependency.dependency_trait uses rspack_core.dependencypart of a loop✕
Connections
2 pairs of types, where a type in rspack_core.dependency.dependency_trait uses a type in rspack_core.dependency.
rspack_core.dependency.dependency_trait uses rspack_core.dependency, so a change to rspack_core.dependency can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_core.dependency.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
28→37 rspack_core.dependency.dependency_trait uses rspack_error.diagnosticpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.dependency_trait uses a type in rspack_error.diagnostic.
rspack_core.dependency.dependency_trait uses rspack_error.diagnostic, so a change to rspack_error.diagnostic can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break rspack_error.diagnostic.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
28→40 rspack_core.dependency.dependency_trait uses css_module_lexer.dependency_typespart of a loop✕
Connections
1 pair of types, where a type in rspack_core.dependency.dependency_trait uses a type in css_module_lexer.dependency_types.
rspack_core.dependency.dependency_trait uses css_module_lexer.dependency_types, so a change to css_module_lexer.dependency_types can break rspack_core.dependency.dependency_trait, while a change to rspack_core.dependency.dependency_trait can't break css_module_lexer.dependency_types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.module uses rspack_core.artifacts.exports_info_artifact, so a change to rspack_core.artifacts.exports_info_artifact can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.artifacts.exports_info_artifact.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.cache.codec, so a change to rspack_core.cache.codec can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.cache.codec.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.dependency.dependency_id, so a change to rspack_core.dependency.dependency_id can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.dependency.dependency_id.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.ukey, so a change to rspack_core.ukey can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.ukey.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core, so a change to rspack_core can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.compiler, so a change to rspack_core.compiler can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.compiler.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_intern.atom, so a change to rspack_intern.atom can break rspack_core.module, while a change to rspack_core.module can't break rspack_intern.atom.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_binding_api.module, so a change to rspack_binding_api.module can break rspack_core.module, while a change to rspack_core.module can't break rspack_binding_api.module.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.module_graph, so a change to rspack_core.module_graph can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.module_graph.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.options.module, so a change to rspack_core.options.module can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.options.module.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.runtime_template, so a change to rspack_core.runtime_template can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.runtime_template.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
rspack_core.module uses rspack_core.dependency.dependency_trait, so a change to rspack_core.dependency.dependency_trait can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.dependency.dependency_trait.
Position
Below the diagonal: rspack_core.module uses a module listed above it, which is the healthy direction.
29→30 rspack_core.module uses rspack_core.dependencypart of a loop✕
Connections
1 pair of types, where a type in rspack_core.module uses a type in rspack_core.dependency.
rspack_core.module uses rspack_core.dependency, so a change to rspack_core.dependency can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.dependency.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29→31 rspack_core.module uses rspack_core.compilationpart of a loop✕
Connections
5 pairs of types, where a type in rspack_core.module uses a type in rspack_core.compilation.
rspack_core.module uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.module, while a change to rspack_core.module can't break rspack_core.compilation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29→34 rspack_core.module uses rspack_hashpart of a loop✕
Connections
12 pairs of types, where a type in rspack_core.module uses a type in rspack_hash.
rspack_core.module uses rspack_hash, so a change to rspack_hash can break rspack_core.module, while a change to rspack_core.module can't break rspack_hash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29→35 rspack_core.module uses rspack_collections.identifierpart of a loop✕
Connections
5 pairs of types, where a type in rspack_core.module uses a type in rspack_collections.identifier.
rspack_core.module uses rspack_collections.identifier, so a change to rspack_collections.identifier can break rspack_core.module, while a change to rspack_core.module can't break rspack_collections.identifier.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29→39 rspack_core.module uses rspack_error.displayerpart of a loop✕
Connections
5 pairs of types, where a type in rspack_core.module uses a type in rspack_error.displayer.
rspack_core.module uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core.module, while a change to rspack_core.module can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.dependency uses rspack_core.artifacts.exports_info_artifact, so a change to rspack_core.artifacts.exports_info_artifact can break rspack_core.dependency, while a change to rspack_core.dependency can't break rspack_core.artifacts.exports_info_artifact.
Position
Below the diagonal: rspack_core.dependency uses a module listed above it, which is the healthy direction.
rspack_core.dependency uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.dependency, while a change to rspack_core.dependency can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.dependency uses a module listed above it, which is the healthy direction.
rspack_core.dependency uses rspack_intern.atom, so a change to rspack_intern.atom can break rspack_core.dependency, while a change to rspack_core.dependency can't break rspack_intern.atom.
Position
Below the diagonal: rspack_core.dependency uses a module listed above it, which is the healthy direction.
rspack_core.dependency uses rspack_core.module_graph, so a change to rspack_core.module_graph can break rspack_core.dependency, while a change to rspack_core.dependency can't break rspack_core.module_graph.
Position
Below the diagonal: rspack_core.dependency uses a module listed above it, which is the healthy direction.
rspack_core.dependency uses rspack_core.module, so a change to rspack_core.module can break rspack_core.dependency, while a change to rspack_core.dependency can't break rspack_core.module.
Position
Below the diagonal: rspack_core.dependency uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.artifacts.exports_info_artifact, so a change to rspack_core.artifacts.exports_info_artifact can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.artifacts.exports_info_artifact.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.ukey, so a change to rspack_core.ukey can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.ukey.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core, so a change to rspack_core can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.compiler, so a change to rspack_core.compiler can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.compiler.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.dependency.dependency_type, so a change to rspack_core.dependency.dependency_type can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.dependency.dependency_type.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.module_graph, so a change to rspack_core.module_graph can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.module_graph.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.runtime_template, so a change to rspack_core.runtime_template can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.runtime_template.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.dependency.dependency_template, so a change to rspack_core.dependency.dependency_template can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.dependency.dependency_template.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.dependency.dependency_trait, so a change to rspack_core.dependency.dependency_trait can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.dependency.dependency_trait.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.module, so a change to rspack_core.module can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.module.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
rspack_core.compilation uses rspack_core.dependency, so a change to rspack_core.dependency can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.dependency.
Position
Below the diagonal: rspack_core.compilation uses a module listed above it, which is the healthy direction.
31→32 rspack_core.compilation uses rspack_core.options.outputpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.compilation uses a type in rspack_core.options.output.
rspack_core.compilation uses rspack_core.options.output, so a change to rspack_core.options.output can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_core.options.output.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
31→34 rspack_core.compilation uses rspack_hashpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.compilation uses a type in rspack_hash.
rspack_core.compilation uses rspack_hash, so a change to rspack_hash can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_hash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
31→37 rspack_core.compilation uses rspack_error.diagnosticpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.compilation uses a type in rspack_error.diagnostic.
rspack_core.compilation uses rspack_error.diagnostic, so a change to rspack_error.diagnostic can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_error.diagnostic.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
31→39 rspack_core.compilation uses rspack_error.displayerpart of a loop✕
Connections
1 pair of types, where a type in rspack_core.compilation uses a type in rspack_error.displayer.
rspack_core.compilation uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core.compilation, while a change to rspack_core.compilation can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.options.output uses rspack_core.ukey, so a change to rspack_core.ukey can break rspack_core.options.output, while a change to rspack_core.options.output can't break rspack_core.ukey.
Position
Below the diagonal: rspack_core.options.output uses a module listed above it, which is the healthy direction.
rspack_core.options.output uses rspack_core, so a change to rspack_core can break rspack_core.options.output, while a change to rspack_core.options.output can't break rspack_core.
Position
Below the diagonal: rspack_core.options.output uses a module listed above it, which is the healthy direction.
rspack_core.options.output uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.options.output, while a change to rspack_core.options.output can't break rspack_core.compilation.
Position
Below the diagonal: rspack_core.options.output uses a module listed above it, which is the healthy direction.
32→34 rspack_core.options.output uses rspack_hashpart of a loop✕
Connections
17 pairs of types, where a type in rspack_core.options.output uses a type in rspack_hash.
rspack_core.options.output uses rspack_hash, so a change to rspack_hash can break rspack_core.options.output, while a change to rspack_core.options.output can't break rspack_hash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
32→39 rspack_core.options.output uses rspack_error.displayerpart of a loop✕
Connections
3 pairs of types, where a type in rspack_core.options.output uses a type in rspack_error.displayer.
rspack_core.options.output uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_core.options.output, while a change to rspack_core.options.output can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.plugin uses rspack_core.plugin.context, so a change to rspack_core.plugin.context can break rspack_core.plugin, while a change to rspack_core.plugin can't break rspack_core.plugin.context.
Position
Below the diagonal: rspack_core.plugin uses a module listed above it, which is the healthy direction.
rspack_core.plugin uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.plugin, while a change to rspack_core.plugin can't break rspack_core.compilation.
Position
Below the diagonal: rspack_core.plugin uses a module listed above it, which is the healthy direction.
rspack_hash uses rspack_core.options.output, so a change to rspack_core.options.output can break rspack_hash, while a change to rspack_hash can't break rspack_core.options.output.
Position
Below the diagonal: rspack_hash uses a module listed above it, which is the healthy direction.
rspack_collections.identifier uses rspack_hash, so a change to rspack_hash can break rspack_collections.identifier, while a change to rspack_collections.identifier can't break rspack_hash.
Position
Below the diagonal: rspack_collections.identifier uses a module listed above it, which is the healthy direction.
35→39 rspack_collections.identifier uses rspack_error.displayerpart of a loop✕
Connections
1 pair of types, where a type in rspack_collections.identifier uses a type in rspack_error.displayer.
rspack_collections.identifier uses rspack_error.displayer, so a change to rspack_error.displayer can break rspack_collections.identifier, while a change to rspack_collections.identifier can't break rspack_error.displayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rspack_core.runtime_module uses rspack_core.ukey, so a change to rspack_core.ukey can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_core.ukey.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_core.runtime_module uses rspack_core.runtime, so a change to rspack_core.runtime can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_core.runtime.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_core.runtime_module uses rspack_core.runtime_globals, so a change to rspack_core.runtime_globals can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_core.runtime_globals.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_core.runtime_module uses rspack_binding_api.module, so a change to rspack_binding_api.module can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_binding_api.module.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_core.runtime_module uses rspack_core.runtime_template, so a change to rspack_core.runtime_template can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_core.runtime_template.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_core.runtime_module uses rspack_core.module, so a change to rspack_core.module can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_core.module.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_core.runtime_module uses rspack_core.compilation, so a change to rspack_core.compilation can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_core.compilation.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_core.runtime_module uses rspack_hash, so a change to rspack_hash can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_hash.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_core.runtime_module uses rspack_collections.identifier, so a change to rspack_collections.identifier can break rspack_core.runtime_module, while a change to rspack_core.runtime_module can't break rspack_collections.identifier.
Position
Below the diagonal: rspack_core.runtime_module uses a module listed above it, which is the healthy direction.
rspack_error.diagnostic uses rspack_collections.identifier, so a change to rspack_collections.identifier can break rspack_error.diagnostic, while a change to rspack_error.diagnostic can't break rspack_collections.identifier.
Position
Below the diagonal: rspack_error.diagnostic uses a module listed above it, which is the healthy direction.
rspack_core.module_factory uses rspack_core.cache.codec, so a change to rspack_core.cache.codec can break rspack_core.module_factory, while a change to rspack_core.module_factory can't break rspack_core.cache.codec.
Position
Below the diagonal: rspack_core.module_factory uses a module listed above it, which is the healthy direction.
rspack_core.module_factory uses rspack_core.dependency.dependency_trait, so a change to rspack_core.dependency.dependency_trait can break rspack_core.module_factory, while a change to rspack_core.module_factory can't break rspack_core.dependency.dependency_trait.
Position
Below the diagonal: rspack_core.module_factory uses a module listed above it, which is the healthy direction.
rspack_core.module_factory uses rspack_core.module, so a change to rspack_core.module can break rspack_core.module_factory, while a change to rspack_core.module_factory can't break rspack_core.module.
Position
Below the diagonal: rspack_core.module_factory uses a module listed above it, which is the healthy direction.
rspack_core.module_factory uses rspack_error.diagnostic, so a change to rspack_error.diagnostic can break rspack_core.module_factory, while a change to rspack_core.module_factory can't break rspack_error.diagnostic.
Position
Below the diagonal: rspack_core.module_factory uses a module listed above it, which is the healthy direction.
rspack_error.displayer uses rspack_error.diagnostic, so a change to rspack_error.diagnostic can break rspack_error.displayer, while a change to rspack_error.displayer can't break rspack_error.diagnostic.
Position
Below the diagonal: rspack_error.displayer uses a module listed above it, which is the healthy direction.
css_module_lexer.dependency_types uses rspack_error.displayer, so a change to rspack_error.displayer can break css_module_lexer.dependency_types, while a change to css_module_lexer.dependency_types can't break rspack_error.displayer.
Position
Below the diagonal: css_module_lexer.dependency_types uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 44% · Weak · gated by D2, X4, X5 ·
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 category
Findings
Severity
A05:2025 — Injection
43
High / Critical
A07:2025 — Authentication Failures
41
High / Critical
A03:2025 — Software Supply Chain Failures
32
High / Critical
A02:2025 — Security Misconfiguration
2
High / Critical
Roadmap
First, enable strict null checking across the project and resolve existing assertions to prevent runtime errors. Next, replace interpolated log messages with structured logging, fix the single leaked secret in the lock file, and clean up dependencies by removing unused packages and explicitly declaring imports. Finally, ensure all async functions that make requests properly propagate cancellation signals to stop work when callers give up.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
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 `?`).
Bring the 17 bodies over 120 down to 120 or less in Cognitive Complexity — start with rspack_core::options::resolve::clever_merge::_merge_resolve (cognitive 264), rspack_core::options::resolve::clever_merge::parse_resolve (cognitive 261), rspack_plugin_mf::manifest::process_assets (cognitive 245).
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 — 109
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 — 1969
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 — 235
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 12
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
Watchdog 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. 83 of 83 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 83 dimensions across the health lenses
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
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, 2238 of 2313 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.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
D8 Code Coverage — not measured this run — Watchdog 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. Coverage NOT MEASURED: test source is present (.rs, .ts, .mjs, .js, .cts, .tsx, .jsx) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 196 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 166 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 — Watchdog 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 source is present (.rs, .ts, .mjs, .js, .cts, .tsx, .jsx) and this repository declares a Cargo test suite (repository root, 237 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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.
D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 — not measured this run — Watchdog 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. D21's deterministic naming 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. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — Watchdog 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 — not measured this run — Watchdog 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 the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D27 Navigability — not measured this run — Watchdog 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 — Watchdog 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/node_binding/napi-binding.d.ts`, `crates/rspack_plugin_esm_library/src/link.rs`, `packages/create-rspack/template-react-ts/rspack.config.ts`, `packages/create-rspack/template-vanilla-ts/rspack.config.ts`, `packages/create-rspack/template-vue-ts/rspack.config.ts`, … (+19 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.
AC6 Visual & motion safety — not measured this run — Watchdog 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. Visual & motion safety 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: ArgumentOutOfRangeException: startIndex cannot be larger than length of string. (Parameter 'startIndex').
AX1 Captive dependencies — not measured this run — Watchdog 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in packages/rspack/src/runtime/moduleFederationDefaultRuntime.js, whose lifetimes are not modelled 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.
AXR1 Runtime accessibility — not measured this run — Watchdog 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 (dev). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
GD1 Unfinished & placeholder code — not measured this run — Watchdog 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, Vue components 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 — Watchdog 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, Vue components 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 — Watchdog measured this, but not all of it. What it 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). 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.
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.
PF3 Async & latency hygiene — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 78 further occurrence(s) are not listed individually; the score already reflects all 118.
R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 46 further occurrence(s) are not listed individually; the score already reflects all 86.
R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 19 further occurrence(s) are not listed individually; the score already reflects all 59.
X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 516 further occurrence(s) are not listed individually; the score already reflects all 556.
X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 82 further occurrence(s) are not listed individually; the score already reflects all 122.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
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 Secret Scanning: Secret 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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
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 REDACTED (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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
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.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
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.
241 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was rspack::builder::target::merge_target_properties at 181. A further 22 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 BuiltinPlugin::append_to at 106 — they are counted neither in the figure above nor in this dimension's score. 12 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs (BuiltinPlugin::append_to at 106), packages/rspack/src/RuntimeGlobals.ts (RuntimeGlobals.renderRuntimeGlobals at 83), crates/rspack_core/src/runtime_globals.rs (rspack_core::runtime_globals::runtime_globals_property_name at 80), crates/rspack_core/src/dependency/dependency_type.rs (DependencyType::as_str at 79), crates/rspack/src/builder/builder_context.rs (BuilderContext::take_plugins at 50), and 7 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.
+ 123 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with rspack::builder::target::merge_target_properties (cyclomatic 181), rspack_core::options::resolve::clever_merge::_merge_resolve (cyclomatic 131), rspack_core::options::resolve::clever_merge::parse_resolve (cyclomatic 122). — 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 3 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.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 212 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 17 bodies over 120 down to 120 or less in Cognitive Complexity — start with rspack_core::options::resolve::clever_merge::_merge_resolve (cognitive 264), rspack_core::options::resolve::clever_merge::parse_resolve (cognitive 261), rspack_plugin_mf::manifest::process_assets (cognitive 245). — 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 17 together lifts Cognitive Complexity from 3.5 to about 4.7/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 91 MethodTooLong finding(s) in God Classes — start with mod.rs (14), lib.rs (7), link.rs (6). — One of this dimension's main actionable groups (91 warning-level).
Resolve the 89 FileTooLong finding(s) in God Classes — start with mod.rs (13), lib.rs (6), plugin.rs (5). — One of this dimension's main actionable groups (89 warning-level).
Resolve the 58 FunctionTooLong finding(s) in God Classes — start with mod.rs (7), lib.rs (7), helpers.rs (2). — One of this dimension's main actionable groups (58 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
351 duplicated block group(s) detected. A further 12 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 84 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 29 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with mod.rs (4), lib.rs (4), runtime.rs (2). — One of this dimension's main actionable groups (29 warning-level).
Resolve the 27 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with mod.rs (4), code_splitter.rs, file_system_info.rs. — One of this dimension's main actionable groups (27 warning-level).
Resolve the 25 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with mod.rs (3), one_shot_value_ref.rs (2), code_splitter.rs. — One of this dimension's main actionable groups (25 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.7 / 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.
127 production modules (Cargo+npm), 0 dependency cycle(s), 24 unstable depended-on module(s). Read from the build's own module declarations; 7 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: rspack_browserslist · ×7
Unstable project @rspack/binding
Unstable project rspack_binding_api
Unstable project rspack_loader_swc
Unstable project rspack_loader_testing
+ 20 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 1 Unstable project @rspack/binding finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project rspack_binding_api finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 11 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs (3), native_fs.rs, api_plugin.rs. — One of this dimension's main actionable groups (11 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution9.3 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
1621 test methods: 952 unit, 577 integration, 0 BDD, 92 e2e. The JavaScript/TypeScript suite contributes 196 `it`/`test` case(s) across 111 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 1425 `#[test]` function(s) across 237 file(s) declaring at least one; its unit/integration split is Cargo's own — 77 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.4 / 10Stronggated by 8 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.
1 skipped, 7 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 196 tests. Measured on the JavaScript/TypeScript suite only — at least 166 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: test a-1 · ×7tests/rspack-test/configCases/source-map/nosources/list.test.ts:4
Skipped test: should have `process.env.WEBPACK_SERVE` set on serve modepackages/rspack-cli/tests/build/issue-6359/index.test.ts:15
What to do
Resolve the 7 No assertions finding(s) in Test Quality — start with index.test.ts (4), list.test.ts (3). — One of this dimension's main actionable groups (7 warning-level).
Resolve the 1 Skipped test finding(s) in Test Quality — start with index.test.ts. — One of this dimension's main actionable groups (1 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
20 outdated, 0 yanked direct Cargo dependencies. 127 of 132 direct crates were graded against crates.io (0 not published there, 5 not resolved by a committed REDACTED). 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: arc-swap · ×20
What to do
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
0 of 689 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. This repository publishes itself under MIT, 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.
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.
Top hotspots: packages/rspack/src/loader-runner/index.ts (18×139=2502); crates/rspack_core/src/concatenated_module.rs (22×81=1782); crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs (20×55=1100) Repeated repair below the complexity floor: crates/rspack_plugin_javascript/src/plugin/url_plugin.rs (5 of 9 changes were fixes); crates/rspack_binding_api/src/plugins/js_hooks_plugin.rs (5 of 9 changes were fixes); crates/rspack_ids/src/compact_hashed_chunk_ids_plugin.rs (4 of 4 changes were fixes)
Resolve the 81 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (10), lib.rs (6), plugin.rs (5). — One of this dimension's main actionable groups (81 warning-level).
Resolve the 8 Repeated repair finding(s) in Churn × Complexity Hotspots — start with url_plugin.rs, js_hooks_plugin.rs, compact_hashed_chunk_ids_plugin.rs. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.6 / 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.
35 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/rspack_watcher/src/paths.rs. Counted over 846 of the 1545 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 · ×5
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.
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.
160 deducted task-comment markers across 335776 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.
Resolve the 141 TodoComment finding(s) in Explicit Debt — start with mod.rs (24), lib.rs (9), scope.rs (7). — One of this dimension's main actionable groups (141 warning-level).
Resolve the 18 FixmeComment finding(s) in Explicit Debt — start with mod.rs (5), require_context_dependency_parser_plugin.rs (3), lib.rs (2). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with module_concatenation_plugin.rs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
0 of 1 documentation facets pass in full; short on: F2 example. 418 document(s) read across 1 unit(s).
Documentation: no build, run or usage exampleREADME.md:1
What to do
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
39 finding(s): 0 critical, 39 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
Resolve the 39 High secret finding(s) in Secrets (history) — start with REDACTED (39). — One of this dimension's main actionable groups (39 issue-level).
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.
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).
43 finding(s): 0 critical, 39 high, 4 medium, 0 low. semgrep hit a parse error in 36 file(s) — `crates/node_binding/napi-binding.d.ts` (line 86), `crates/rspack_core/src/new_cache/db/turbo.rs` (line 62, line 81, line 100), `crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs` (line 2212, line 2346, line 2379, …), `crates/rspack_plugin_esm_library/src/link.rs` (line 1354), `crates/rspack_plugin_split_chunks/src/plugin/module_group.rs` (line 1070), … (+31 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 13 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
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 25 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (15), REDACTED (4), REDACTED (2). — One of this dimension's main actionable groups (25 issue-level).
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).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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).
Resolve the 6 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
53 of 846 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/rspack/src/builder/browserslist_target.rs. Counted over 846 of the 1545 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 30 Change coupling finding(s) in Change Coupling — start with mod.rs (6), common_js_require_context_dependency.rs (2), raw_optimization.rs (2). — One of this dimension's main actionable groups (30 warning-level).
Resolve the 3 Change coupling clique finding(s) in Change Coupling — start with context_module.rs, add.rs, IgnorePlugin.ts. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with binding.d.ts, esm_export_imported_specifier_dependency.rs, wasm_plugin.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
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. Scored 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. SCORED, not informational.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 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.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.5 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — crates/rspack_plugin_runtime/src/runtime_module/runtime/auto_public_path.ejs:10
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. (×4) — packages/create-rspack/template-react-js/index.html:2, packages/create-rspack/template-react-ts/index.html:2, packages/create-rspack/template-vanilla-js/index.html:2, …
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it. (×2) — packages/create-rspack/template-vue-js/index.html:2, packages/create-rspack/template-vue-ts/index.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 38 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.
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.
`rspack_core` is a Domain project but references `rspack_napi`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`LoaderContext` declares 21 required operations: `async`, `cacheable`, `getOptions`, `resolve`, `getResolve`, `getLogger`, `emitError`, `emitWarning`, `emitFile`, `addDependency`, `dependency`, `addContextDependency`, `addMissingDependency`, `clearDependencies`, `getDependencies`, `getContextDependencies`, `getMissingDependencies`, `addBuildDependency`, `importModule`, `importModule`, `__internal__setParseMeta`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. Those 21 declarations carry 20 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 20 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/rspack/src/config/adapterRuleUse.ts:147
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ 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.
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.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
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.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 126 of 152 project(s) that lack one — worth up to 1.7 pts.
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.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
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.
Do you agree with this assessment?
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 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.
Do you agree with this assessment?
P2 · Observability6.8 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 42/45 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/rspack_allocative_driver`, `packages/create-rspack`, `xtask`.
`packages/rspack/src/NativeWatchFileSystem.ts` reports through `console.*` at line 321 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/NativeWatchFileSystem.ts:321
`packages/rspack/src/checkNodeVersion.ts` reports through `console.*` at line 15 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/checkNodeVersion.ts:15
`packages/rspack/src/util/asyncLib.ts` reports through `console.*` at line 66 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/util/asyncLib.ts:66
`packages/rspack/src/util/asyncLib.ts` reports through `console.*` at line 67 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/util/asyncLib.ts:67
`packages/rspack/src/util/asyncLib.ts` reports through `console.*` at line 82 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/util/asyncLib.ts:82
`packages/rspack/src/util/asyncLib.ts` reports through `console.*` at line 83 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/util/asyncLib.ts:83
`packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 73 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/sharing/IndependentSharedPlugin.ts:73
`packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 106 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/sharing/IndependentSharedPlugin.ts:106
`packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 322 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/sharing/IndependentSharedPlugin.ts:322
`packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 349 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/sharing/IndependentSharedPlugin.ts:349
`packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 478 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/sharing/IndependentSharedPlugin.ts:478
`packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 490 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/sharing/IndependentSharedPlugin.ts:490
`REDACTED` reports through `console.*` at line 250 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:250
`REDACTED` reports through `console.*` at line 262 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:262
`REDACTED` reports through `console.*` at line 270 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:270
`REDACTED` reports through `console.*` at line 272 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:272
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 101 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:101
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 103 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:103
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 109 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:109
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 113 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:113
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 117 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:117
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 121 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:121
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 133 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:133
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 144 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:144
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 161 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:161
`packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 192 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/logging/createConsoleLogger.ts:192
`packages/rspack/src/loader-runner/utils.ts` reports through `console.*` at line 116 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/loader-runner/utils.ts:116
`packages/rspack/src/loader-runner/utils.ts` reports through `console.*` at line 117 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/src/loader-runner/utils.ts:117
`packages/rspack/hot/lazy-compilation-node.js` reports through `console.*` at line 99 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/hot/lazy-compilation-node.js:99
`packages/rspack/hot/lazy-compilation-web.js` reports through `console.*` at line 87 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/hot/lazy-compilation-web.js:87
`packages/rspack/hot/log.js` reports through `console.*` at line 39 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/hot/log.js:39
`packages/rspack/hot/log.js` reports through `console.*` at line 41 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/hot/log.js:41
`packages/rspack/hot/log.js` reports through `console.*` at line 43 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack/hot/log.js:43
`packages/rspack-test-tools/src/helper/util/checkSourceMap.js` reports through `console.*` at line 16 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack-test-tools/src/helper/util/checkSourceMap.js:16
`packages/rspack-test-tools/src/case/example.ts` reports through `console.*` at line 46 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/rspack-test-tools/src/case/example.ts:46
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
Consider OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) and a health-check endpoint (a /health route on your axum/actix router) for operability.
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.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
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.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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.
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 the language 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.
`fs.existsSync` in `loadExtendedConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack-cli/src/utils/loadConfig.ts:216
`fs.existsSync` in `loadRspackConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack-cli/src/utils/loadConfig.ts:261
`fs.existsSync` in `uniqueDirectoryForTest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack-cli/tests/utils/test-utils.ts:406
`fs.mkdirSync` in `uniqueDirectoryForTest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack-cli/tests/utils/test-utils.ts:407
`fs.writeFileSync` in `check` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — packages/rspack-test-tools/src/case/common.ts:133, packages/rspack-test-tools/src/case/common.ts:151, packages/rspack-test-tools/src/case/watch.ts:147, …
`fs.mkdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack-test-tools/src/case/watch.ts:96
`fs.existsSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack-test-tools/src/case/watch.ts:104
`fs.utimesSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack-test-tools/src/case/watch.ts:107
`fs.renameSync` in `check` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/rspack-test-tools/src/case/watch.ts:255, packages/rspack-test-tools/src/case/watch.ts:261
`fs.readFileSync` in `importModuleDynamically` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack-test-tools/src/runner/node/index.ts:548
`fs.mkdirSync` in `prepare` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/rspack-test-tools/src/test/tester.ts:37, packages/rspack-test-tools/src/test/tester.ts:40
`fs.existsSync` in `templateFn` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/rspack/src/builtin-plugin/html-plugin/plugin.ts:134
`fs.rmSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×6) — tests/rspack-test/compilerCases/binding-entry-dependency.mjs:124, tests/rspack-test/compilerCases/binding-entry-dependency.mjs:251, tests/rspack-test/compilerCases/lazy-compilation-entry-renamed.js:114, …
`fs.appendFileSync` in `callback to setTimeout` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tests/rspack-test/compilerCases/changes-and-removals.mjs:74
`fs.unlinkSync` in `callback to setTimeout` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tests/rspack-test/compilerCases/changes-and-removals.mjs:117
`fs.writeFileSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — tests/rspack-test/compilerCases/module-cache-build-meta-recovery.mjs:63, tests/rspack-test/compilerCases/module-cache-build-meta-recovery.mjs:74, tests/rspack-test/compilerCases/persistent-code-filter.mjs:92
`fs.readFileSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×7) — tests/rspack-test/compilerCases/module-cache-polymorphic.mjs:125, tests/rspack-test/compilerCases/module-owned-dependencies.mjs:106, tests/rspack-test/compilerCases/persistent-cache-issuer-updates.mjs:144, …
`outputFileSystem.readFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tests/rspack-test/compilerCases/object-lifecycle/runtime-module-multiple-builds.mjs:68
`fs.copyFileSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — tests/rspack-test/compilerCases/persistent-cache-advanced-tree-shaking.mjs:67, tests/rspack-test/compilerCases/persistent-cache-inner-graph-deferred-pure.mjs:69
`fs.readdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tests/rspack-test/compilerCases/persistent-cache-compiler-path.mjs:104
`fs.rmdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tests/rspack-test/compilerCases/persistent-cache-unavailable.mjs:69
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
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.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): 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. Deterministic.
5 duplicated blocks under packages/rspack/src/ have copies in at least two of the sibling directories browser, builtin-plugin, config, loader-runner, logging, stats (+3 more sibling(s) not listed) — 3 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/rspack/src/browser/service.ts:1
packages/rspack/src/stats/StatsFactory.ts:209 · packages/rspack/src/stats/StatsPrinter.ts:152 — the two spans are one implementation copied and then locally edited — 361 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/rspack/src/stats/StatsFactory.ts:209
packages/rspack/src/Compilation.ts:944 · packages/rspack/src/Compiler.ts:477 — the 2 copies are spread across 2 files, 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/rspack/src/Compilation.ts:944
packages/rspack/src/loader-runner/index.ts:459 · packages/rspack/src/loader-runner/worker.ts:399 — the 2 copies are spread across 2 files, 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/rspack/src/loader-runner/index.ts:459
packages/rspack/src/util/fs.ts:383 · packages/rspack/src/util/fs.ts:424 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/rspack/src/util/fs.ts:383
packages/rspack/hot/lazy-compilation-node.js:35 · packages/rspack/hot/lazy-compilation-web.js:32 — the two spans are one implementation copied and then locally edited — 166 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/rspack/hot/lazy-compilation-node.js:35
packages/rspack/src/Module.ts:41 · packages/rspack/src/Module.ts:110 — 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/rspack/src/Module.ts:41
packages/rspack/src/Compiler.ts:1112 · packages/rspack/src/Compiler.ts:1151 — 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/rspack/src/Compiler.ts:1112
packages/rspack/src/FileSystemDependencies.ts:126 · packages/rspack/src/Modules.ts:45 — the 2 copies are spread across 2 files, 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/rspack/src/FileSystemDependencies.ts:126
packages/rspack/src/ExternalModule.ts:12 · packages/rspack/src/NormalModule.ts:13 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/rspack/src/ExternalModule.ts:12
packages/rspack-cli/src/commands/preview.ts:47 · packages/rspack-cli/src/commands/serve.ts:61 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/rspack-cli/src/commands/preview.ts:47
packages/rspack/src/ConcatenatedModule.ts:6 · packages/rspack/src/ContextModule.ts:6 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/rspack/src/ConcatenatedModule.ts:6
packages/rspack/src/Stats.ts:86 · packages/rspack/src/Stats.ts:133 — 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/rspack/src/Stats.ts:86
packages/rspack/src/FileSystem.ts:75 · packages/rspack/src/FileSystem.ts:176 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/rspack/src/FileSystem.ts:75
packages/rspack/src/browser/service.ts:1 · packages/rspack/src/loader-runner/service.ts:125 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/rspack/src/browser/service.ts:1
packages/create-rspack/template-react-js/src/App.jsx:5 · packages/create-rspack/template-react-ts/src/App.tsx: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/create-rspack/template-react-js/src/App.jsx:5
packages/rspack/src/config/defaults.ts:947 · packages/rspack/src/config/defaults.ts:974 — 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/rspack/src/config/defaults.ts:947
packages/rspack/src/rspackOptionsApply.ts:360 · packages/rspack/src/rspackOptionsApply.ts:388 — 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/rspack/src/rspackOptionsApply.ts:360
packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts:240 · packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts:264 — 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/rspack/src/stats/DefaultStatsPrinterPlugin.ts:240
packages/rspack/src/taps/compilation.ts:446 · packages/rspack/src/taps/javascriptModules.ts:16 — the 2 copies are spread across 2 files, 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/rspack/src/taps/compilation.ts:446
packages/rspack/src/loader-runner/index.ts:700 · packages/rspack/src/loader-runner/worker.ts:451 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/rspack/src/loader-runner/index.ts:700
packages/rspack/src/util/fs.ts:287 · packages/rspack/src/util/fs.ts:465 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/rspack/src/util/fs.ts:287
packages/rspack/src/logging/createConsoleLogger.ts:41 · packages/rspack/src/stats/DefaultStatsPresetPlugin.ts:259 — the two spans are one implementation copied and then locally edited — 95 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/rspack/src/logging/createConsoleLogger.ts:41
packages/rspack/src/Compiler.ts:587 · packages/rspack/src/Watching.ts:341 — the two spans are one implementation copied and then locally edited — 117 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/rspack/src/Compiler.ts:587
packages/rspack/src/taps/normalModuleFactory.ts:13 · packages/rspack/src/taps/normalModuleFactory.ts:73 — both copies are in the same file, so extract the 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/rspack/src/taps/normalModuleFactory.ts:13
packages/create-rspack/template-vue-js/rspack.config.js:35 · packages/create-rspack/template-vue-ts/rspack.config.ts:37 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/create-rspack/template-vue-js/rspack.config.js:35
packages/rspack/src/Compilation.ts:493 · packages/rspack/src/Compiler.ts:273 — the 2 copies are spread across 2 files, 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/rspack/src/Compilation.ts:493
packages/rspack/src/NativeWatchFileSystem.ts:436 · packages/rspack/src/NativeWatchFileSystem.ts:456 · packages/rspack/src/node/NodeWatchFileSystem.ts:269 · packages/rspack/src/node/NodeWatchFileSystem.ts:289 — the 4 copies are spread across 2 files, 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/rspack/src/NativeWatchFileSystem.ts:436
packages/rspack/src/builtin-plugin/html-plugin/taps.ts:23 · packages/rspack/src/builtin-plugin/html-plugin/taps.ts:45 · packages/rspack/src/builtin-plugin/html-plugin/taps.ts:67 · packages/rspack/src/builtin-plugin/html-plugin/taps.ts:110 — 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. — packages/rspack/src/builtin-plugin/html-plugin/taps.ts:23
packages/rspack/src/loader-runner/index.ts:997 · packages/rspack/src/loader-runner/index.ts:1016 — 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/rspack/src/loader-runner/index.ts:997
packages/rspack/src/stats/StatsFactory.ts:113 · packages/rspack/src/stats/StatsFactory.ts:134 — 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/rspack/src/stats/StatsFactory.ts:113
packages/rspack/src/config/target.ts:258 · packages/rspack/src/config/target.ts:333 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/rspack/src/config/target.ts:258
packages/rspack/src/sharing/IndependentSharedPlugin.ts:170 · packages/rspack/src/sharing/SharePlugin.ts:73 — the two spans are one implementation copied and then locally edited — 66 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/rspack/src/sharing/IndependentSharedPlugin.ts:170
packages/rspack/src/NativeWatchFileSystem.ts:475 · packages/rspack/src/node/NodeWatchFileSystem.ts:308 — the 2 copies are spread across 2 files, 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/rspack/src/NativeWatchFileSystem.ts:475
packages/rspack/src/container/ModuleFederationPlugin.ts:101 · packages/rspack/src/container/ModuleFederationPlugin.ts:118 — 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/rspack/src/container/ModuleFederationPlugin.ts:101
packages/rspack/src/loader-runner/index.ts:675 · packages/rspack/src/loader-runner/worker.ts:263 — the 2 copies are spread across 2 files, 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/rspack/src/loader-runner/index.ts:675
packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:173 · packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:395 — both copies are in the same file, so extract the 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/rspack/src/stats/DefaultStatsFactoryPlugin.ts:173
packages/rspack/src/ChunkGraph.ts:7 · packages/rspack/src/ChunkGraph.ts:27 — 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/rspack/src/ChunkGraph.ts:7
packages/rspack/src/loader-runner/index.ts:548 · packages/rspack/src/loader-runner/worker.ts:130 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/rspack/src/loader-runner/index.ts:548
packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:118 · packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:287 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:118
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.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
crates/node_binding/scripts/build.mjs:5 reaches into another package with a relative path (../../../scripts/allocative-driver.mjs) — import the package by name instead. — crates/node_binding/scripts/build.mjs:5
packages/rspack/src/node/NodeEnvironmentPlugin.ts:12 imports enhanced-resolve/lib/CachedInputFileSystem, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/rspack/src/node/NodeEnvironmentPlugin.ts:12
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.
getGraphemeBreakProperty has cyclomatic complexity 2120 and cognitive complexity 1507; 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. — tests/rspack-test/normalCases/parsing/evaluate-binary/deep.js:267
process has cyclomatic complexity 90 and cognitive complexity 101; 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/rspack/src/rspackOptionsApply.ts:88
_createToolbarTable has cyclomatic complexity 82 and cognitive complexity 142; 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. — tests/rspack-test/configCases/inner-graph/issue-11678/module.js:436
resolveToUnqualified has cyclomatic complexity 54 and cognitive complexity 161; 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. (×2) — tests/rspack-test/configCases/resolve/pnp-enable/.pnp.cjs:10134, tests/rspack-test/diagnosticsCases/config/pnp-disable/.pnp.cjs:10134
(anonymous) has cyclomatic complexity 51 and cognitive complexity 69; 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/rspack/src/logging/createConsoleLogger.ts:85
_ has cyclomatic complexity 45 and cognitive complexity 104; 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/rspack/src/stats/DefaultStatsFactoryPlugin.ts:673
shouldBreak has cyclomatic complexity 43 and cognitive complexity 42; 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. — tests/rspack-test/normalCases/parsing/evaluate-binary/deep.js:80
runLoaders has cyclomatic complexity 41 and cognitive complexity 72; 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/rspack/src/loader-runner/index.ts:249
arg has cyclomatic complexity 40 and cognitive complexity 81; 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. (×2) — tests/rspack-test/configCases/resolve/pnp-enable/.pnp.cjs:9545, tests/rspack-test/diagnosticsCases/config/pnp-disable/.pnp.cjs:9545
(anonymous) has cyclomatic complexity 39 and cognitive complexity 50; 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/node_binding/scripts/build.mjs:39
_showFormButtons has cyclomatic complexity 39 and cognitive complexity 49; 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. — tests/rspack-test/configCases/inner-graph/issue-11678/module.js:2703
(anonymous) has cyclomatic complexity 37 and cognitive complexity 42; 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/rspack-cli/src/commands/serve.ts:58
(anonymous) has cyclomatic complexity 36 and cognitive complexity 35; 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. — tests/rspack-test/configCases/chunks/available-modules/rspack.config.ts:25
(anonymous) has cyclomatic complexity 34 and cognitive complexity 76; 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/rspack/src/util/smartGrouping.ts:73
compilation.summary! has cyclomatic complexity 34 and cognitive complexity 29; 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/rspack/src/stats/DefaultStatsPrinterPlugin.ts:80
_resolveFilename has cyclomatic complexity 30 and cognitive complexity 49; 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. (×2) — tests/rspack-test/configCases/resolve/pnp-enable/.pnp.cjs:8772, tests/rspack-test/diagnosticsCases/config/pnp-disable/.pnp.cjs:8772
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files7.0 / 10Adequate✓ 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/rspack/src/config/types.ts has 3047 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/rspack/src/config/types.ts:1
packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts has 1531 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/rspack/src/stats/DefaultStatsFactoryPlugin.ts:1
packages/rspack/src/config/defaults.ts has 1345 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/rspack/src/config/defaults.ts:1
packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts has 1319 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/rspack/src/stats/DefaultStatsPrinterPlugin.ts:1
packages/rspack/src/Compilation.ts has 1249 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/rspack/src/Compilation.ts:1
packages/rspack/src/loader-runner/index.ts has 1185 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/rspack/src/loader-runner/index.ts:1
packages/rspack/src/Compiler.ts has 1111 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/rspack/src/Compiler.ts:1
packages/rspack/src/config/adapter.ts has 916 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/rspack/src/config/adapter.ts:1
packages/rspack/src/util/fs.ts has 721 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/rspack/src/util/fs.ts:1
packages/rspack/src/loader-runner/worker.ts has 710 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/rspack/src/loader-runner/worker.ts:1
packages/rspack/src/config/normalization.ts has 700 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/rspack/src/config/normalization.ts:1
packages/rspack/src/stats/statsFactoryUtils.ts has 668 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/rspack/src/stats/statsFactoryUtils.ts:1
packages/rspack/src/RuntimeGlobals.ts has 627 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/rspack/src/RuntimeGlobals.ts:1
packages/rspack/src/config/adapterRuleUse.ts has 622 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/rspack/src/config/adapterRuleUse.ts:1
packages/rspack-test-tools/src/case/cache.ts has 617 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/rspack-test-tools/src/case/cache.ts:1
packages/rspack-test-tools/src/runner/node/index.ts has 570 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/rspack-test-tools/src/runner/node/index.ts:1
packages/rspack/src/MultiCompiler.ts has 568 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/rspack/src/MultiCompiler.ts:1
packages/rspack/src/config/target.ts has 538 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/rspack/src/config/target.ts:1
packages/rspack/src/Watching.ts has 495 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/rspack/src/Watching.ts:1
packages/rspack/src/NativeWatchFileSystem.ts has 494 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/rspack/src/NativeWatchFileSystem.ts:1
packages/rspack/src/taps/compilation.ts has 486 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/rspack/src/taps/compilation.ts:1
packages/rspack-test-tools/src/case/watch.ts has 485 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/rspack-test-tools/src/case/watch.ts:1
packages/rspack/src/util/cleverMerge.ts has 480 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/rspack/src/util/cleverMerge.ts:1
packages/rspack/src/sharing/IndependentSharedPlugin.ts has 452 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/rspack/src/sharing/IndependentSharedPlugin.ts:1
packages/rspack/src/rspackOptionsApply.ts has 450 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/rspack/src/rspackOptionsApply.ts:1
packages/rspack/src/exports.ts has 449 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/rspack/src/exports.ts:1
packages/rspack-test-tools/src/runner/web/index.ts has 436 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/rspack-test-tools/src/runner/web/index.ts:1
packages/rspack/src/loader-runner/service.ts has 420 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/rspack/src/loader-runner/service.ts:1
packages/rspack/src/container/ModuleFederationPlugin.ts has 417 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/rspack/src/container/ModuleFederationPlugin.ts:1
packages/rspack-test-tools/src/case/hot-step.ts has 403 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/rspack-test-tools/src/case/hot-step.ts:1
packages/rspack/src/stats/StatsFactory.ts has 401 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/rspack/src/stats/StatsFactory.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage8.9 / 10Strong✓ 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.
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. (×33) — packages/rspack/src/config/types.ts:1, packages/rspack/src/loader-runner/worker.ts:1, REDACTED:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
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.
Do you agree with this assessment?
R7 · Dead Code8.0 / 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.
304 file(s) (~5927 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: tests/e2e/cases/file/missing-files/src/index.js imports './missing-file-1.js', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — tests/e2e
14679 file(s) (~242825 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: tests/rspack-test/configCases/asset-modules/file-url/index.js imports './temp/index.js', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — tests/rspack-test
1 file(s) (~6 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. — tests/rspack-test/configCases/module/node-globals/cjs
This script imports the product ('../../../i18n'), so it is an authored benchmark, not measurement input — but nothing invokes it: no package.json script, no CI workflow or build recipe, no REDACTED, no other file under website/theme/components/Landingpage/Benchmark/, and no in-repo reference to its name at all. It runs only if someone remembers to type `node website/theme/components/Landingpage/Benchmark/index.tsx`, and it silently rots against the API it measures. Wire it into a script or workflow the way its wired siblings are, or delete it. — website/theme/components/Landingpage/Benchmark/index.tsx
Nothing ultimately consumes this binding: its only referrer is the re-export in packages/rspack/src/browser/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/rspack/src/browser/index.ts in the same commit, or the barrel will import a name that no longer exists. (×2) — packages/rspack/src/browser/BrowserHttpImportEsmPlugin.ts:45, packages/rspack/src/browser/BrowserRequirePlugin.ts:42
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×34) — tests/rspack-test/builtinCases/samples/concatenate-modules/index.js:8, tests/rspack-test/configCases/builtin-swc-loader/preact-refresh/index.jsx:1, tests/rspack-test/configCases/builtin-swc-loader/react-compiler-panic-threshold/index.jsx:3, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
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.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×16) — packages/rspack/src/container/ModuleFederationPlugin.ts:311, packages/rspack/src/container/ModuleFederationPlugin.ts:307, tests/rspack-test/serialCases/container-1-5/0-container-full/App.js:1, …
Declared in tests/rspack-test/configCases/css/css-order-concatenate-modules/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Declared in tests/rspack-test/configCases/css/css-order-reexport/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Declared in tests/rspack-test/configCases/css/css-order2/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Do you agree with this assessment?
R9 · Circular Imports4.4 / 10Weak✓ 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.
packages/rspack/src/builtin-plugin/index.ts → packages/rspack/src/builtin-plugin/DynamicEntryPlugin.ts → packages/rspack/src/lib/EntryOptionPlugin.ts → packages/rspack/src/builtin-plugin/index.ts (one verified cycle inside a mutually-dependent group of 21 files) — packages/rspack/src/builtin-plugin/index.ts:28
packages/rspack/src/container/ModuleFederationManifestPlugin.ts → packages/rspack/src/container/ModuleFederationPlugin.ts → packages/rspack/src/container/ModuleFederationManifestPlugin.ts (one verified cycle inside a mutually-dependent group of 5 files) — packages/rspack/src/container/ModuleFederationManifestPlugin.ts:18
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are read from a Rust server this repository starts itself, and its production Rust starts none. What serves its HTTP is outside the Rust source, and only what this card names about it was assessed.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. — crates/rspack_hash/src/lib.rs:215
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `_headers` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — website/docs/public/_headers:1
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
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.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. 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 `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. 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 question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`defaultHttpClientForBrowser` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/rspack/src/builtin-plugin/HttpUriPlugin.ts:129
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. 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 `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped1.0 / 10Critical✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`var("cssLoadingUniqueName")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading.ejs:1
`fn("handleCssComposes")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading.ejs:2
`REQUIRE` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading.ejs:7
`var("loadingAttribute")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading.ejs:11
`var("cssLoadStylesheet")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading.ejs:12
`PUBLIC_PATH` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×5) — crates/rspack_plugin_css/src/runtime/css_loading.ejs:21, crates/rspack_plugin_css/src/runtime/css_loading.ejs:23, crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:40, …
`_create_link` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading.ejs:38
`basicFunction("prev, event")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading.ejs:40
`_chunk_load_timeout` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading.ejs:51
`weak(SCRIPT_NONCE)` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — crates/rspack_plugin_css/src/runtime/css_loading_create_link.ejs:2, crates/rspack_plugin_css/src/runtime/css_loading_create_link.ejs:3
`_cross_origin` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — crates/rspack_plugin_css/src/runtime/css_loading_create_link.ejs:20, crates/rspack_plugin_css/src/runtime/css_loading_with_prefetch_link.ejs:3
`var("cssOldTags")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:1
`var("cssNewTags")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:2
`var("cssApplyHandler")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:3
`basicFunction("")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:5, crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:6
`basicFunction("newTag")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:7
`var("cssInitialChunkIds")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:20
`var("cssChunkIsLoaded")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:23
`_js_state_expression` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:24
`HMR_DOWNLOAD_UPDATE_HANDLERS` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:26
`basicFunction("chunkId")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:37, crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:43
`GET_CHUNK_CSS_FILENAME` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:38, crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:44
`basicFunction("resolve, reject")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:58
`basicFunction("event")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:62
`ENSURE_CHUNK_HANDLERS` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_loading.ejs:1
`HAS_OWN_PROPERTY` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — crates/rspack_plugin_css/src/runtime/css_loading_with_loading.ejs:3, crates/rspack_plugin_css/src/runtime/css_loading_with_loading.ejs:25, crates/rspack_plugin_css/src/runtime/css_loading_with_prefetch.ejs:2
`_css_matcher` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_loading.ejs:13
`PREFETCH_CHUNK_HANDLERS` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_prefetch.ejs:1
`_create_prefetch_link` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/rspack_plugin_css/src/runtime/css_loading_with_prefetch.ejs:6
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×4) — scripts/build-npm.mjs:104, scripts/build-npm.mjs:196, packages/rspack/src/container/ModuleFederationManifestPlugin.ts:42, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
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.
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.
`error!` at line 40 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/rspack_watcher/src/disk_watcher.rs:40
`warn!` at line 83 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/rspack_watcher/src/disk_watcher.rs:83
`error!` at line 157 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/rspack_watcher/src/ignored.rs:157
`debug!` at line 1071 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/rspack_resolver/src/lib.rs:1071
`debug!` at line 1106 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/rspack_resolver/src/lib.rs:1106
`trace!` at line 294 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/max_size.rs:294
`trace!` at line 523 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/max_size.rs:523
`debug!` at line 535 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/rspack_plugin_split_chunks/src/plugin/max_size.rs:535
`debug!` at line 561 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/rspack_plugin_split_chunks/src/plugin/max_size.rs:561
`warn!` at line 573 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/rspack_plugin_split_chunks/src/plugin/max_size.rs:573
`debug!` at line 631 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/rspack_plugin_split_chunks/src/plugin/max_size.rs:631
`trace!` 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/min_size.rs:64
`debug!` at line 235 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/rspack_plugin_split_chunks/src/plugin/min_size.rs:235
`debug!` at line 277 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/rspack_plugin_split_chunks/src/plugin/min_size.rs:277
`debug!` at line 59 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/rspack_plugin_split_chunks/src/plugin/mod.rs:59
`debug!` at line 83 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/rspack_plugin_split_chunks/src/plugin/mod.rs:83
`trace!` at line 304 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:304
`trace!` at line 314 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:314
`trace!` at line 330 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:330
`trace!` at line 450 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:450
`trace!` at line 494 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:494
`trace!` at line 518 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:518
`trace!` at line 1425 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1425
`trace!` at line 1431 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1431
`trace!` at line 1432 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1432
`trace!` at line 1439 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1439
`trace!` at line 1450 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1450
`trace!` at line 1472 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1472
`error!` at line 30 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/rspack_plugin_schemes/src/file_uri.rs:30
`error!` 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: `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/rspack_plugin_schemes/src/file_uri.rs:64
`error!` at line 74 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/rspack_plugin_schemes/src/file_uri.rs:74
`error!` at line 117 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:117
`error!` at line 131 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:131
`error!` at line 147 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:147
`error!` at line 185 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:185
`error!` at line 190 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:190
`error!` at line 196 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:196
`error!` at line 206 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:206
`error!` at line 211 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:211
`error!` at line 317 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/rspack_plugin_schemes/src/http_uri/http_cache.rs:317
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.
1/69 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.
~6.8 `!` null assertions per 1k TypeScript source lines — 328 assertion(s) across the 48019 source line(s) of the 314 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/rspack/src/loader-runner/index.ts (39), packages/rspack/src/FileSystem.ts (38), packages/rspack/src/taps/compilation.ts (32). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
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 `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 11 of 55 WCAG 2.2 Level A/AA success criteria (20%; ≈22% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 44 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
Unscored — 2 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.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 3 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 — 46 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.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC6 Visual & motion safety — Visual & motion safety 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.
AX1 Captive dependencies — 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
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
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 did not expose a crawlable HTTP endpoint in time — no runtime evidence 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 included — the .rs suite was found but not re-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.
D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Rust, TypeScript not measured.
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+ projects each declaring an entity of their own. 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"]`.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .rs, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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) — 24 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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 included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (208 value object(s))
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 — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
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 — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
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 — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb. TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
R5 Dependency Freshness — uses a yarn lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
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.
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.
X9 Subsumed condition operand — 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.
AC1 · Text alternatives· <img> without a text alternative · ×1
<img> without a text alternative crates/rspack_plugin_runtime/src/runtime_module/runtime/auto_public_path.ejs:10— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
Dependency-rule violation: rspack_core (Domain) → rspack_napi (Web) — `rspack_core` is a Domain project but references `rspack_napi`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Unlisted import '@module-federation/runtime' packages/rspack/src/container/ModuleFederationPlugin.ts:311— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import '@module-federation/webpack-bundler-runtime' packages/rspack/src/container/ModuleFederationPlugin.ts:307— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import '@rspack/mocked-react' tests/rspack-test/serialCases/container-1-5/0-container-full/App.js:1— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import '@rstest/core' tests/rspack-test/configCases/rstest/mock-dynamic-import-external/src/fixture.js:9— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'common' tests/rspack-test/hotCases/sharing/share-plugin/module.js:5— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'd' tests/rspack-test/configCases/split-chunks-common/rspack-issue-4376/index.js:8— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'dep' tests/rspack-test/configCases/concatenate-modules/side-effects/index.js:1— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'lib3' tests/rspack-test/configCases/builtin-swc-loader/swc-loader-incompatible-wasm-plugin/src/index.jsx:4— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'm' tests/rspack-test/normalCases/optimize/side-effects-reexport-start-unknown/index.js:1— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'my-module' tests/rspack-test/normalCases/parsing/local-modules/index.js:12— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'my-module3' tests/rspack-test/normalCases/parsing/local-modules/index.js:44— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'my-module4' tests/rspack-test/normalCases/parsing/local-modules/index.js:45— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'package' tests/rspack-test/configCases/asset-modules/unsafe-cache-13827/index.js:1— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'react-router-dom' tests/rspack-test/configCases/tree-shaking/export-star-of-external-module/lib.js:1— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'shared' tests/rspack-test/statsOutputCases/split-chunks-keep-remaining-size/a.js:1— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'vue' tests/rspack-test/configCases/library/modern-module-dynamic-import-runtime/main.js:11— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
TodoComment packages/rspack-test-tools/src/test/creator.ts:123— // TODO: more flexible filter — 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/rspack-test-tools/src/case/config.ts:83— // TODO: modify runner module scope based on stats here — 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/rspack-test-tools/src/case/esm-output.ts:32— // TODO: modify runner module scope based on stats here — 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/rspack-test-tools/src/case/serial.ts:12— // TODO: modify runner module scope based on stats here — 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/rspack-test-tools/src/case/diagnostic.ts:50— // TODO: change to stats.errorStack — 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/rspack-test-tools/src/case/diagnostic.ts:51— // TODO: add `errorStack: false` — 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/rspack-test-tools/src/case/hot-step.ts:111— // TODO: find a better way — 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/rspack-test-tools/src/case/watch.ts:306— // TODO: This is a workaround, we can remove it when notify support windows better. — 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/rspack/src/FileSystem.ts:102— // TODO: is `memoizeFn` necessary? — 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/rspack/src/NormalModuleFactory.ts:16— // TODO(v3): Remove resolveData.fileDependencies, resolveData.contextDependencies, — 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/rspack/src/NormalModuleFactory.ts:29— // TODO: second param resolveData — 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/rspack/src/Stats.ts:104— // TODO: Find a better way to handle accessing stats from stale compilations — 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/rspack/src/Stats.ts:151— // TODO: Find a better way to handle accessing stats from stale compilations — 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/rspack/src/Watching.ts:188— // TODO: compilation parameter support — 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/rspack/src/rspackOptionsApply.ts:354— // TODO: inconsistent: the plugin need to be placed after SplitChunksPlugin — 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/rspack/src/loader-runner/index.ts:566— // TODO: (type) our native resolver return value is "string | false" but webpack type is "string" — 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/rspack/src/builtin-plugin/SwcJsMinimizerPlugin.ts:290— // TODO: SWC minifier currently only supports up to es2022, should fix this at SWC side first — 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/rspack_watcher/src/disk_watcher.rs:143— // TODO: handle this case /path/to/index.js -> /path/to/index.js.map — 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/rspack_util/src/swc/runtime.rs:91— // TODO use `with_added_extension` — 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/rspack_tools/src/compare/mod.rs:204— // TODO compare snapshot — 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/rspack_tools/src/compare/snapshot.rs:20— // TODO check SnapshotScope::Context && SnapshotScope::Missing — 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/rspack_sources/src/concat_source.rs:675— // TODO: test hash — 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/rspack_resolver/src/lib.rs:686— // TODO: Only package.json is supported, so warn about having other values — 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/rspack_resolver/src/lib.rs:2000— // TODO: fill in test case for this case — 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/rspack_resolver/src/lib.rs:2098— // TODO: [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./dist/" in the "exports" field module resolution of the package at xxx/package.json. — 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.
MethodTooLong: ConcatenatedModule.code_generation crates/rspack_core/src/concatenated_module.rs:1009— MethodTooLong — code_generation runs 617 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 517 over it, 6.17× 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: ModuleConcatenationPlugin.optimize_chunk_modules_impl crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:1048— MethodTooLong — optimize_chunk_modules_impl runs 515 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 415 over it, 5.15× 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: BuiltinPlugin.append_to crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs:308— MethodTooLong — append_to runs 513 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 413 over it, 5.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: EsmLibraryPlugin.link_imports_and_exports crates/rspack_plugin_esm_library/src/link.rs:2111— MethodTooLong — link_imports_and_exports runs 502 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 402 over it, 5.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: EsmLibraryPlugin.render_chunk crates/rspack_plugin_esm_library/src/render.rs:131— MethodTooLong — render_chunk runs 445 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 345 over it, 4.45× 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: SplitChunksPlugin.inner_impl crates/rspack_plugin_split_chunks/src/plugin/mod.rs:93— MethodTooLong — inner_impl runs 399 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 299 over it, 3.99× 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: OutputOptionsBuilder.build crates/rspack/src/builder/mod.rs:2697— MethodTooLong — build runs 391 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 291 over it, 3.91× 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: NormalModuleFactory.resolve_normal_module crates/rspack_core/src/normal_module_factory.rs:721— MethodTooLong — resolve_normal_module runs 390 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 290 over it, 3.90× 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: ServerActions.visit_mut_module_items crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1294— MethodTooLong — visit_mut_module_items runs 354 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 254 over it, 3.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: ExternalModule.get_source crates/rspack_core/src/external_module.rs:688— MethodTooLong — get_source runs 340 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 240 over it, 3.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.
MethodTooLong: CompilerOptionsBuilder.build crates/rspack/src/builder/mod.rs:936— MethodTooLong — build 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.
MethodTooLong: ConcatenatedModule.get_final_binding crates/rspack_core/src/concatenated_module.rs:2691— MethodTooLong — get_final_binding runs 302 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 202 over it, 3.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: Stats.get_module crates/rspack_core/src/stats/mod.rs:1136— MethodTooLong — get_module runs 298 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 198 over it, 2.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.
MethodTooLong: EsmLibraryPlugin.link crates/rspack_plugin_esm_library/src/link.rs:514— MethodTooLong — link 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.
MethodTooLong: ReplaceSourceChunks.stream crates/rspack_sources/src/replace_source.rs:600— MethodTooLong — stream 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.
MethodTooLong: SplitChunksPlugin.prepare_module_group_map crates/rspack_plugin_split_chunks/src/plugin/module_group.rs:1012— MethodTooLong — prepare_module_group_map runs 285 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 185 over it, 2.85× 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: CodeSplitter.make_chunk_group crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1863— MethodTooLong — make_chunk_group runs 264 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 164 over it, 2.64× 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: ExecuteTask.main_run crates/rspack_core/src/compilation/build_module_graph/module_executor/execute.rs:195— MethodTooLong — main_run runs 264 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 164 over it, 2.64× 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: ESMExportImportedSpecifierDependency.add_export_fragments crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:517— MethodTooLong — add_export_fragments runs 262 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 162 over it, 2.62× 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: LexDependencies.lex_streaming_inner crates/css-module-lexer/src/dependencies.rs:1567— MethodTooLong — lex_streaming_inner 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.
MethodTooLong: RspackOptionsApply.process packages/rspack/src/rspackOptionsApply.ts:88— MethodTooLong — process runs 260 significant lines (blank, comment-only and punctuation-only lines excluded) 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: EsmLibraryPlugin.link_entry_module_exports crates/rspack_plugin_esm_library/src/link.rs:1789— MethodTooLong — link_entry_module_exports runs 232 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 132 over it, 2.32× 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: ImportParserPlugin.import_call crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs:386— MethodTooLong — import_call 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.
MethodTooLong: EsmLibraryPlugin.deconflict_symbols crates/rspack_plugin_esm_library/src/link.rs:1005— MethodTooLong — deconflict_symbols runs 218 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 118 over it, 2.18× 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: AssetParserAndGenerator.generate crates/rspack_plugin_asset/src/lib.rs:527— MethodTooLong — generate 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.
FileTooLong: src/dependencies.rs crates/css-module-lexer/src/dependencies.rs— FileTooLong — 3340 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: LexDependencies (3 blocks, 1430-4691). The bar is 500 significant lines; this is 2840 over it, 6.68× 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: builder/mod.rs crates/rspack/src/builder/mod.rs— FileTooLong — 2311 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 1811 over it, 4.62× 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/concatenated_module.rs crates/rspack_core/src/concatenated_module.rs— FileTooLong — 2263 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 75% of them inside a single declaration: ConcatenatedModule (7 blocks, 631-3065). The bar is 500 significant lines; this is 1763 over it, 4.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: src/link.rs crates/rspack_plugin_esm_library/src/link.rs— FileTooLong — 2179 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: EsmLibraryPlugin (78-3154). The bar is 500 significant lines; this is 1679 over it, 4.36× 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: parser_plugin/common_js_imports_parse_plugin.rs crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs— FileTooLong — 2151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 66 free functions. The bar is 500 significant lines; this is 1651 over it, 4.30× 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: build_chunk_graph/code_splitter.rs crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs— FileTooLong — 2149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: CodeSplitter (2 blocks, 351-2870). The bar is 500 significant lines; this is 1649 over it, 4.30× 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: rsc_transforms/server_actions.rs crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs— FileTooLong — 1654 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: ServerActions (3 blocks, 147-1962). The bar is 500 significant lines; this is 1154 over it, 3.31× 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: parser/walk.rs crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs— FileTooLong — 1628 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 98% of them inside a single declaration: JavascriptParser (37-2383). The bar is 500 significant lines; this is 1128 over it, 3.26× 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: plugin/module_concatenation_plugin.rs crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs— FileTooLong — 1595 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 1095 over it, 3.19× 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: plugins/interceptor.rs crates/rspack_binding_api/src/plugins/interceptor.rs— FileTooLong — 1591 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 1091 over it, 3.18× 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/rspack_resolver/src/lib.rs— FileTooLong — 1424 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 96% of them inside a single declaration: ResolverGeneric (5 blocks, 133-2369). The bar is 500 significant lines; this is 924 over it, 2.85× 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/runtime_template.rs crates/rspack_core/src/runtime_template.rs— FileTooLong — 1414 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 914 over it, 2.83× 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: parser/mod.rs crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs— FileTooLong — 1354 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: JavascriptParser (3 blocks, 472-1913). The bar is 500 significant lines; this is 854 over it, 2.71× 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: stats/mod.rs crates/rspack_core/src/stats/mod.rs— FileTooLong — 1353 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: Stats (4 blocks, 117-1720). The bar is 500 significant lines; this is 853 over it, 2.71× 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: esm/esm_export_imported_specifier_dependency.rs crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs— FileTooLong — 1350 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: ESMExportImportedSpecifierDependency (6 blocks, 52-1676). The bar is 500 significant lines; this is 850 over it, 2.70× 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/context_module.rs crates/rspack_core/src/context_module.rs— FileTooLong — 1309 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 809 over it, 2.62× 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: options/module.rs crates/rspack_core/src/options/module.rs— FileTooLong — 1249 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 749 over it, 2.50× 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: plugin/mod.rs crates/rspack_plugin_javascript/src/plugin/mod.rs— FileTooLong — 1164 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 664 over it, 2.33× 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: compilation/mod.rs crates/rspack_core/src/compilation/mod.rs— FileTooLong — 1154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 70% of them inside a single declaration: Compilation (2 blocks, 213-1313). The bar is 500 significant lines; this is 654 over it, 2.31× 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: plugin/module_group.rs crates/rspack_plugin_split_chunks/src/plugin/module_group.rs— FileTooLong — 1108 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 608 over it, 2.22× 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: parser_plugin/side_effects_parser_plugin.rs crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs— FileTooLong — 1077 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 577 over it, 2.15× 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/external_module.rs crates/rspack_core/src/external_module.rs— FileTooLong — 1031 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: ExternalModule (5 blocks, 521-1380). The bar is 500 significant lines; this is 531 over it, 2.06× 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/helpers.rs crates/rspack_sources/src/helpers.rs— FileTooLong — 1022 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 522 over it, 2.04× 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/source_map_dev_tool_plugin.rs crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs— FileTooLong — 971 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 71% of them inside a single declaration: SourceMapDevToolPlugin (3 blocks, 298-1365). The bar is 500 significant lines; this is 471 over it, 1.94× 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: parser_and_generator/generator.rs crates/rspack_plugin_css/src/parser_and_generator/generator.rs— FileTooLong — 950 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: CssModuleGenerator (3 blocks, 78-1124). The bar is 500 significant lines; this is 450 over it, 1.90× 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.
Hotspot: packages/rspack/src/loader-runner/index.ts packages/rspack/src/loader-runner/index.ts:249— packages/rspack/src/loader-runner/index.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 139 in index.runLoaders at line 249. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- packages/rspack/src/loader-runner/index.ts`: 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/rspack_core/src/concatenated_module.rs crates/rspack_core/src/concatenated_module.rs:1009— crates/rspack_core/src/concatenated_module.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in ConcatenatedModule::code_generation at line 1009. 6 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_core/src/concatenated_module.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/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:1048— crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in ModuleConcatenationPlugin::optimize_chunk_modules_impl at line 1048. 6 of those changes were fix/bug commits, and the other 14 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.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/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1792— crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in JavascriptParser::evaluating at line 1792. 7 of those changes were fix/bug commits, and the other 27 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/visitors/dependency/parser/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/rspack_plugin_esm_library/src/link.rs crates/rspack_plugin_esm_library/src/link.rs:2111— crates/rspack_plugin_esm_library/src/link.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in EsmLibraryPlugin::link_imports_and_exports at line 2111. 4 of those changes were fix/bug commits, and the other 7 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_esm_library/src/link.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/rspack_core/src/normal_module_factory.rs crates/rspack_core/src/normal_module_factory.rs:721— crates/rspack_core/src/normal_module_factory.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in NormalModuleFactory::resolve_normal_module at line 721. 4 of those changes were fix/bug commits, and the other 9 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_core/src/normal_module_factory.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/rspack_plugin_javascript/src/plugin/mod.rs crates/rspack_plugin_javascript/src/plugin/mod.rs:262— crates/rspack_plugin_javascript/src/plugin/mod.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in JsPlugin::render_webpack_bootstrap at line 262. 6 of those changes were fix/bug commits, and the other 9 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/plugin/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/rspack_core/src/external_module.rs crates/rspack_core/src/external_module.rs:688— crates/rspack_core/src/external_module.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in ExternalModule::get_source at line 688. 4 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_core/src/external_module.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: packages/rspack/src/rspackOptionsApply.ts packages/rspack/src/rspackOptionsApply.ts:88— packages/rspack/src/rspackOptionsApply.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in RspackOptionsApply.process at line 88. 4 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- packages/rspack/src/rspackOptionsApply.ts`: 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/rspack_plugin_esm_library/src/render.rs crates/rspack_plugin_esm_library/src/render.rs:131— crates/rspack_plugin_esm_library/src/render.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in EsmLibraryPlugin::render_chunk at line 131. 3 of those changes were fix/bug commits, and the other 6 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_esm_library/src/render.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/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:626— crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in JavascriptParser::walk_expression at line 626. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.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/rspack_plugin_javascript/src/plugin/runtime_context.rs crates/rspack_plugin_javascript/src/plugin/runtime_context.rs:135— crates/rspack_plugin_javascript/src/plugin/runtime_context.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in JsPlugin::render_rspack_bootstrap at line 135. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/plugin/runtime_context.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/rspack_binding_api/src/raw_options/raw_builtins/mod.rs crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs:308— crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in BuiltinPlugin::append_to 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_binding_api/src/raw_options/raw_builtins/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/rspack_plugin_split_chunks/src/plugin/mod.rs crates/rspack_plugin_split_chunks/src/plugin/mod.rs:93— crates/rspack_plugin_split_chunks/src/plugin/mod.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in SplitChunksPlugin::inner_impl at line 93. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_split_chunks/src/plugin/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: packages/rspack/src/config/defaults.ts packages/rspack/src/config/defaults.ts:66— packages/rspack/src/config/defaults.ts changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in defaults.applyRspackOptionsDefaults at line 66. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- packages/rspack/src/config/defaults.ts`: 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/css-module-lexer/src/dependencies.rs crates/css-module-lexer/src/dependencies.rs:1567— crates/css-module-lexer/src/dependencies.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 82 in LexDependencies::lex_streaming_inner at line 1567. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/css-module-lexer/src/dependencies.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: packages/rspack/src/loader-runner/worker.ts packages/rspack/src/loader-runner/worker.ts:69— packages/rspack/src/loader-runner/worker.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in worker.loaderImpl at line 69. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- packages/rspack/src/loader-runner/worker.ts`: 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/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:262— crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in AMDDefineDependencyParserPlugin::process_call_define at line 262. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.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/rspack_core/src/context_module.rs crates/rspack_core/src/context_module.rs:1628— crates/rspack_core/src/context_module.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in rspack_core::context_module::create_identifier at line 1628. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_core/src/context_module.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/rspack_plugin_split_chunks/src/plugin/module_group.rs crates/rspack_plugin_split_chunks/src/plugin/module_group.rs:1012— crates/rspack_plugin_split_chunks/src/plugin/module_group.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in SplitChunksPlugin::prepare_module_group_map at line 1012. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_split_chunks/src/plugin/module_group.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/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:106— crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in InnerGraphParserPlugin::infer_dependency_usage at line 106. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.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/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1147— crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in CodeSplitter::split at line 1147. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.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/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs:386— crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in ImportParserPlugin::import_call at line 386. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.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/rspack/src/builder/mod.rs crates/rspack/src/builder/mod.rs:3489— crates/rspack/src/builder/mod.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in OptimizationOptionsBuilder::build at line 3489. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack/src/builder/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/rspack_plugin_swc_js_minimizer/src/lib.rs crates/rspack_plugin_swc_js_minimizer/src/lib.rs:223— crates/rspack_plugin_swc_js_minimizer/src/lib.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in rspack_plugin_swc_js_minimizer::process_assets at line 223. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_swc_js_minimizer/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.
FunctionTooLong: index.runLoaders packages/rspack/src/loader-runner/index.ts:249— FunctionTooLong — runLoaders runs 724 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 624 over it, 7.24× 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: rspack_plugin_mf::manifest::process_assets crates/rspack_plugin_mf/src/manifest/mod.rs:163— FunctionTooLong — rspack_plugin_mf::manifest::process_assets runs 482 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 382 over it, 4.82× 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: rspack_plugin_hmr::process_assets crates/rspack_plugin_hmr/src/lib.rs:153— FunctionTooLong — rspack_plugin_hmr::process_assets runs 350 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 250 over it, 3.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: rspack_sources::helpers::stream_chunks_of_combined_source_map crates/rspack_sources/src/helpers.rs:935— FunctionTooLong — rspack_sources::helpers::stream_chunks_of_combined_source_map runs 348 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 248 over it, 3.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: rspack_core::compilation::create_hash::create_hash crates/rspack_core/src/compilation/create_hash/mod.rs:34— FunctionTooLong — rspack_core::compilation::create_hash::create_hash runs 334 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 234 over it, 3.34× 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: rspack_core::compilation::runtime_requirements::process_chunks_runtime_requirements crates/rspack_core/src/compilation/runtime_requirements/mod.rs:297— FunctionTooLong — rspack_core::compilation::runtime_requirements::process_chunks_runtime_requirements runs 281 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 181 over it, 2.81× 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: rspack_plugin_javascript::plugin::impl_plugin_for_js_plugin::compilation crates/rspack_plugin_javascript/src/plugin/impl_plugin_for_js_plugin.rs:54— FunctionTooLong — rspack_plugin_javascript::plugin::impl_plugin_for_js_plugin::compilation runs 278 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 178 over it, 2.78× 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: rspack_plugin_runtime::runtime_plugin::runtime_requirements_in_tree crates/rspack_plugin_runtime/src/runtime_plugin.rs:157— FunctionTooLong — rspack_plugin_runtime::runtime_plugin::runtime_requirements_in_tree runs 275 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 175 over it, 2.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.
FunctionTooLong: rspack::builder::browserslist_target::resolve crates/rspack/src/builder/browserslist_target.rs:70— FunctionTooLong — rspack::builder::browserslist_target::resolve runs 252 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 152 over it, 2.52× 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: rspack_plugin_swc_js_minimizer::process_assets crates/rspack_plugin_swc_js_minimizer/src/lib.rs:223— FunctionTooLong — rspack_plugin_swc_js_minimizer::process_assets runs 250 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 150 over it, 2.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: rspack_plugin_css_chunking::optimize_chunks crates/rspack_plugin_css_chunking/src/lib.rs:73— FunctionTooLong — rspack_plugin_css_chunking::optimize_chunks runs 235 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 135 over it, 2.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.
FunctionTooLong: rspack_core::options::resolve::clever_merge::_merge_resolve crates/rspack_core/src/options/resolve/clever_merge.rs:194— FunctionTooLong — rspack_core::options::resolve::clever_merge::_merge_resolve runs 216 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 116 over it, 2.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.
FunctionTooLong: CommunityCompatibleTable.CommunityPluginCompatibleTable website/components/CommunityCompatibleTable.tsx:68— FunctionTooLong — CommunityPluginCompatibleTable runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.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.
FunctionTooLong: rspack::builder::target::get_target_properties crates/rspack/src/builder/target.rs:245— FunctionTooLong — rspack::builder::target::get_target_properties runs 192 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 92 over it, 1.92× 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: rspack_plugin_javascript::runtime::render_module crates/rspack_plugin_javascript/src/runtime.rs:131— FunctionTooLong — rspack_plugin_javascript::runtime::render_module runs 183 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 83 over it, 1.83× 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: rspack_plugin_real_content_hash::inner_impl crates/rspack_plugin_real_content_hash/src/lib.rs:78— FunctionTooLong — rspack_plugin_real_content_hash::inner_impl runs 182 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 82 over it, 1.82× 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: rspack_plugin_limit_chunk_count::optimize_chunks crates/rspack_plugin_limit_chunk_count/src/lib.rs:56— FunctionTooLong — rspack_plugin_limit_chunk_count::optimize_chunks runs 179 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 79 over it, 1.79× 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: rspack_plugin_javascript::runtime_context::render_runtime_chunk_runtime_modules_sync crates/rspack_plugin_javascript/src/runtime_context.rs:198— FunctionTooLong — rspack_plugin_javascript::runtime_context::render_runtime_chunk_runtime_modules_sync 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.
FunctionTooLong: RuntimeGlobals.renderRuntimeGlobals packages/rspack/src/RuntimeGlobals.ts:525— FunctionTooLong — renderRuntimeGlobals runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
FunctionTooLong: rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_get_linking_error crates/rspack_plugin_javascript/src/dependency/esm/esm_import_dependency.rs:280— FunctionTooLong — rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_get_linking_error 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: rspack::builder::default_rules crates/rspack/src/builder/mod.rs:1918— FunctionTooLong — rspack::builder::default_rules 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.
FunctionTooLong: rspack_plugin_esm_library::preserve_modules::preserve_modules crates/rspack_plugin_esm_library/src/preserve_modules.rs:114— FunctionTooLong — rspack_plugin_esm_library::preserve_modules::preserve_modules runs 168 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 68 over it, 1.68× 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: rspack_plugin_esm_library::split_chunks::split crates/rspack_plugin_esm_library/src/split_chunks.rs:176— FunctionTooLong — rspack_plugin_esm_library::split_chunks::split 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: Diagnostics.createDiagnosticArray packages/rspack/src/Diagnostics.ts:7— FunctionTooLong — createDiagnosticArray runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.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.
FunctionTooLong: rspack_ids::named_chunk_ids_plugin::assign_named_chunk_ids crates/rspack_ids/src/named_chunk_ids_plugin.rs:19— FunctionTooLong — rspack_ids::named_chunk_ids_plugin::assign_named_chunk_ids 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.
rspack_plugin_javascript::magic_comment::analyze_raw_comments (cognitive 89) crates/rspack_plugin_javascript/src/magic_comment.rs:609— rspack_plugin_javascript::magic_comment::analyze_raw_comments has cognitive complexity 89 (threshold 15). Drivers by points: if/else 30 (78 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_get_linking_error (cognitive 59) crates/rspack_plugin_javascript/src/dependency/esm/esm_import_dependency.rs:280— rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_get_linking_error has cognitive complexity 59 (threshold 15). Drivers by points: if/else 21 (48 pts), boolean chains 7, loops 1 (3 pts), match/switch 1 (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.
rspack_plugin_javascript::runtime_context::render_runtime_chunk_runtime_modules_sync (cognitive 51) crates/rspack_plugin_javascript/src/runtime_context.rs:198— rspack_plugin_javascript::runtime_context::render_runtime_chunk_runtime_modules_sync has cognitive complexity 51 (threshold 15). Drivers by points: if/else 22 (34 pts), loops 6 (11 pts), boolean chains 4, match/switch 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.
rspack_plugin_javascript::visitors::dependency::context_dependency_helper::create_context_dependency (cognitive 51) crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:24— rspack_plugin_javascript::visitors::dependency::context_dependency_helper::create_context_dependency has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (36 pts), match/switch 3 (8 pts), loops 2 (5 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.
rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_add (cognitive 49) crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:302— rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_add has cognitive complexity 49 (threshold 15). Drivers by points: if/else 30 (45 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.
rspack_plugin_javascript::plugin::flag_dependency_usage_plugin::process_referenced_module_without_nested (cognitive 45) crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:774— rspack_plugin_javascript::plugin::flag_dependency_usage_plugin::process_referenced_module_without_nested has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (42 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 27). 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.
rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_const_operation (cognitive 43) crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:436— rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_const_operation has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 6 (14 pts), boolean chains 5 (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.
rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::collect_pure_annotations (cognitive 42) crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:177— rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::collect_pure_annotations has cognitive complexity 42 (threshold 15). Drivers by points: if/else 5 (20 pts), match/switch 5 (15 pts), boolean chains 6, loops 1 (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.
rspack_plugin_javascript::runtime::render_module (cognitive 36) crates/rspack_plugin_javascript/src/runtime.rs:131— rspack_plugin_javascript::runtime::render_module has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 6, loops 1 (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.
rspack_plugin_javascript::parser_plugin::side_effects_analysis::may_have_side_effects (cognitive 33) crates/rspack_plugin_javascript/src/parser_plugin/side_effects_analysis.rs:56— rspack_plugin_javascript::parser_plugin::side_effects_analysis::may_have_side_effects has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 5 (9 pts), boolean chains 8 (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.
rspack_plugin_javascript::parser_plugin::api_plugin::static_require_member_chain (cognitive 30) crates/rspack_plugin_javascript/src/parser_plugin/api_plugin.rs:476— rspack_plugin_javascript::parser_plugin::api_plugin::static_require_member_chain has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (28 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.
rspack_plugin_javascript::parser_plugin::const::if_stmt::get_hoisted_declarations (cognitive 30) crates/rspack_plugin_javascript/src/parser_plugin/const/if_stmt.rs:60— rspack_plugin_javascript::parser_plugin::const::if_stmt::get_hoisted_declarations has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (7 pts), 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.
rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::mark_auto_side_effects_free_program (cognitive 29) crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:352— rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::mark_auto_side_effects_free_program has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (20 pts), match/switch 2 (5 pts), boolean chains 3, 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.
rspack_plugin_javascript::plugin::mangle_exports_plugin::mangle_exports_info (cognitive 28) crates/rspack_plugin_javascript/src/plugin/mangle_exports_plugin.rs:300— rspack_plugin_javascript::plugin::mangle_exports_plugin::mangle_exports_info has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (13 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.
rspack_plugin_javascript::plugin::side_effects_flag_plugin::optimize_dependencies (cognitive 27) crates/rspack_plugin_javascript/src/plugin/side_effects_flag_plugin.rs:329— rspack_plugin_javascript::plugin::side_effects_flag_plugin::optimize_dependencies has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 11). Of this number, 15 points are the body's own statements and 12 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.
rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_apply (cognitive 26) crates/rspack_plugin_javascript/src/dependency/esm/esm_import_dependency.rs:115— rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_apply has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 4, 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.
rspack_plugin_javascript::plugin::mangle_exports_plugin::optimize_code_generation (cognitive 26) crates/rspack_plugin_javascript/src/plugin/mangle_exports_plugin.rs:132— rspack_plugin_javascript::plugin::mangle_exports_plugin::optimize_code_generation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 4 (6 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.
rspack_plugin_javascript::runtime_context::render_hot_update_chunk_runtime_modules (cognitive 24) crates/rspack_plugin_javascript/src/runtime_context.rs:506— rspack_plugin_javascript::runtime_context::render_hot_update_chunk_runtime_modules has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (6 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.
rspack_plugin_javascript::utils::eval::is_valid_reg_exp_flags (cognitive 24) crates/rspack_plugin_javascript/src/utils/eval/mod.rs:804— rspack_plugin_javascript::utils::eval::is_valid_reg_exp_flags has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 1 (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.
rspack_plugin_javascript::parser_plugin::const::logic_expr::expression_logic_operator (cognitive 21) crates/rspack_plugin_javascript/src/parser_plugin/const/logic_expr.rs:9— rspack_plugin_javascript::parser_plugin::const::logic_expr::expression_logic_operator has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 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.
rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::collect_defined_configured_side_effects_free (cognitive 21) crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:90— rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::collect_defined_configured_side_effects_free has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 2 (5 pts), loops 2 (4 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.
rspack_plugin_javascript::utils::eval::eval_new_expr::eval_new_expression (cognitive 20) crates/rspack_plugin_javascript/src/utils/eval/eval_new_expr.rs:12— rspack_plugin_javascript::utils::eval::eval_new_expr::eval_new_expression has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 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.
rspack_plugin_javascript::dependency::branch_guard::resolve_esm_imported_in_operator_guard (cognitive 19) crates/rspack_plugin_javascript/src/dependency/branch_guard.rs:311— rspack_plugin_javascript::dependency::branch_guard::resolve_esm_imported_in_operator_guard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 2 (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.
rspack_plugin_javascript::parser_plugin::side_effects_analysis::class_has_side_effects (cognitive 19) crates/rspack_plugin_javascript/src/parser_plugin/side_effects_analysis.rs:344— rspack_plugin_javascript::parser_plugin::side_effects_analysis::class_has_side_effects has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 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.
rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_strict_equality_comparison (cognitive 19) crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:81— rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_strict_equality_comparison has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 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.
Sync-over-async blocking packages/rspack-cli/src/utils/loadConfig.ts:216— `fs.existsSync` in `loadExtendedConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-cli/src/utils/loadConfig.ts:261— `fs.existsSync` in `loadRspackConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-cli/tests/utils/test-utils.ts:406— `fs.existsSync` in `uniqueDirectoryForTest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-cli/tests/utils/test-utils.ts:407— `fs.mkdirSync` in `uniqueDirectoryForTest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/common.ts:133— `fs.writeFileSync` in `check` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/common.ts:151— `fs.writeFileSync` in `check` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/watch.ts:96— `fs.mkdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/watch.ts:104— `fs.existsSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/watch.ts:107— `fs.utimesSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/watch.ts:147— `fs.writeFileSync` in `check` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/watch.ts:198— `fs.writeFileSync` in `check` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/watch.ts:255— `fs.renameSync` in `check` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/case/watch.ts:261— `fs.renameSync` in `check` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/runner/node/index.ts:548— `fs.readFileSync` in `importModuleDynamically` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/test/tester.ts:37— `fs.mkdirSync` in `prepare` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack-test-tools/src/test/tester.ts:40— `fs.mkdirSync` in `prepare` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/rspack/src/builtin-plugin/html-plugin/plugin.ts:134— `fs.existsSync` in `templateFn` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking tests/rspack-test/compilerCases/binding-entry-dependency.mjs:124— `fs.rmSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking tests/rspack-test/compilerCases/binding-entry-dependency.mjs:251— `fs.rmSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking tests/rspack-test/compilerCases/changes-and-removals.mjs:74— `fs.appendFileSync` in `callback to setTimeout` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking tests/rspack-test/compilerCases/changes-and-removals.mjs:117— `fs.unlinkSync` in `callback to setTimeout` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking tests/rspack-test/compilerCases/lazy-compilation-entry-renamed.js:114— `fs.rmSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking tests/rspack-test/compilerCases/lazy-compilation-entry-to-import.js:122— `fs.rmSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking tests/rspack-test/compilerCases/lazy-compilation-reactivate.js:124— `fs.rmSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking tests/rspack-test/compilerCases/module-cache-build-meta-recovery.mjs:63— `fs.writeFileSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
+ 15 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×40
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:1— `var("cssLoadingUniqueName")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:2— `fn("handleCssComposes")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:7— `REQUIRE` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:11— `var("loadingAttribute")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:12— `var("cssLoadStylesheet")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:21— `PUBLIC_PATH` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:23— `PUBLIC_PATH` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:38— `_create_link` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:40— `basicFunction("prev, event")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading.ejs:51— `_chunk_load_timeout` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_create_link.ejs:2— `weak(SCRIPT_NONCE)` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_create_link.ejs:3— `weak(SCRIPT_NONCE)` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_create_link.ejs:20— `_cross_origin` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:1— `var("cssOldTags")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:2— `var("cssNewTags")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:3— `var("cssApplyHandler")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:5— `basicFunction("")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:6— `basicFunction("")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:7— `basicFunction("newTag")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:20— `var("cssInitialChunkIds")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:23— `var("cssChunkIsLoaded")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:24— `_js_state_expression` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:26— `HMR_DOWNLOAD_UPDATE_HANDLERS` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:37— `basicFunction("chunkId")` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped crates/rspack_plugin_css/src/runtime/css_loading_with_hmr.ejs:38— `GET_CHUNK_CSS_FILENAME` is text this program did not author, and it is written into the text of an element through EJS's raw `<%- %>` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
rspack_core::options::resolve::clever_merge::_merge_resolve (cognitive 264) crates/rspack_core/src/options/resolve/clever_merge.rs:194— rspack_core::options::resolve::clever_merge::_merge_resolve has cognitive complexity 264 (threshold 15). Drivers by points: if/else 93 (178 pts), loops 42 (86 pts) (nesting depth added 129). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rspack_core::options::resolve::clever_merge::parse_resolve (cognitive 261) crates/rspack_core/src/options/resolve/clever_merge.rs:76— rspack_core::options::resolve::clever_merge::parse_resolve has cognitive complexity 261 (threshold 15). Drivers by points: if/else 81 (181 pts), loops 40 (80 pts) (nesting depth added 140). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rspack_core::utils::find_graph_roots::find_graph_roots (cognitive 103) crates/rspack_core/src/utils/find_graph_roots.rs:59— rspack_core::utils::find_graph_roots::find_graph_roots has cognitive complexity 103 (threshold 15). Drivers by points: if/else 19 (66 pts), loops 10 (32 pts), match/switch 1 (5 pts) (nesting depth added 73). 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.
rspack_core::utils::module_rules::module_rule_matcher_async (cognitive 75) crates/rspack_core/src/utils/module_rules.rs:267— rspack_core::utils::module_rules::module_rule_matcher_async has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (48 pts), loops 5 (14 pts), boolean chains 13 (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.
rspack_core::compilation::create_hash::create_hash (cognitive 65) crates/rspack_core/src/compilation/create_hash/mod.rs:34— rspack_core::compilation::create_hash::create_hash has cognitive complexity 65 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 14 (22 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 25). Of this number, 61 points are the body's own statements and 4 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.
rspack_core::compilation::runtime_requirements::process_chunks_runtime_requirements (cognitive 64) crates/rspack_core/src/compilation/runtime_requirements/mod.rs:297— rspack_core::compilation::runtime_requirements::process_chunks_runtime_requirements has cognitive complexity 64 (threshold 15). Drivers by points: loops 17 (32 pts), if/else 14 (30 pts), boolean chains 2 (nesting depth added 31). 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.
rspack_core::module::get_exports_type_impl (cognitive 57) crates/rspack_core/src/module.rs:924— rspack_core::module::get_exports_type_impl has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (45 pts), match/switch 4 (12 pts) (nesting depth added 35). Of this number, 54 points are the body's own statements and 3 belong to one function item inside it that branches. 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.
rspack_core::resolver::resolve_for_error_hints (cognitive 51) crates/rspack_core/src/resolver/mod.rs:115— rspack_core::resolver::resolve_for_error_hints has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (42 pts), loops 1 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 27). 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.
rspack_core::utils::module_rules::module_rule_matcher_sync (cognitive 50) crates/rspack_core/src/utils/module_rules.rs:115— rspack_core::utils::module_rules::module_rule_matcher_sync has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (29 pts), loops 5 (14 pts), match/switch 3 (7 pts) (nesting depth added 17). 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.
rspack_core::compilation::create_module_hashes::create_module_hashes_pass_impl (cognitive 49) crates/rspack_core/src/compilation/create_module_hashes/mod.rs:23— rspack_core::compilation::create_module_hashes::create_module_hashes_pass_impl has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 3 (9 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 32). 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.
rspack_core::stats::utils::get_chunk_relations (cognitive 49) crates/rspack_core/src/stats/utils.rs:226— rspack_core::stats::utils::get_chunk_relations has cognitive complexity 49 (threshold 15). Drivers by points: if/else 6 (26 pts), loops 6 (20 pts), boolean chains 3 (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.
rspack_core::utils::compile_boolean_matcher::items_to_regexp (cognitive 38) crates/rspack_core/src/utils/compile_boolean_matcher.rs:80— rspack_core::utils::compile_boolean_matcher::items_to_regexp has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (30 pts), boolean chains 4, loops 3 (4 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.
rspack_core::runtime_template::runtime_globals_to_render_map (cognitive 35) crates/rspack_core/src/runtime_template.rs:418— rspack_core::runtime_template::runtime_globals_to_render_map has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (31 pts), match/switch 1 (2 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.
rspack_core::compilation::build_chunk_graph::code_splitter::extract_block_modules (cognitive 32) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2963— rspack_core::compilation::build_chunk_graph::code_splitter::extract_block_modules has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 4 (6 pts), boolean chains 2 (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.
rspack_core::context_module::create_identifier (cognitive 28) crates/rspack_core/src/context_module.rs:1628— rspack_core::context_module::create_identifier has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23 (26 pts), boolean chains 1, 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.
rspack_core::exports::target::resolve_target (cognitive 24) crates/rspack_core/src/exports/target.rs:215— rspack_core::exports::target::resolve_target has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 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.
rspack_core::compilation::create_chunk_assets::create_chunk_assets (cognitive 23) crates/rspack_core/src/compilation/create_chunk_assets/mod.rs:27— rspack_core::compilation::create_chunk_assets::create_chunk_assets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (6 pts), match/switch 2 (4 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.
rspack_core::context_module_factory::alternative_requests (cognitive 22) crates/rspack_core/src/context_module_factory.rs:699— rspack_core::context_module_factory::alternative_requests has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 6 (9 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.
rspack_core::stats::utils::get_chunk_child_ids_by_order (cognitive 22) crates/rspack_core/src/stats/utils.rs:167— rspack_core::stats::utils::get_chunk_child_ids_by_order has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 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.
rspack_core::utils::extract_source_map::extract_source_map (cognitive 22) crates/rspack_core/src/utils/extract_source_map.rs:332— rspack_core::utils::extract_source_map::extract_source_map has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 2, boolean chains 1, 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.
rspack_core::compilation::runtime_requirements::runtime_requirements_pass_impl (cognitive 21) crates/rspack_core/src/compilation/runtime_requirements/mod.rs:28— rspack_core::compilation::runtime_requirements::runtime_requirements_pass_impl has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (8 pts), match/switch 3 (6 pts), if/else 5, 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.
rspack_core::context_module_factory::visit_dirs (cognitive 21) crates/rspack_core/src/context_module_factory.rs:505— rspack_core::context_module_factory::visit_dirs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5, loops 1 (2 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.
rspack_core::utils::extract_source_map::trailing_source_mapping_url_range (cognitive 21) crates/rspack_core/src/utils/extract_source_map.rs:81— rspack_core::utils::extract_source_map::trailing_source_mapping_url_range has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 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.
rspack_core::compilation::code_generation::code_generation_modules (cognitive 20) crates/rspack_core/src/compilation/code_generation/mod.rs:128— rspack_core::compilation::code_generation::code_generation_modules has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3 (4 pts), match/switch 1 (2 pts), boolean chains 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.
rspack_core::dependency::create_referenced_exports_by_referenced_specifiers (cognitive 20) crates/rspack_core/src/dependency/mod.rs:298— rspack_core::dependency::create_referenced_exports_by_referenced_specifiers 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.
ClassTooLong: LexDependencies crates/css-module-lexer/src/dependencies.rs:1430— ClassTooLong — 2415 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 68 methods, 3 blocks, lines 1430-4691. The bar is 400 significant lines; this is 2015 over it, 6.04× 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: CodeSplitter crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:351— ClassTooLong — 1749 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 37 methods, 2 blocks, lines 351-2870. The bar is 400 significant lines; this is 1349 over it, 4.37× 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: ConcatenatedModule crates/rspack_core/src/concatenated_module.rs:631— ClassTooLong — 1706 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 7 blocks, lines 631-3065. The bar is 400 significant lines; this is 1306 over it, 4.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: ResolverGeneric crates/rspack_resolver/src/lib.rs:133— ClassTooLong — 1374 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 58 methods, 5 blocks, lines 133-2369. The bar is 400 significant lines; this is 974 over it, 3.44× 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: Stats crates/rspack_core/src/stats/mod.rs:117— ClassTooLong — 1231 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 4 blocks, lines 117-1720. The bar is 400 significant lines; this is 831 over it, 3.08× 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: ESMExportImportedSpecifierDependency crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:52— ClassTooLong — 1192 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, 6 blocks, lines 52-1676. The bar is 400 significant lines; this is 792 over it, 2.98× 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: ServerActions crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:147— ClassTooLong — 1104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 3 blocks, lines 147-1962. The bar is 400 significant lines; this is 704 over it, 2.76× 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: JavascriptParser crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:472— ClassTooLong — 1044 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 230 methods, 3 blocks, lines 472-1913. The bar is 400 significant lines; this is 644 over it, 2.61× 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: CommonJsImportsParserPlugin crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:1598— ClassTooLong — 951 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 2 blocks, lines 1600-2855. The bar is 400 significant lines; this is 551 over it, 2.38× 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: ModuleConcatenationPlugin crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:439— ClassTooLong — 890 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 9 methods, 3 blocks, lines 439-1782. The bar is 400 significant lines; this is 490 over it, 2.23× 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: RstestParserPlugin crates/rspack_plugin_rstest/src/parser_plugin.rs:139— ClassTooLong — 839 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, 3 blocks, lines 139-1362. The bar is 400 significant lines; this is 439 over it, 2.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.
ClassTooLong: Compilation crates/rspack_core/src/compilation/mod.rs:213— ClassTooLong — 809 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 56 methods, 2 blocks, lines 213-1313. The bar is 400 significant lines; this is 409 over it, 2.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: CssModuleGenerator crates/rspack_plugin_css/src/parser_and_generator/generator.rs:78— ClassTooLong — 785 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 41 methods, 3 blocks, lines 78-1124. The bar is 400 significant lines; this is 385 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: JsCompilation crates/rspack_binding_api/src/compilation/mod.rs:49— ClassTooLong — 736 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 57 methods, 3 blocks, lines 49-1107. The bar is 400 significant lines; this is 336 over it, 1.84× 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: ModuleGraph crates/rspack_core/src/module_graph/mod.rs:162— ClassTooLong — 735 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 72 methods, 3 blocks, lines 162-1214. The bar is 400 significant lines; this is 335 over it, 1.84× 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: SourceMapDevToolPlugin crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:298— ClassTooLong — 688 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, 3 blocks, lines 298-1365. The bar is 400 significant lines; this is 288 over it, 1.72× 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: OutputOptionsBuilder crates/rspack/src/builder/mod.rs:2174— ClassTooLong — 686 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, 4 blocks, lines 2174-3244. The bar is 400 significant lines; this is 286 over it, 1.72× 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: Compiler packages/rspack/src/Compiler.ts:143— ClassTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 259 over it, 1.65× 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: ExternalModule crates/rspack_core/src/external_module.rs:521— ClassTooLong — 627 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, 5 blocks, lines 521-1380. The bar is 400 significant lines; this is 227 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.
ClassTooLong: Chunk crates/rspack_core/src/chunk.rs:95— ClassTooLong — 621 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 59 methods, 3 blocks, lines 95-1022. The bar is 400 significant lines; this is 221 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: NormalModule crates/rspack_core/src/normal_module.rs:96— 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), 19 methods, 8 blocks, lines 96-982. 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: FileSystemInfo crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:116— ClassTooLong — 614 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 29 methods, 3 blocks, lines 116-1001. The bar is 400 significant lines; this is 214 over it, 1.54× 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: InnerGraphParserPlugin crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:46— ClassTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 3 blocks, lines 46-943. The bar is 400 significant lines; this is 206 over it, 1.52× 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: JavaScriptParserPluginDrive crates/rspack_plugin_javascript/src/parser_plugin/drive.rs:26— ClassTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 3 blocks, lines 26-943. The bar is 400 significant lines; this is 206 over it, 1.52× 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: AssetParserAndGenerator crates/rspack_plugin_asset/src/lib.rs:71— ClassTooLong — 579 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, 3 blocks, lines 71-878. The bar is 400 significant lines; this is 179 over it, 1.45× 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.
+ 9 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×33
No test reaches this file packages/rspack/src/config/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/rspack/src/loader-runner/worker.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 REDACTED: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 REDACTED: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 scripts/build-npm.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/rspack/src/browser/BrowserHttpImportEsmPlugin.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 crates/node_binding/scripts/build.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 crates/rspack_binding_builder_testing/binding.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 crates/node_binding/scripts/add-external-debug-info.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 scripts/release/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/create-rspack/src/index.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 crates/node_binding/rspack.wasi-browser.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 scripts/allocative-driver.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/rspack/src/browser/BrowserRequirePlugin.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 crates/rspack_loader_preact_refresh/src/runtime.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 crates/rspack_binding_builder_testing/scripts/build.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 crates/node_binding/wasi-worker.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 scripts/release/publish.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 scripts/debug/launch.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 crates/node_binding/wasi-worker-browser.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 scripts/release/cargo-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 crates/node_binding/scripts/dts-header.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/rspack/src/browser/service.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 crates/node_binding/scripts/move-binding.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 crates/node_binding/webcontainer-fallback.cjs: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.
Change coupling: eval_dev_tool_module_plugin.rs ↔ eval_source_map_dev_tool_plugin.rs crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:1— `crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs` and `crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs` change together 79% of the time (11 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 11 shared commits counted here, the most recent 3 are `c878703d` perf: improve get chunk modules (#11579); `62c8e9e7` feat: support using declaration (#11395); `096bf260` fix: render namespace template in devtool plugins (#10448) — run `git show` on any of them.
Change coupling: assign_library_plugin.rs ↔ export_property_library_plugin.rs crates/rspack_plugin_library/src/assign_library_plugin.rs:1— `crates/rspack_plugin_library/src/assign_library_plugin.rs` and `crates/rspack_plugin_library/src/export_property_library_plugin.rs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 `2f54e648` refactor: make finishModules readonly for compilation (#13058); `e04df144` refactor: improve exports info (#12587); `7382ba2b` refactor: remove get_make_module_graph_mut api (#12575) — run `git show` on any of them.
Change coupling: common_js_require_context_dependency.rs ↔ import_context_dependency.rs crates/rspack_plugin_javascript/src/dependency/context/common_js_require_context_dependency.rs:1— `crates/rspack_plugin_javascript/src/dependency/context/common_js_require_context_dependency.rs` and `crates/rspack_plugin_javascript/src/dependency/context/import_context_dependency.rs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 `2e3a54eb` fix: empty references export for cjs and dynamic import tree shaking …; `c0a82b3a` feat: amd context require (#9495); `1d125ac4` refactor: use `RealDependencyLocation` instead of `range` in dependen… — run `git show` on any of them.
Change coupling: node.rs ↔ write.rs crates/rspack_binding_api/src/fs_node/node.rs:1— `crates/rspack_binding_api/src/fs_node/node.rs` and `crates/rspack_fs/src/write.rs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 8 shared commits counted here, the most recent 3 are `96e2777d` refactor: simplify file system code (#8654) (at that commit the file was still `crates/rspack_fs_node/src/node.rs`); `b77d7de1` refactor: rspack_fs use `Utf8Path` and `FileMetadata` (#8366) (at that commit the files were still `crates/rspack_fs_node/src/node.rs` and `crates/rspack_fs/src/async.rs`); `26801202` feat: add read API to output file system (#8274) (at that commit the files were still `crates/rspack_fs_node/src/node.rs` and `crates/rspack_fs/src/async.rs`) — run `git show` on any of them.
Change coupling: mod.rs ↔ defaults.ts crates/rspack_binding_api/src/raw_options/raw_experiments/mod.rs:1— `crates/rspack_binding_api/src/raw_options/raw_experiments/mod.rs` and `packages/rspack/src/config/defaults.ts` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `1ea0d42a` feat(cache): add fine-grained new cache options (#15261); `b67cad2e` feat!: remove `experiments.lazyBarrel` (#12724); `ffafc655` feat!: remove `experiments.topLevelAwait` (#12722) — run `git show` on any of them.
Change coupling: mod.rs ↔ normalization.ts crates/rspack_binding_api/src/raw_options/raw_experiments/mod.rs:1— `crates/rspack_binding_api/src/raw_options/raw_experiments/mod.rs` and `packages/rspack/src/config/normalization.ts` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `1ea0d42a` feat(cache): add fine-grained new cache options (#15261); `b67cad2e` feat!: remove `experiments.lazyBarrel` (#12724); `ffafc655` feat!: remove `experiments.topLevelAwait` (#12722) — run `git show` on any of them.
Change coupling: raw_resolve.rs ↔ clever_merge.rs crates/rspack_binding_api/src/options/raw_resolve.rs:1— `crates/rspack_binding_api/src/options/raw_resolve.rs` and `crates/rspack_core/src/options/resolve/clever_merge.rs` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 `72d1b7fb` feat(pnp)!: drop multi yarn pnp project resolving (#13389); `fb8c2cc1` feat: Add `pnp_manifest` option to resolver (#12417); `89c37fbf` fix: buildDependencies skip resolve nodejs builtin module (#11256) — run `git show` on any of them.
Change coupling: index.ts ↔ worker.ts packages/rspack/src/loader-runner/index.ts:1— `packages/rspack/src/loader-runner/index.ts` and `packages/rspack/src/loader-runner/worker.ts` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 9 shared commits counted here, the most recent 3 are `858fd43f` feat(loader): support buildInfo custom fields in parallel loaders (#1…; `8e0da07e` fix: preserve diagnostics returned by importModule (#15496); `2856c504` feat(javascript): add JavascriptModulesPlugin.getChunkFilenameTemplat… — run `git show` on any of them.
Change coupling: clever_merge.rs ↔ resolver_impl.rs crates/rspack_core/src/options/resolve/clever_merge.rs:1— `crates/rspack_core/src/options/resolve/clever_merge.rs` and `crates/rspack_core/src/resolver/resolver_impl.rs` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 `f03bd2f4` refactor: remove redundant clones and unused Clone derives (#15519); `72d1b7fb` feat(pnp)!: drop multi yarn pnp project resolving (#13389); `fb8c2cc1` feat: Add `pnp_manifest` option to resolver (#12417) — run `git show` on any of them.
Change coupling: raw_optimization.rs ↔ adapter.ts crates/rspack_binding_api/src/raw_options/raw_optimization.rs:1— `crates/rspack_binding_api/src/raw_options/raw_optimization.rs` and `packages/rspack/src/config/adapter.ts` 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 — 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `28abee87` refactor: remove as much `getRawOptions` as possible (#8773) (at that commit the file was still `crates/rspack_binding_values/src/raw_options/raw_optimization.rs`); `ea2947e6` chore: remove new split chunks options (#6536) (at that commit the file was still `crates/rspack_binding_options/src/options/raw_optimization.rs`); `7ea17cc2` feat: add function type splitChunks chunks (#5019) (at that commit the file was still `crates/rspack_binding_options/src/options/raw_optimization.rs`) — run `git show` on any of them.
Change coupling: builder_context.rs ↔ mod.rs crates/rspack/src/builder/builder_context.rs:1— `crates/rspack/src/builder/builder_context.rs` and `crates/rspack_binding_api/src/raw_options/raw_builtins/mod.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 — 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 8 shared commits counted here, the most recent 3 are `99a13944` fix(ids): correct compact hashed API names (#15356); `25762c20` feat(ids): add compact chunk ids (#14959); `df6cc3d1` feat(ids): add compat-hashed module ids (#14926) — run `git show` on any of them.
Change coupling: mod.rs ↔ module_rules.rs crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:1— `crates/rspack_binding_api/src/raw_options/raw_module/mod.rs` and `crates/rspack_core/src/utils/module_rules.rs` change together 66% of the time (19 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 19 shared commits counted here, the most recent 3 are `30043652` perf: reduce normal module creation and rule matching overhead (#13926); `4da33a84` feat: support `match_when_empty` for rule condition (#8809) (at that commit the file was still `crates/rspack_binding_values/src/raw_options/raw_module/mod.rs`); `c0ea8aca` fix: deep merge module resolve options (#7470) (at that commit the file was still `crates/rspack_binding_options/src/options/raw_module/mod.rs`) — run `git show` on any of them.
Change coupling: raw_html.rs ↔ plugin.rs crates/rspack_binding_api/src/raw_options/raw_builtins/raw_html.rs:1— `crates/rspack_binding_api/src/raw_options/raw_builtins/raw_html.rs` and `crates/rspack_plugin_html/src/plugin.rs` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 `5eac88c0` feat!: remove sri option of HtmlRspackPlugin (#12651); `972c005f` fix(html): not to override plugin options when using multiple instanc… (at that commit the file was still `crates/node_binding/src/raw_options/raw_builtins/raw_html.rs`); `5b7653b4` feat(html): support function filename and `[name]` in filename (#7753) (at that commit the file was still `crates/rspack_binding_options/src/options/raw_builtins/raw_html.rs`) — run `git show` on any of them.
Change coupling: import_meta_context_dependency_parser_plugin.rs ↔ import_parser_plugin.rs crates/rspack_plugin_javascript/src/parser_plugin/import_meta_context_dependency_parser_plugin.rs:1— `crates/rspack_plugin_javascript/src/parser_plugin/import_meta_context_dependency_parser_plugin.rs` and `crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 9 shared commits counted here, the most recent 3 are `5dc1d7ae` feat: support caseSensitive in import.meta.glob (#14811); `26060ed3` fix: handle context changes in import.meta.glob hooks (#14897); `11448d64` feat: support more import.meta.glob options (#14129) — run `git show` on any of them.
Change coupling: flag_dependency_exports_plugin.rs ↔ export_property_library_plugin.rs crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:1— `crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs` and `crates/rspack_plugin_library/src/export_property_library_plugin.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 — 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 `2f54e648` refactor: make finishModules readonly for compilation (#13058); `e04df144` refactor: improve exports info (#12587); `7382ba2b` refactor: remove get_make_module_graph_mut api (#12575) — run `git show` on any of them.
Change coupling: scheduler.rs ↔ index.ts crates/rspack_binding_api/src/plugins/js_loader/scheduler.rs:1— `crates/rspack_binding_api/src/plugins/js_loader/scheduler.rs` and `packages/rspack/src/loader-runner/index.ts` 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 — 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `2b1dd371` fix(loader): revert native loader hook invocation (#15719); `df236e5e` fix(loader): preserve string BOM across native boundaries (#15632); `6d0202e7` fix(loader): invoke loader hooks through the native hook (#15591) — run `git show` on any of them.
Change coupling: builder_context.rs ↔ rspackOptionsApply.ts crates/rspack/src/builder/builder_context.rs:1— `crates/rspack/src/builder/builder_context.rs` and `packages/rspack/src/rspackOptionsApply.ts` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `99a13944` fix(ids): correct compact hashed API names (#15356); `25762c20` feat(ids): add compact chunk ids (#14959); `df6cc3d1` feat(ids): add compat-hashed module ids (#14926) — run `git show` on any of them.
Change coupling: mod.rs ↔ mod.rs crates/rspack_plugin_javascript/src/parser_plugin/mod.rs:1— `crates/rspack_plugin_javascript/src/parser_plugin/mod.rs` and `crates/rspack_plugin_javascript/src/visitors/dependency/mod.rs` change together 57% of the time (21 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 21 shared commits counted here, the most recent 3 are `9c1a057c` refactor: side effects parser plugin (#12014); `f2bc023f` feat!: detect conflicting values in `DefinePlugin` (#7045); `c0e838d5` refactor: port inner graph (#7043) — run `git show` on any of them.
Change coupling: build.ts ↔ serve.ts packages/rspack-cli/src/commands/build.ts:1— `packages/rspack-cli/src/commands/build.ts` and `packages/rspack-cli/src/commands/serve.ts` change together 55% of the time (17 of the 31 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 17 shared commits counted here, the most recent 3 are `2ec536ba` fix(cli): surface fatal errors and unhandled rejections on process ex…; `f2efb67b` fix(cli): apply default lazy compilation value based on user config (…; `0e14994d` perf(cli): switch to cac and refactor code (#11893) — run `git show` on any of them.
Change coupling: common_js_export_require_dependency.rs ↔ common_js_self_reference_dependency.rs crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_export_require_dependency.rs:1— `crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_export_require_dependency.rs` and `crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_self_reference_dependency.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 6 shared commits counted here, the most recent 3 are `304d4814` refactor: reuse current module in dependency templates (#16149); `e04df144` refactor: improve exports info (#12587); `4ecc0318` refactor: refine exports info for CJS and ESM interop (#12577) — run `git show` on any of them.
Change coupling: common_js_require_context_dependency.rs ↔ import_parser_plugin.rs crates/rspack_plugin_javascript/src/dependency/context/common_js_require_context_dependency.rs:1— `crates/rspack_plugin_javascript/src/dependency/context/common_js_require_context_dependency.rs` and `crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 6 shared commits counted here, the most recent 3 are `2e3a54eb` fix: empty references export for cjs and dynamic import tree shaking …; `b072b9da` feat: cjs require variable property access tree shaking (#13155); `c0a82b3a` feat: amd context require (#9495) — run `git show` on any of them.
Change coupling: mod.rs ↔ native_fs.rs crates/rspack_core/src/compiler/mod.rs:1— `crates/rspack_core/src/compiler/mod.rs` and `crates/rspack_fs/src/native_fs.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 — 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 14 shared commits counted here, the most recent 3 are `18f392fd` perf: Enable more Clippy performance checks and reduce redundant clon…; `1c2cb294` chore: bump rust toolchain (#12183); `2f5cf2f3` chore: change input_filesystem to ReadableFileSystem (#8878) — run `git show` on any of them.
Change coupling: ctrl.rs ↔ execute.rs crates/rspack_core/src/compilation/build_module_graph/module_executor/ctrl.rs:1— `crates/rspack_core/src/compilation/build_module_graph/module_executor/ctrl.rs` and `crates/rspack_core/src/compilation/build_module_graph/module_executor/execute.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 — 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 `1473292c` refactor: rename TaskType::Sync to Main & TaskType::Async to backgrou… (at that commit the files were still `crates/rspack_core/src/compiler/module_executor/ctrl.rs` and `crates/rspack_core/src/compiler/module_executor/execute.rs`); `bd6c7568` chore: support event tracing (#10225) (at that commit the files were still `crates/rspack_core/src/compiler/module_executor/ctrl.rs` and `crates/rspack_core/src/compiler/module_executor/execute.rs`); `242967b1` fix: should rebuild css module when rebuild css extract entry (#10124) (at that commit the files were still `crates/rspack_core/src/compiler/module_executor/ctrl.rs` and `crates/rspack_core/src/compiler/module_executor/execute.rs`) — run `git show` on any of them.
Change coupling: raw_split_chunk_name.rs ↔ module_group.rs crates/rspack_binding_api/src/raw_options/raw_split_chunks/raw_split_chunk_name.rs:1— `crates/rspack_binding_api/src/raw_options/raw_split_chunks/raw_split_chunk_name.rs` and `crates/rspack_plugin_split_chunks/src/plugin/module_group.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 — 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 `4f1ce3e7` perf: batch splitChunks JavaScript callbacks (#15147); `722967d5` perf: improve bundle splitting part 2 (#11233); `8b3d3f4f` refactor: remove `block_on` in split chunk name and test (#9722) (at that commit the file was still `crates/node_binding/src/raw_options/raw_split_chunks/raw_split_chunk_name.rs`) — run `git show` on any of them.
Change coupling: context.rs ↔ mod.rs crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/context.rs:1— `crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/context.rs` and `crates/rspack_core/src/compiler/mod.rs` change together 52% of the time (15 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 15 shared commits counted here, the most recent 3 are `0546033e` refactor(loader): reuse filesystem snapshots for cache dependencies (…; `3fc569ce` refactor: remove old cache (#12777); `1c5ec4bc` refactor: check neutral platform (#12534) — run `git show` on any of them.
Duplicated block (9 lines × 2) crates/rspack_allocative_derive/src/derive_allocative.rs:296— crates/rspack_allocative_derive/src/derive_allocative.rs:296-304 | crates/rspack_allocative_derive/src/derive_allocative.rs:318-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.
Duplicated block (9 lines × 2) crates/rspack_binding_api/src/compilation/dependencies.rs:107— crates/rspack_binding_api/src/compilation/dependencies.rs:107-115 | crates/rspack_binding_api/src/compilation/dependencies.rs:122-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.
Duplicated block (9 lines × 2) crates/rspack_binding_api/src/options/raw_resolve.rs:138— crates/rspack_binding_api/src/options/raw_resolve.rs:138-146 | crates/rspack_binding_api/src/options/raw_resolve.rs:276-284 — both copies are in the same file, so extract the 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/rspack_binding_api/src/raw_options/raw_module/mod.rs:1085— crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:1085-1093 | crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:1095-1103 — both copies are in the same file, so extract the 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/rspack_cacheable_macros/src/cacheable/args.rs:25— crates/rspack_cacheable_macros/src/cacheable/args.rs:25-33 | crates/rspack_cacheable_macros/src/cacheable_dyn/args.rs:16-24 — 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/rspack_core/src/runtime.rs:272— crates/rspack_core/src/runtime.rs:272-280 | crates/rspack_core/src/runtime.rs:291-299 — both copies are in the same file, so extract the 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/rspack_core/src/stats/mod.rs:1021— crates/rspack_core/src/stats/mod.rs:1021-1029 | crates/rspack_core/src/stats/mod.rs:1106-1114 — both copies are in the same file, so extract the 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/rspack_hash/src/lib.rs:465— crates/rspack_hash/src/lib.rs:465-473 | crates/rspack_hash/src/lib.rs:502-511 — both copies are in the same file, so extract the 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/rspack_javascript_compiler/src/compiler/parse.rs:65— crates/rspack_javascript_compiler/src/compiler/parse.rs:65-73 | crates/rspack_javascript_compiler/src/compiler/parse.rs:89-97 — both copies are in the same file, so extract the 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/rspack_loader_swc/src/rsc_transforms/server_actions.rs:478— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:478-486 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:631-639 — both copies are in the same file, so extract the 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/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:119— crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:119-128 | crates/rspack_plugin_extract_css/src/plugin.rs:359-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.
Duplicated block (9 lines × 2) crates/rspack_plugin_esm_library/src/link.rs:2193— crates/rspack_plugin_esm_library/src/link.rs:2193-2201 | crates/rspack_plugin_esm_library/src/link.rs:2264-2272 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_and_generator/mod.rs:552— crates/rspack_plugin_javascript/src/parser_and_generator/mod.rs:552-560 | crates/rspack_plugin_javascript/src/parser_and_generator/mod.rs:565-573 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:153— crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:153-161 | crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs:85-93 — before extracting anything, compare `crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs` and `crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (9 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/compatibility_plugin.rs:222— crates/rspack_plugin_javascript/src/parser_plugin/compatibility_plugin.rs:222-230 | crates/rspack_plugin_javascript/src/parser_plugin/compatibility_plugin.rs:261-273 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:1097— crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:1097-1105 | crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:1200-1208 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:310— crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:310-319 | crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:380-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.
Duplicated block (9 lines × 2) crates/rspack_plugin_javascript/src/runtime_context.rs:319— crates/rspack_plugin_javascript/src/runtime_context.rs:319-327 | crates/rspack_plugin_javascript/src/runtime_context.rs:460-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.
Duplicated block (9 lines × 2) crates/rspack_plugin_rslib/src/url_external.rs:48— crates/rspack_plugin_rslib/src/url_external.rs:48-56 | crates/rspack_plugin_rslib/src/worker_external.rs:46-54 — 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 (9 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/utils.rs:80— crates/rspack_plugin_runtime/src/runtime_module/utils.rs:80-88 | crates/rspack_plugin_runtime/src/runtime_module/utils.rs:149-157 — both copies are in the same file, so extract the 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/rspack_resolver/src/lib.rs:169— crates/rspack_resolver/src/lib.rs:169-177 | crates/rspack_resolver/src/lib.rs:188-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.
Duplicated block (9 lines × 2) crates/rspack_tracing_perfetto/src/lib.rs:244— crates/rspack_tracing_perfetto/src/lib.rs:244-252 | crates/rspack_tracing_perfetto/src/lib.rs:397-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.
Duplicated block (9 lines × 2) crates/rspack_watcher/src/scanner.rs:71— crates/rspack_watcher/src/scanner.rs:71-79 | crates/rspack_watcher/src/scanner.rs:94-104 — both copies are in the same file, so extract the 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/rspack_core/src/context_module.rs:1473— crates/rspack_core/src/context_module.rs:1473-1481 | crates/rspack_core/src/normal_module.rs:457-465 — 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 (9 lines × 2) crates/rspack_plugin_javascript/src/plugin/api_plugin.rs:22— crates/rspack_plugin_javascript/src/plugin/api_plugin.rs:22-30 | crates/rspack_plugin_javascript/src/plugin/url_plugin.rs:164-172 — 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/rspack_binding_api/src/compilation/mod.rs:975— crates/rspack_binding_api/src/compilation/mod.rs:975-985 | crates/rspack_binding_api/src/compilation/mod.rs:1078-1088 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1734— crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1734-1745 | crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1837-1847 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_core/src/compilation/create_hash/mod.rs:134— crates/rspack_core/src/compilation/create_hash/mod.rs:134-144 | crates/rspack_core/src/compilation/create_hash/mod.rs:366-376 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_core/src/module_graph/mod.rs:212— crates/rspack_core/src/module_graph/mod.rs:212-222 | crates/rspack_core/src/module_graph/mod.rs:237-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.
Duplicated block (11 lines × 2) crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:436— crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:436-446 | crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:500-510 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_core/src/stats/mod.rs:969— crates/rspack_core/src/stats/mod.rs:969-979 | crates/rspack_core/src/stats/mod.rs:1052-1062 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_core/src/stats/utils.rs:237— crates/rspack_core/src/stats/utils.rs:237-247 | crates/rspack_core/src/stats/utils.rs:249-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.
Duplicated block (11 lines × 2) crates/rspack_error/src/displayer/renderer/graphical.rs:482— crates/rspack_error/src/displayer/renderer/graphical.rs:482-492 | crates/rspack_error/src/displayer/renderer/graphical.rs:499-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.
Duplicated block (11 lines × 2) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1740— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1740-1750 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1790-1800 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_napi/src/threadsafe_function.rs:149— crates/rspack_napi/src/threadsafe_function.rs:149-159 | crates/rspack_napi/src/threadsafe_function.rs:192-202 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_plugin_esm_library/src/link.rs:1059— crates/rspack_plugin_esm_library/src/link.rs:1059-1069 | crates/rspack_plugin_esm_library/src/link.rs:1071-1081 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_plugin_javascript/src/dependency/amd/amd_require_dependency.rs:164— crates/rspack_plugin_javascript/src/dependency/amd/amd_require_dependency.rs:164-174 | crates/rspack_plugin_javascript/src/dependency/amd/amd_require_dependency.rs:210-220 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/walk_data.rs:276— crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/walk_data.rs:276-287 | crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/walk_data.rs:356-366 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:104— crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:104-114 | crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:176-186 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_plugin_library/src/amd_library_plugin.rs:103— crates/rspack_plugin_library/src/amd_library_plugin.rs:103-113 | crates/rspack_plugin_library/src/umd_library_plugin.rs:117-127 — 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/rspack_plugin_mf/src/sharing/consume_shared_plugin.rs:392— crates/rspack_plugin_mf/src/sharing/consume_shared_plugin.rs:392-402 | crates/rspack_plugin_mf/src/sharing/consume_shared_plugin.rs:451-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.
Duplicated block (11 lines × 2) crates/rspack_plugin_rsc/src/rsc_entry_module.rs:164— crates/rspack_plugin_rsc/src/rsc_entry_module.rs:164-174 | crates/rspack_plugin_rsc/src/rsc_entry_module.rs:274-284 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/swc_plugin_import/src/lib.rs:512— crates/swc_plugin_import/src/lib.rs:512-522 | crates/swc_plugin_import/src/lib.rs:528-538 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/rspack_allocative/src/key.rs:54— crates/rspack_allocative/src/key.rs:54-64 | crates/rspack_allocative_derive/src/derive_allocative.rs:17-27 — 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 (11 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:97— crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:97-107 | crates/rspack_plugin_rstest/src/parser_plugin.rs:83-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.
Duplicated block (11 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/create_script.rs:49— crates/rspack_plugin_runtime/src/runtime_module/create_script.rs:49-59 | crates/rspack_plugin_runtime/src/runtime_module/create_script_url.rs:49-59 — 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/rspack_loader_preact_refresh/src/plugin.rs:49— crates/rspack_loader_preact_refresh/src/plugin.rs:49-59 | crates/rspack_loader_react_refresh/src/plugin.rs:49-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.
Duplicated block (11 lines × 2) crates/rspack_plugin_module_replacement/src/context_replacement.rs:150— crates/rspack_plugin_module_replacement/src/context_replacement.rs:150-160 | crates/rspack_plugin_module_replacement/src/normal_module_replacement.rs:92-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.
Duplicated block (11 lines × 2) crates/rspack_core/src/runtime_template.rs:1725— crates/rspack_core/src/runtime_template.rs:1725-1735 | crates/rspack_core/src/runtime_template.rs:1755-1768 — both copies are in the same file, so extract the 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 (11 lines × 2) crates/css-module-lexer/src/dependencies.rs:2373— crates/css-module-lexer/src/dependencies.rs:2373-2383 | crates/css-module-lexer/src/dependencies.rs:2686-2696 — both copies are in the same file, so extract the 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/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:663— crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:663-670 | crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1943-1950 — both copies are in the same file, so extract the 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/rspack_ids/src/sync_module_ids_plugin.rs:139— crates/rspack_ids/src/sync_module_ids_plugin.rs:139-146 | crates/rspack_ids/src/sync_module_ids_plugin.rs:200-207 — both copies are in the same file, so extract the 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/rspack_napi/src/js_values/one_shot_value_ref.rs:44— crates/rspack_napi/src/js_values/one_shot_value_ref.rs:44-51 | crates/rspack_napi/src/js_values/threadsafe_one_shot_value_ref.rs:72-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.
Duplicated block (8 lines × 2) crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:581— crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:581-588 | crates/rspack_plugin_extract_css/src/plugin.rs:706-713 — 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/rspack_plugin_css/src/runtime/mod.rs:149— crates/rspack_plugin_css/src/runtime/mod.rs:149-156 | crates/rspack_plugin_extract_css/src/runtime.rs:181-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.
Duplicated block (8 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:370— crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:370-377 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:446-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.
Duplicated block (8 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/node_stuff_plugin.rs:175— crates/rspack_plugin_javascript/src/parser_plugin/node_stuff_plugin.rs:175-182 | crates/rspack_plugin_javascript/src/parser_plugin/node_stuff_plugin.rs:209-216 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:225— crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:225-232 | crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:235-242 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:543— crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:543-550 | crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:613-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.
Duplicated block (8 lines × 2) crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:523— crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:523-530 | crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:534-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.
Duplicated block (8 lines × 2) crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:50— crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:50-57 | crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:149-156 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1107— crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1107-1114 | crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1128-1135 — both copies are in the same file, so extract the 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/rspack_plugin_rslib/src/url_external.rs:104— crates/rspack_plugin_rslib/src/url_external.rs:104-111 | crates/rspack_plugin_rslib/src/worker_external.rs:98-105 — 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/rspack_tools/src/compare/snapshot.rs:25— crates/rspack_tools/src/compare/snapshot.rs:25-32 | crates/rspack_tools/src/compare/snapshot.rs:34-41 — both copies are in the same file, so extract the 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/rspack_watcher/src/scanner.rs:43— crates/rspack_watcher/src/scanner.rs:43-50 | crates/rspack_watcher/src/scanner.rs:74-81 — both copies are in the same file, so extract the 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/rspack_binding_api/src/modules/concatenated_module.rs:16— crates/rspack_binding_api/src/modules/concatenated_module.rs:16-23 | crates/rspack_binding_api/src/modules/context_module.rs:16-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.
Duplicated block (8 lines × 2) crates/rspack_fs/src/memory_fs.rs:377— crates/rspack_fs/src/memory_fs.rs:377-384 | crates/rspack_fs/src/native_fs.rs:396-403 — 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/rspack_napi/src/js_values/one_shot_value_ref.rs:30— crates/rspack_napi/src/js_values/one_shot_value_ref.rs:30-37 | crates/rspack_napi/src/js_values/threadsafe_one_shot_value_ref.rs:57-64 — 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/rspack_plugin_circular_dependencies/src/circular_check_rspack_plugin.rs:152— crates/rspack_plugin_circular_dependencies/src/circular_check_rspack_plugin.rs:152-159 | crates/rspack_plugin_circular_dependencies/src/circular_modules_info_plugin.rs:29-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.
Duplicated block (8 lines × 2) crates/rspack_plugin_css_chunking/src/lib.rs:422— crates/rspack_plugin_css_chunking/src/lib.rs:422-431 | crates/rspack_plugin_mf/src/container/hoist_container_references_plugin.rs:303-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.
Duplicated block (8 lines × 2) crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:210— crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:210-217 | crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs:331-338 — before extracting anything, compare `crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs` and `crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (8 lines × 2) crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:1357— crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:1357-1364 | crates/rspack_plugin_swc_js_minimizer/src/lib.rs:635-642 — 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/rspack_plugin_javascript/src/parser_plugin/define_plugin/mod.rs:94— crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/mod.rs:94-101 | crates/rspack_plugin_javascript/src/parser_plugin/provide_plugin/mod.rs:101-108 — 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/rspack_plugin_rslib/src/isolated_dts.rs:204— crates/rspack_plugin_rslib/src/isolated_dts.rs:204-211 | crates/rspack_plugin_rslib/src/plugin.rs:148-155 — 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/css-module-lexer/src/dependencies.rs:2849— crates/css-module-lexer/src/dependencies.rs:2849-2856 | crates/css-module-lexer/src/dependencies.rs:3048-3055 — both copies are in the same file, so extract the 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/rspack/src/builder/mod.rs:2781— crates/rspack/src/builder/mod.rs:2781-2790 | crates/rspack/src/builder/mod.rs:2792-2801 — both copies are in the same file, so extract the 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/rspack_binding_api/src/fs_node/write.rs:337— crates/rspack_binding_api/src/fs_node/write.rs:337-346 | crates/rspack_binding_api/src/fs_node/write.rs:376-385 — both copies are in the same file, so extract the 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/rspack_binding_api/src/raw_options/raw_builtins/mod.rs:682— crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs:682-691 | crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs:695-704 — both copies are in the same file, so extract the 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/rspack_binding_api/src/raw_options/raw_builtins/raw_circular_dependency.rs:86— crates/rspack_binding_api/src/raw_options/raw_builtins/raw_circular_dependency.rs:86-95 | crates/rspack_binding_api/src/raw_options/raw_builtins/raw_circular_dependency.rs:98-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.
Duplicated block (10 lines × 2) crates/rspack_core/src/chunk.rs:411— crates/rspack_core/src/chunk.rs:411-420 | crates/rspack_core/src/chunk.rs:455-464 — both copies are in the same file, so extract the 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/rspack_core/src/normal_module_factory.rs:100— crates/rspack_core/src/normal_module_factory.rs:100-109 | crates/rspack_core/src/normal_module_factory.rs:128-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.
Duplicated block (10 lines × 2) crates/rspack_loader_swc/src/rsc_transforms/cjs_finder.rs:83— crates/rspack_loader_swc/src/rsc_transforms/cjs_finder.rs:83-92 | crates/rspack_loader_swc/src/rsc_transforms/cjs_finder.rs:124-133 — both copies are in the same file, so extract the 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/rspack_loader_swc/src/rsc_transforms/server_actions.rs:382— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:382-391 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:547-556 — both copies are in the same file, so extract the 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/rspack_macros/src/rspack_hash.rs:217— crates/rspack_macros/src/rspack_hash.rs:217-226 | crates/rspack_macros/src/rspack_hash.rs:249-258 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/dependency/context/import_meta_context_dependency.rs:189— crates/rspack_plugin_javascript/src/dependency/context/import_meta_context_dependency.rs:189-198 | crates/rspack_plugin_javascript/src/dependency/context/require_context_dependency.rs:137-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.
Duplicated block (10 lines × 2) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:574— crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:574-583 | crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:676-686 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:357— crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:357-366 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:433-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.
Duplicated block (10 lines × 2) crates/rspack_plugin_javascript/src/plugin/mod.rs:774— crates/rspack_plugin_javascript/src/plugin/mod.rs:774-783 | crates/rspack_plugin_javascript/src/plugin/mod.rs:1400-1409 — both copies are in the same file, so extract the 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/rspack_plugin_mf/src/manifest/mod.rs:429— crates/rspack_plugin_mf/src/manifest/mod.rs:429-438 | crates/rspack_plugin_mf/src/manifest/mod.rs:454-463 — both copies are in the same file, so extract the 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/rspack_sources/src/decoder.rs:133— crates/rspack_sources/src/decoder.rs:133-142 | crates/rspack_sources/src/decoder.rs:145-154 — both copies are in the same file, so extract the 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/rspack_sources/src/helpers.rs:59— crates/rspack_sources/src/helpers.rs:59-69 | crates/rspack_sources/src/helpers.rs:1431-1440 — both copies are in the same file, so extract the 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/rspack_sources/src/helpers.rs:605— crates/rspack_sources/src/helpers.rs:605-614 | crates/rspack_sources/src/helpers.rs:665-674 — both copies are in the same file, so extract the 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/rspack_plugin_library/src/amd_library_plugin.rs:202— crates/rspack_plugin_library/src/amd_library_plugin.rs:202-211 | crates/rspack_plugin_library/src/jsonp_library_plugin.rs:133-142 — before extracting anything, compare `crates/rspack_plugin_library/src/amd_library_plugin.rs` and `crates/rspack_plugin_library/src/jsonp_library_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (10 lines × 2) crates/rspack_core/src/artifacts/cgm_hash_artifact.rs:38— crates/rspack_core/src/artifacts/cgm_hash_artifact.rs:38-47 | crates/rspack_core/src/artifacts/chunk_hashes_artifact.rs:23-32 — 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 lines × 2) crates/css-module-lexer/src/dependencies.rs:1067— crates/css-module-lexer/src/dependencies.rs:1067-1076 | crates/css-module-lexer/src/dependencies.rs:1140-1151 — both copies are in the same file, so extract the 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/css-module-lexer/src/dependencies.rs:2931— crates/css-module-lexer/src/dependencies.rs:2931-2940 | crates/css-module-lexer/src/dependencies.rs:2983-2992 — both copies are in the same file, so extract the 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/rspack/src/builder/mod.rs:1405— crates/rspack/src/builder/mod.rs:1405-1414 | crates/rspack/src/builder/mod.rs:1417-1426 — both copies are in the same file, so extract the 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/rspack_binding_api/src/lib.rs:456— crates/rspack_binding_api/src/lib.rs:456-465 | crates/rspack_binding_api/src/lib.rs:492-501 — both copies are in the same file, so extract the 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/rspack_plugin_library/src/lib.rs:77— crates/rspack_plugin_library/src/lib.rs:77-86 | crates/rspack_plugin_library/src/lib.rs:87-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
TooManyMethods: JavascriptParser crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:472— TooManyMethods — 230 methods, declared across 9 files: parser/walk.rs (100), parser/mod.rs (82), parser/walk_pre.rs (25), parser/walk_block_pre.rs (8), +5 more file(s). The bar is 30 methods; this is 200 over it, 7.67× 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: BasicEvaluatedExpression crates/rspack_plugin_javascript/src/utils/eval/mod.rs:142— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× 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: ChunkGraph crates/rspack_core/src/chunk_graph/mod.rs:12— TooManyMethods — 74 methods, declared across 3 files: chunk_graph/chunk_graph_chunk.rs (48), chunk_graph/chunk_graph_module.rs (25), chunk_graph/mod.rs (1). The bar is 30 methods; this is 44 over it, 2.47× 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: ModuleGraph crates/rspack_core/src/module_graph/mod.rs:162— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× 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: LexDependencies crates/css-module-lexer/src/dependencies.rs:1430— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.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.
TooManyMethods: Chunk crates/rspack_core/src/chunk.rs:95— 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: ResolverGeneric crates/rspack_resolver/src/lib.rs:133— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× 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: JsCompilation crates/rspack_binding_api/src/compilation/mod.rs:49— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: Compilation crates/rspack_core/src/compilation/mod.rs:213— TooManyMethods — 56 methods, declared across 2 files: compilation/mod.rs (53), compilation/run_passes.rs (3). The bar is 30 methods; this is 26 over it, 1.87× 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: ExportInfoData crates/rspack_core/src/exports/export_info.rs:42— TooManyMethods — 56 methods, declared across 3 files: exports/export_info.rs (35), exports/export_info_getter.rs (12), exports/export_info_setter.rs (9). The bar is 30 methods; this is 26 over it, 1.87× 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: OutputOptionsBuilder crates/rspack/src/builder/mod.rs:2174— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: LoaderContext crates/rspack_loader_runner/src/context.rs:55— TooManyMethods — 44 methods, declared across 2 files: src/context.rs (42), src/runner.rs (2). The bar is 30 methods; this is 14 over it, 1.47× 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: CssModuleGenerator crates/rspack_plugin_css/src/parser_and_generator/generator.rs:78— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: Stats crates/rspack_core/src/stats/mod.rs:117— TooManyMethods — 39 methods. The bar is 30 methods; 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.
TooManyMethods: EsmLibraryPlugin crates/rspack_plugin_esm_library/src/plugin.rs:73— TooManyMethods — 38 methods, declared across 3 files: src/link.rs (30), src/render.rs (6), src/plugin.rs (2). The bar is 30 methods; this is 8 over it, 1.27× 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: CodeSplitter crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:351— TooManyMethods — 37 methods, declared across 2 files: build_chunk_graph/code_splitter.rs (28), build_chunk_graph/incremental.rs (9). The bar is 30 methods; this is 7 over it, 1.23× 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: Compilation packages/rspack/src/Compilation.ts:281— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: ScopeInfoDB crates/rspack_plugin_javascript/src/visitors/scope_info.rs:117— TooManyMethods — 36 methods, declared across 2 files: visitors/scope_info.rs (21), scope_info/semantic.rs (15). The bar is 30 methods; this is 6 over it, 1.20× 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: ModuleCodeTemplate crates/rspack_core/src/runtime_template.rs:848— 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: ExportsInfoData crates/rspack_core/src/exports/exports_info.rs:35— TooManyMethods — 34 methods, declared across 4 files: exports/exports_info_getter.rs (13), exports/exports_info.rs (10), exports/exports_info_setter.rs (9), exports/export_info.rs (2). The bar is 30 methods; this is 4 over it, 1.13× 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: PathManager crates/rspack_watcher/src/paths.rs:277— TooManyMethods — 34 methods. The bar is 30 methods; 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.
TooManyMethods: CompilerBuilder crates/rspack/src/builder/mod.rs:109— 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.
TooManyMethods: RuntimeTemplate packages/rspack/src/RuntimeTemplate.ts:125— TooManyMethods — 31 methods. The bar is 30 methods; 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.
Duplicated block (13 lines × 2) crates/css-module-lexer/src/dependencies.rs:3860— crates/css-module-lexer/src/dependencies.rs:3860-3872 | crates/css-module-lexer/src/dependencies.rs:3885-3897 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/css-module-lexer/src/dependencies.rs:4534— crates/css-module-lexer/src/dependencies.rs:4534-4546 | crates/css-module-lexer/src/dependencies.rs:4575-4587 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_allocative/src/impls/rspack.rs:58— crates/rspack_allocative/src/impls/rspack.rs:58-70 | crates/rspack_allocative/src/impls/rspack.rs:184-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.
Duplicated block (13 lines × 2) crates/rspack_core/src/concatenated_module.rs:1020— crates/rspack_core/src/concatenated_module.rs:1020-1032 | crates/rspack_core/src/concatenated_module.rs:1904-1916 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_core/src/context_module_factory.rs:362— crates/rspack_core/src/context_module_factory.rs:362-374 | crates/rspack_core/src/context_module_factory.rs:390-402 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_core/src/options/module.rs:1535— crates/rspack_core/src/options/module.rs:1535-1547 | crates/rspack_core/src/utils/module_rules.rs:249-261 — 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/rspack_hash/src/lib.rs:478— crates/rspack_hash/src/lib.rs:478-490 | crates/rspack_hash/src/lib.rs:514-526 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_macros/src/rspack_hash.rs:142— crates/rspack_macros/src/rspack_hash.rs:142-154 | crates/rspack_macros/src/rspack_hash.rs:168-180 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_plugin_esm_library/src/split_chunks.rs:102— crates/rspack_plugin_esm_library/src/split_chunks.rs:102-114 | crates/rspack_plugin_split_chunks/src/module_group.rs:259-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 (13 lines × 2) crates/rspack_plugin_javascript/src/magic_comment.rs:685— crates/rspack_plugin_javascript/src/magic_comment.rs:685-697 | crates/rspack_plugin_javascript/src/magic_comment.rs:699-711 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2805— crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2805-2817 | crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs:686-698 — 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/rspack_plugin_javascript/src/utils/mangle_exports.rs:15— crates/rspack_plugin_javascript/src/utils/mangle_exports.rs:15-28 | crates/rspack_plugin_javascript/src/utils/mangle_exports.rs:45-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 (13 lines × 2) crates/rspack_plugin_mf/src/container/container_entry_module.rs:66— crates/rspack_plugin_mf/src/container/container_entry_module.rs:66-78 | crates/rspack_plugin_rsc/src/rsc_entry_module.rs:84-96 — 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/rspack_plugin_rstest/src/parser_plugin.rs:399— crates/rspack_plugin_rstest/src/parser_plugin.rs:399-411 | crates/rspack_plugin_rstest/src/parser_plugin.rs:471-483 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/create_script.rs:25— crates/rspack_plugin_runtime/src/runtime_module/create_script.rs:25-37 | crates/rspack_plugin_runtime/src/runtime_module/create_script_url.rs:25-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.
Duplicated block (13 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:308— crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:308-321 | crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:453-465 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 × 2) crates/css-module-lexer/src/dependencies.rs:2354— crates/css-module-lexer/src/dependencies.rs:2354-2366 | crates/css-module-lexer/src/dependencies.rs:2667-2679 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_core/src/runtime_template.rs:550— crates/rspack_core/src/runtime_template.rs:550-562 | crates/rspack_core/src/runtime_template.rs:575-587 — both copies are in the same file, so extract the 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 (13 lines × 2) crates/rspack_dojang/src/eval.rs:287— crates/rspack_dojang/src/eval.rs:287-299 | crates/rspack_dojang/src/eval.rs:347-359 — both copies are in the same file, so extract the 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/rspack_binding_api/src/fs_node/write.rs:197— crates/rspack_binding_api/src/fs_node/write.rs:197-203 | crates/rspack_binding_api/src/fs_node/write.rs:220-226 — both copies are in the same file, so extract the 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/rspack_binding_api/src/fs_node/write.rs:237— crates/rspack_binding_api/src/fs_node/write.rs:237-243 | crates/rspack_binding_api/src/fs_node/write.rs:254-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.
Duplicated block (7 lines × 2) crates/rspack_binding_api/src/fs_node/write.rs:317— crates/rspack_binding_api/src/fs_node/write.rs:317-323 | crates/rspack_binding_api/src/fs_node/write.rs:416-422 — both copies are in the same file, so extract the 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/rspack_binding_api/src/raw_options/raw_builtins/mod.rs:351— crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs:351-357 | crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs:782-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.
Duplicated block (7 lines × 2) crates/rspack_core/src/options/module.rs:1590— crates/rspack_core/src/options/module.rs:1590-1596 | crates/rspack_core/src/options/module.rs:1598-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.
Duplicated block (7 lines × 2) crates/rspack_core/src/options/resolve/clever_merge.rs:483— crates/rspack_core/src/options/resolve/clever_merge.rs:483-489 | crates/rspack_core/src/options/resolve/clever_merge.rs:497-503 — both copies are in the same file, so extract the 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/rspack_core/src/utils/mod.rs:200— crates/rspack_core/src/utils/mod.rs:200-206 | crates/rspack_core/src/utils/mod.rs:223-229 — both copies are in the same file, so extract the 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/rspack_ids/src/named_chunk_ids_plugin.rs:191— crates/rspack_ids/src/named_chunk_ids_plugin.rs:191-197 | crates/rspack_ids/src/named_module_ids_plugin.rs:166-172 — 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/rspack_napi/src/threadsafe_function.rs:260— crates/rspack_napi/src/threadsafe_function.rs:260-266 | crates/rspack_napi/src/threadsafe_function.rs:284-290 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:1469— crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:1469-1475 | crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:1518-1524 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/import_meta_context_dependency_parser_plugin.rs:304— crates/rspack_plugin_javascript/src/parser_plugin/import_meta_context_dependency_parser_plugin.rs:304-310 | crates/rspack_plugin_javascript/src/parser_plugin/import_meta_context_dependency_parser_plugin.rs:354-360 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/import_meta_plugin.rs:681— crates/rspack_plugin_javascript/src/parser_plugin/import_meta_plugin.rs:681-687 | crates/rspack_plugin_javascript/src/parser_plugin/import_meta_plugin.rs:692-698 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:231— crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:231-237 | crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:282-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 (7 lines × 2) crates/rspack_plugin_mf/src/manifest/mod.rs:421— crates/rspack_plugin_mf/src/manifest/mod.rs:421-427 | crates/rspack_plugin_mf/src/manifest/mod.rs:475-481 — both copies are in the same file, so extract the 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/rspack_plugin_rstest/src/plugin.rs:382— crates/rspack_plugin_rstest/src/plugin.rs:382-388 | crates/rspack_plugin_rstest/src/plugin.rs:400-406 — both copies are in the same file, so extract the 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/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:226— crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:226-232 | crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs:318-324 — before extracting anything, compare `crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs` and `crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (7 lines × 2) crates/css-module-lexer/src/dependencies.rs:4304— crates/css-module-lexer/src/dependencies.rs:4304-4310 | crates/css-module-lexer/src/dependencies.rs:4345-4351 — both copies are in the same file, so extract the 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/rspack_storage/src/filesystem/db/bucket/pack/mod.rs:52— crates/rspack_storage/src/filesystem/db/bucket/pack/mod.rs:52-58 | crates/rspack_storage/src/filesystem/db/bucket/pack/mod.rs:61-67 — both copies are in the same file, so extract the 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/rspack_fs/src/native_fs.rs:158— crates/rspack_fs/src/native_fs.rs:158-164 | crates/rspack_fs/src/native_fs.rs:172-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.
Duplicated block (5 lines × 2) crates/rspack/src/builder/target.rs:291— crates/rspack/src/builder/target.rs:291-295 | crates/rspack/src/builder/target.rs:441-445 — both copies are in the same file, so extract the 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/rspack_binding_api/src/options/raw_resolve.rs:132— crates/rspack_binding_api/src/options/raw_resolve.rs:132-136 | crates/rspack_binding_api/src/options/raw_resolve.rs:254-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.
Duplicated block (5 lines × 2) crates/rspack_core/src/resolver/resolver_impl.rs:199— crates/rspack_core/src/resolver/resolver_impl.rs:199-203 | crates/rspack_core/src/resolver/resolver_impl.rs:230-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.
Duplicated block (5 lines × 2) crates/rspack_macros/src/hook.rs:70— crates/rspack_macros/src/hook.rs:70-74 | crates/rspack_macros/src/plugin.rs:137-141 — 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/rspack_plugin_esm_library/src/split_chunks.rs:45— crates/rspack_plugin_esm_library/src/split_chunks.rs:45-49 | crates/rspack_plugin_esm_library/src/split_chunks.rs:61-65 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/magic_comment.rs:193— crates/rspack_plugin_javascript/src/magic_comment.rs:193-197 | crates/rspack_plugin_javascript/src/magic_comment.rs:201-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.
Duplicated block (5 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2064— crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2064-2068 | crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs:263-267 — 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/rspack_plugin_javascript/src/parser_plugin/hot_module_replacement_plugin.rs:66— crates/rspack_plugin_javascript/src/parser_plugin/hot_module_replacement_plugin.rs:66-70 | crates/rspack_plugin_javascript/src/parser_plugin/hot_module_replacement_plugin.rs:106-110 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:91— crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:91-95 | crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:141-146 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:136— crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:136-140 | crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:142-146 — both copies are in the same file, so extract the 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/rspack_regex/src/lib.rs:97— crates/rspack_regex/src/lib.rs:97-101 | crates/rspack_regex/src/lib.rs:107-111 — both copies are in the same file, so extract the 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/rspack_watcher/src/lib.rs:415— crates/rspack_watcher/src/lib.rs:415-419 | crates/rspack_watcher/src/testing.rs:46-51 — 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/rspack_binding_api/src/fs_node/write.rs:431— crates/rspack_binding_api/src/fs_node/write.rs:431-435 | crates/rspack_fs/src/intermediate.rs:37-41 — 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/rspack_fs/src/memory_fs.rs:371— crates/rspack_fs/src/memory_fs.rs:371-375 | crates/rspack_fs/src/native_fs.rs:390-394 — 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/rspack_fs/src/memory_fs.rs:385— crates/rspack_fs/src/memory_fs.rs:385-389 | crates/rspack_fs/src/native_fs.rs:405-409 — 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/rspack_plugin_library/src/export_property_library_plugin.rs:51— crates/rspack_plugin_library/src/export_property_library_plugin.rs:51-55 | crates/rspack_plugin_library/src/umd_library_plugin.rs:75-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.
Duplicated block (5 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs:195— crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs:195-200 | crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs:209-213 — both copies are in the same file, so extract the 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/rspack_binding_api/src/raw_options/raw_module/mod.rs:820— crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:820-824 | crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:871-875 — both copies are in the same file, so extract the 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/rspack_core/src/normal_module_factory.rs:249— crates/rspack_core/src/normal_module_factory.rs:249-253 | crates/rspack_core/src/normal_module_factory.rs:282-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
rspack_plugin_javascript::parser_plugin::side_effects_analysis::may_have_side_effects (cyclomatic 46) crates/rspack_plugin_javascript/src/parser_plugin/side_effects_analysis.rs:56— rspack_plugin_javascript::parser_plugin::side_effects_analysis::may_have_side_effects 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.
rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_const_operation (cyclomatic 39) crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:436— rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_const_operation has cyclomatic complexity 39 (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.
rspack_plugin_javascript::magic_comment::analyze_raw_comments (cyclomatic 35) crates/rspack_plugin_javascript/src/magic_comment.rs:609— rspack_plugin_javascript::magic_comment::analyze_raw_comments 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.
rspack_plugin_javascript::runtime_context::render_runtime_chunk_runtime_modules_sync (cyclomatic 34) crates/rspack_plugin_javascript/src/runtime_context.rs:198— rspack_plugin_javascript::runtime_context::render_runtime_chunk_runtime_modules_sync 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.
rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_add (cyclomatic 29) crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:302— rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_add 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.
rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_get_linking_error (cyclomatic 27) crates/rspack_plugin_javascript/src/dependency/esm/esm_import_dependency.rs:280— rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_get_linking_error 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.
rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::collect_pure_annotations (cyclomatic 24) crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:177— rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::collect_pure_annotations 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.
rspack_plugin_javascript::parser_plugin::const::if_stmt::get_hoisted_declarations (cyclomatic 23) crates/rspack_plugin_javascript/src/parser_plugin/const/if_stmt.rs:60— rspack_plugin_javascript::parser_plugin::const::if_stmt::get_hoisted_declarations 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.
rspack_plugin_javascript::visitors::dependency::context_dependency_helper::create_context_dependency (cyclomatic 23) crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:24— rspack_plugin_javascript::visitors::dependency::context_dependency_helper::create_context_dependency 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.
rspack_plugin_javascript::runtime::render_module (cyclomatic 21) crates/rspack_plugin_javascript/src/runtime.rs:131— rspack_plugin_javascript::runtime::render_module 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.
rspack_plugin_javascript::utils::eval::eval_unary_expr::eval_typeof (cyclomatic 20) crates/rspack_plugin_javascript/src/utils/eval/eval_unary_expr.rs:10— rspack_plugin_javascript::utils::eval::eval_unary_expr::eval_typeof 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.
rspack_plugin_javascript::runtime_context::render_hot_update_chunk_runtime_modules (cyclomatic 18) crates/rspack_plugin_javascript/src/runtime_context.rs:506— rspack_plugin_javascript::runtime_context::render_hot_update_chunk_runtime_modules 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.
rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_apply (cyclomatic 17) crates/rspack_plugin_javascript/src/dependency/esm/esm_import_dependency.rs:115— rspack_plugin_javascript::dependency::esm::esm_import_dependency::esm_import_dependency_apply 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.
rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::is_pure_expression (cyclomatic 17) crates/rspack_plugin_javascript/src/parser_plugin/side_effects_parser_plugin.rs:799— rspack_plugin_javascript::parser_plugin::side_effects_parser_plugin::is_pure_expression 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.
rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_strict_equality_comparison (cyclomatic 17) crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:81— rspack_plugin_javascript::utils::eval::eval_binary_expr::handle_strict_equality_comparison has cyclomatic complexity 17 (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.
rspack_plugin_javascript::dependency::branch_guard::is_dependency_export_presence_guarded (cyclomatic 16) crates/rspack_plugin_javascript/src/dependency/branch_guard.rs:35— rspack_plugin_javascript::dependency::branch_guard::is_dependency_export_presence_guarded has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (implies_export_presence, dependency_guards_export_presence). 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.
rspack_plugin_javascript::parser_plugin::common_js_imports_parse_plugin::evaluate_create_require_argument (cyclomatic 16) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:484— rspack_plugin_javascript::parser_plugin::common_js_imports_parse_plugin::evaluate_create_require_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.
rspack_plugin_javascript::plugin::flag_dependency_usage_plugin::process_referenced_module_without_nested (cyclomatic 16) crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:774— rspack_plugin_javascript::plugin::flag_dependency_usage_plugin::process_referenced_module_without_nested 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.
FixmeComment packages/rspack/src/trace/traceHookPlugin.ts:176— // FIXME: we need a compiler.id for track child compiler — 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/rspack_plugin_schemes/src/http_uri/mod.rs:341— // FIXME: add more test cases — 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/rspack_plugin_lightning_css_minimizer/src/lib.rs:188— // FIXME: Disable the warnings for now, cause it cause too much positive-negative warnings, — 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/rspack_loader_lightningcss/src/lib.rs:102— // FIXME: Disable the warnings for now, cause it cause too much positive-negative warnings, — 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/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1272— // FIXME: remove `.clone` — 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/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1791— // FIXME: should mv it to plugin(for example `parse.hooks.evaluate for`) — 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/rspack_plugin_javascript/src/utils/eval/mod.rs:377— // FIXME: maybe we can use std::ptr::eq — 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/rspack_plugin_javascript/src/parser_plugin/require_context_dependency_parser_plugin.rs:45— // FIXME: return `None` in webpack — 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/rspack_plugin_javascript/src/parser_plugin/require_context_dependency_parser_plugin.rs:73— // FIXME: return `None` in webpack — 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/rspack_plugin_javascript/src/parser_plugin/require_context_dependency_parser_plugin.rs:87— // FIXME: return `None` in webpack — 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/rspack_plugin_javascript/src/parser_plugin/provide_plugin/parser.rs:80— // FIXME: webpack use `walk_expression` here — 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/rspack_core/src/context_module_factory.rs:558— // FIXME: nodejs resolver return path of context, sometimes is '/a/b', sometimes is '/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/rspack_core/src/options/resolve/clever_merge.rs:190— // FIXME: not use clone — 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/rspack_core/src/exports/referenced_export.rs:170— // FIXME: more branch — 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/rspack_core/src/compilation/mod.rs:433— // FIXME: this should be removed in future — 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/rspack_core/src/compilation/build_module_graph/graph_updater/repair/process_dependencies.rs:44— // FIXME: now only module/context dependency can put into resolve queue. — 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/rspack_core/src/compilation/build_module_graph/graph_updater/repair/process_dependencies.rs:45— // FIXME: should align webpack — 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/rspack_binding_api/src/raw_options/raw_split_chunks/raw_split_chunk_name.rs:161— // FIXME: when set bool is true? — 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.
Duplicated block (6 lines × 2) crates/rspack_binding_api/src/options/raw_resolve.rs:135— crates/rspack_binding_api/src/options/raw_resolve.rs:135-140 | crates/rspack_binding_api/src/options/raw_resolve.rs:263-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.
Duplicated block (6 lines × 2) crates/rspack_core/src/init_fragment.rs:490— crates/rspack_core/src/init_fragment.rs:490-495 | crates/rspack_core/src/init_fragment.rs:512-517 — both copies are in the same file, so extract the 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/rspack_core/src/new_cache/snapshot/file_system_info.rs:935— crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:935-940 | crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:976-981 — both copies are in the same file, so extract the 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/rspack_plugin_externals/src/http_externals_plugin.rs:49— crates/rspack_plugin_externals/src/http_externals_plugin.rs:49-54 | crates/rspack_plugin_externals/src/http_externals_plugin.rs:87-92 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:1669— crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:1669-1674 | crates/rspack_plugin_javascript/src/parser_plugin/import_meta_plugin.rs:403-410 — 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/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:218— crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:218-223 | crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:269-274 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:558— crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:558-563 | crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:595-600 — both copies are in the same file, so extract the 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/rspack_plugin_library/src/export_property_library_plugin.rs:64— crates/rspack_plugin_library/src/export_property_library_plugin.rs:64-69 | crates/rspack_plugin_library/src/module_library_plugin.rs:49-54 — 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/rspack_plugin_runtime/src/array_push_callback_chunk_format.rs:29— crates/rspack_plugin_runtime/src/array_push_callback_chunk_format.rs:29-34 | crates/rspack_plugin_runtime/src/common_js_chunk_format.rs:33-38 — 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/rspack_sources/src/concat_source.rs:146— crates/rspack_sources/src/concat_source.rs:146-151 | crates/rspack_sources/src/concat_source.rs:159-164 — both copies are in the same file, so extract the 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/rspack_tracing/src/perfetto.rs:96— crates/rspack_tracing/src/perfetto.rs:96-101 | crates/rspack_tracing/src/perfetto.rs:152-157 — both copies are in the same file, so extract the 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/rspack_core/src/options/snapshot.rs:13— crates/rspack_core/src/options/snapshot.rs:13-18 | crates/rspack_util/src/asset_condition.rs:10-15 — 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/rspack_plugin_library/src/amd_library_plugin.rs:66— crates/rspack_plugin_library/src/amd_library_plugin.rs:66-71 | crates/rspack_plugin_library/src/jsonp_library_plugin.rs:49-54 — before extracting anything, compare `crates/rspack_plugin_library/src/amd_library_plugin.rs` and `crates/rspack_plugin_library/src/jsonp_library_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (6 lines × 2) crates/rspack_plugin_runtime/src/runtime_plugin.rs:111— crates/rspack_plugin_runtime/src/runtime_plugin.rs:111-116 | crates/rspack_plugin_swc_js_minimizer/src/lib.rs:204-209 — 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/rspack_allocative_derive/src/derive_allocative.rs:29— crates/rspack_allocative_derive/src/derive_allocative.rs:29-34 | crates/rspack_allocative_derive/src/root.rs:15-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 both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/rspack_dojang/src/eval.rs:281— crates/rspack_dojang/src/eval.rs:281-286 | crates/rspack_dojang/src/eval.rs:341-346 — both copies are in the same file, so extract the 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/rspack_cacheable/src/with/as_tuple2.rs:24— crates/rspack_cacheable/src/with/as_tuple2.rs:24-29 | crates/rspack_cacheable/src/with/as_tuple3.rs:25-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.
rspack_core::options::resolve::clever_merge::_merge_resolve (cyclomatic 131) crates/rspack_core/src/options/resolve/clever_merge.rs:194— rspack_core::options::resolve::clever_merge::_merge_resolve has cyclomatic complexity 131 (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.
rspack_core::options::resolve::clever_merge::parse_resolve (cyclomatic 122) crates/rspack_core/src/options/resolve/clever_merge.rs:76— rspack_core::options::resolve::clever_merge::parse_resolve has cyclomatic complexity 122 (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.
rspack_core::utils::module_rules::module_rule_matcher_async (cyclomatic 46) crates/rspack_core/src/utils/module_rules.rs:267— rspack_core::utils::module_rules::module_rule_matcher_async 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.
rspack_core::compilation::create_hash::create_hash (cyclomatic 40) crates/rspack_core/src/compilation/create_hash/mod.rs:34— rspack_core::compilation::create_hash::create_hash has cyclomatic complexity 40 (threshold 15). Of this number, 37 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.
rspack_core::utils::module_rules::module_rule_matcher_sync (cyclomatic 36) crates/rspack_core/src/utils/module_rules.rs:115— rspack_core::utils::module_rules::module_rule_matcher_sync has cyclomatic complexity 36 (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.
rspack_core::compilation::runtime_requirements::process_chunks_runtime_requirements (cyclomatic 31) crates/rspack_core/src/compilation/runtime_requirements/mod.rs:297— rspack_core::compilation::runtime_requirements::process_chunks_runtime_requirements has cyclomatic complexity 31 (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.
rspack_core::utils::find_graph_roots::find_graph_roots (cyclomatic 31) crates/rspack_core/src/utils/find_graph_roots.rs:59— rspack_core::utils::find_graph_roots::find_graph_roots 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.
rspack_core::context_module::create_identifier (cyclomatic 25) crates/rspack_core/src/context_module.rs:1628— rspack_core::context_module::create_identifier 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.
rspack_core::utils::compile_boolean_matcher::items_to_regexp (cyclomatic 25) crates/rspack_core/src/utils/compile_boolean_matcher.rs:80— rspack_core::utils::compile_boolean_matcher::items_to_regexp 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.
rspack_core::module::get_exports_type_impl (cyclomatic 21) crates/rspack_core/src/module.rs:924— rspack_core::module::get_exports_type_impl has cyclomatic complexity 21 (threshold 15). Of this number, 19 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.
rspack_core::resolver::resolve_for_error_hints (cyclomatic 21) crates/rspack_core/src/resolver/mod.rs:115— rspack_core::resolver::resolve_for_error_hints 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.
rspack_core::runtime_template::runtime_globals_to_render_map (cyclomatic 21) crates/rspack_core/src/runtime_template.rs:418— rspack_core::runtime_template::runtime_globals_to_render_map 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.
rspack_core::compilation::build_chunk_graph::code_splitter::extract_block_modules (cyclomatic 18) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2963— rspack_core::compilation::build_chunk_graph::code_splitter::extract_block_modules 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.
rspack_core::compilation::create_module_hashes::create_module_hashes_pass_impl (cyclomatic 16) crates/rspack_core/src/compilation/create_module_hashes/mod.rs:23— rspack_core::compilation::create_module_hashes::create_module_hashes_pass_impl 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.
rspack_core::context_module_factory::visit_dirs (cyclomatic 16) crates/rspack_core/src/context_module_factory.rs:505— rspack_core::context_module_factory::visit_dirs 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.
rspack_core::stats::utils::get_chunk_relations (cyclomatic 16) crates/rspack_core/src/stats/utils.rs:226— rspack_core::stats::utils::get_chunk_relations 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.
Duplicated block (14 lines × 2) crates/css-module-lexer/src/css_syntax.rs:91— crates/css-module-lexer/src/css_syntax.rs:91-104 | crates/css-module-lexer/src/css_syntax.rs:145-158 — both copies are in the same file, so extract the 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/css-module-lexer/src/dependencies.rs:2911— crates/css-module-lexer/src/dependencies.rs:2911-2924 | crates/css-module-lexer/src/dependencies.rs:3119-3132 — both copies are in the same file, so extract the 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/rspack/src/builder/mod.rs:3514— crates/rspack/src/builder/mod.rs:3514-3527 | crates/rspack/src/builder/mod.rs:3562-3575 — both copies are in the same file, so extract the 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/rspack_binding_api/src/async_dependency_block.rs:35— crates/rspack_binding_api/src/async_dependency_block.rs:35-48 | crates/rspack_binding_api/src/module.rs:319-332 — 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 (14 lines × 2) crates/rspack_core/src/stats/mod.rs:1545— crates/rspack_core/src/stats/mod.rs:1545-1559 | crates/rspack_core/src/stats/mod.rs:1661-1674 — both copies are in the same file, so extract the 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/rspack_loader_swc/src/rsc_transforms/server_actions.rs:399— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:399-412 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:566-579 — both copies are in the same file, so extract the 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/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:692— crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:692-705 | crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:776-789 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/dependency/esm/esm_export_expression_dependency.rs:225— crates/rspack_plugin_javascript/src/dependency/esm/esm_export_expression_dependency.rs:225-238 | crates/rspack_plugin_javascript/src/dependency/esm/esm_export_expression_dependency.rs:279-292 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/dependency/esm/import_eager_dependency.rs:176— crates/rspack_plugin_javascript/src/dependency/esm/import_eager_dependency.rs:176-189 | crates/rspack_plugin_javascript/src/dependency/esm/import_weak_dependency.rs:189-202 — 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 (14 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:589— crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:589-602 | crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:653-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 (14 lines × 2) crates/rspack_plugin_javascript/src/plugin/infer_async_modules_plugin.rs:135— crates/rspack_plugin_javascript/src/plugin/infer_async_modules_plugin.rs:135-148 | crates/rspack_plugin_javascript/src/plugin/infer_async_modules_plugin.rs:171-184 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/runtime_context.rs:439— crates/rspack_plugin_javascript/src/runtime_context.rs:439-452 | crates/rspack_plugin_javascript/src/runtime_context.rs:542-555 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:181— crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:181-194 | crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:258-271 — both copies are in the same file, so extract the 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/rspack_plugin_mf/src/sharing/provide_shared_plugin.rs:294— crates/rspack_plugin_mf/src/sharing/provide_shared_plugin.rs:294-307 | crates/rspack_plugin_mf/src/sharing/provide_shared_plugin.rs:315-328 — both copies are in the same file, so extract the 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/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:276— crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:276-289 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:287-300 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
Duplicated block (14 lines × 2) crates/rspack_plugin_externals/src/http_externals_plugin.rs:71— crates/rspack_plugin_externals/src/http_externals_plugin.rs:71-84 | crates/rspack_plugin_externals/src/http_externals_plugin.rs:109-122 — both copies are in the same file, so extract the 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/rspack/src/builder/target.rs:250— crates/rspack/src/builder/target.rs:250-261 | crates/rspack/src/builder/target.rs:405-416 — both copies are in the same file, so extract the 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/rspack_binding_api/src/lib.rs:172— crates/rspack_binding_api/src/lib.rs:172-183 | crates/rspack_binding_api/src/lib.rs:200-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 lines × 2) crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:636— crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:636-647 | crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:677-688 — both copies are in the same file, so extract the 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/rspack_javascript_compiler/src/compiler/parse.rs:150— crates/rspack_javascript_compiler/src/compiler/parse.rs:150-161 | crates/rspack_loader_swc/src/lib.rs:321-332 — 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/rspack_loader_swc/src/rsc_transforms/server_actions.rs:707— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:707-718 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:721-732 — both copies are in the same file, so extract the 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/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:608— crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:608-619 | crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:707-718 — both copies are in the same file, so extract the 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/rspack_plugin_esm_library/src/optimize_chunks.rs:45— crates/rspack_plugin_esm_library/src/optimize_chunks.rs:45-56 | crates/rspack_plugin_esm_library/src/optimize_chunks.rs:576-587 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/dependency/commonjs/common_js_exports_dependency.rs:195— crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_exports_dependency.rs:195-206 | crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_self_reference_dependency.rs:164-175 — 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 (12 lines × 2) crates/rspack_plugin_javascript/src/magic_comment.rs:751— crates/rspack_plugin_javascript/src/magic_comment.rs:751-762 | crates/rspack_plugin_javascript/src/magic_comment.rs:764-775 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/define_plugin/parser.rs:190— crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/parser.rs:190-201 | crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/parser.rs:225-236 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:465— crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:465-476 | crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:479-490 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:2013— crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:2013-2024 | crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:2032-2043 — both copies are in the same file, so extract the 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/rspack_plugin_library/src/assign_library_plugin.rs:510— crates/rspack_plugin_library/src/assign_library_plugin.rs:510-521 | crates/rspack_plugin_library/src/export_property_library_plugin.rs:185-196 — 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 (12 lines × 2) crates/rspack_plugin_runtime/src/common_js_chunk_format.rs:215— crates/rspack_plugin_runtime/src/common_js_chunk_format.rs:215-226 | crates/rspack_plugin_runtime/src/module_chunk_format.rs:403-414 — before extracting anything, compare `crates/rspack_plugin_runtime/src/common_js_chunk_format.rs` and `crates/rspack_plugin_runtime/src/module_chunk_format.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. 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 × 2) crates/rspack_dojang/src/context.rs:403— crates/rspack_dojang/src/context.rs:403-415 | crates/rspack_dojang/src/context.rs:426-437 — both copies are in the same file, so extract the 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/rspack_core/src/artifacts/runtime_proxy_metadata_artifact.rs:79— crates/rspack_core/src/artifacts/runtime_proxy_metadata_artifact.rs:79-90 | crates/rspack_core/src/compilation/build_module_graph/module_executor/execute.rs:77-88 — 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.
LexDependencies::lex_streaming_inner (cognitive 90) crates/css-module-lexer/src/dependencies.rs:1567— LexDependencies::lex_streaming_inner has cognitive complexity 90 (threshold 15). Drivers by points: if/else 27 (62 pts), boolean chains 23, match/switch 2 (4 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.
LexDependencies::handle_ident (cognitive 83) crates/css-module-lexer/src/dependencies.rs:4109— LexDependencies::handle_ident has cognitive complexity 83 (threshold 15). Drivers by points: if/else 27 (70 pts), boolean chains 12, match/switch 1 (nesting depth added 43). 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.
LexDependencies::lex_composes (cognitive 71) crates/css-module-lexer/src/dependencies.rs:3185— LexDependencies::lex_composes has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (64 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LexDependencies::lex_value_at_rule (cognitive 37) crates/css-module-lexer/src/dependencies.rs:2493— LexDependencies::lex_value_at_rule has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 5, 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.
LexDependencies::handle_function (cognitive 29) crates/css-module-lexer/src/dependencies.rs:3938— LexDependencies::handle_function has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 8 (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.
LexDependencies::lex_local_function_decl (cognitive 27) crates/css-module-lexer/src/dependencies.rs:3027— LexDependencies::lex_local_function_decl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 6 (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.
LexDependencies::handle_string (cognitive 26) crates/css-module-lexer/src/dependencies.rs:3510— LexDependencies::handle_string has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, match/switch 3 (4 pts), loops 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.
LexDependencies::handle_at_keyword (cognitive 23) crates/css-module-lexer/src/dependencies.rs:3611— LexDependencies::handle_at_keyword has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (22 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.
LexDependencies::handle_semicolon (cognitive 23) crates/css-module-lexer/src/dependencies.rs:3808— LexDependencies::handle_semicolon has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 3 (5 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.
LexDependencies::lex_local_keyframes_decl (cognitive 22) crates/css-module-lexer/src/dependencies.rs:2828— LexDependencies::lex_local_keyframes_decl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4 (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.
LexDependencies::handle_right_parenthesis (cognitive 22) crates/css-module-lexer/src/dependencies.rs:4032— LexDependencies::handle_right_parenthesis has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 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.
LexDependencies::handle_left_curly_bracket (cognitive 22) crates/css-module-lexer/src/dependencies.rs:4377— LexDependencies::handle_left_curly_bracket has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, 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.
LexDependencies::handle_pseudo_class (cognitive 18) crates/css-module-lexer/src/dependencies.rs:4564— LexDependencies::handle_pseudo_class has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 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.
LexDependencies::classify_property (cognitive 17) crates/css-module-lexer/src/dependencies.rs:2163— LexDependencies::classify_property has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (17 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, 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.
LexDependencies::handle_recovery_boundary (cognitive 17) crates/css-module-lexer/src/dependencies.rs:3741— LexDependencies::handle_recovery_boundary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, loops 1 (3 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.
TooManyFields: Compilation crates/rspack_core/src/compilation/mod.rs:213— TooManyFields — 71 stored fields beside 56 methods. The bar is 30 stored fields; this is 41 over it, 2.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.
TooManyFields: JsHooksAdapterPlugin crates/rspack_binding_api/src/plugins/js_hooks_plugin.rs:20— TooManyFields — 55 stored fields beside 2 methods. The bar is 30 stored fields; this is 25 over it, 1.83× 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.
TooManyFields: RegisterJsTaps crates/rspack_binding_api/src/plugins/interceptor.rs:515— TooManyFields — 54 stored fields. The bar is 30 stored fields; this is 24 over it, 1.80× 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.
TooManyFields: JavascriptParser crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:472— TooManyFields — 52 stored fields beside 230 methods. The bar is 30 stored fields; this is 22 over it, 1.73× 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.
TooManyFields: OutputOptionsBuilder crates/rspack/src/builder/mod.rs:2174— TooManyFields — 47 stored fields beside 48 methods. The bar is 30 stored fields; this is 17 over it, 1.57× 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.
TooManyFields: RawOutputOptions crates/rspack_binding_api/src/raw_options/raw_output.rs:93— TooManyFields — 43 stored fields. The bar is 30 stored fields; this is 13 over it, 1.43× 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.
TooManyFields: OutputOptions crates/rspack_core/src/options/output.rs:29— TooManyFields — 41 stored fields. 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.
TooManyFields: CodeSplitter crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:351— TooManyFields — 39 stored fields beside 37 methods. The bar is 30 stored fields; this is 9 over it, 1.30× 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.
TooManyFields: CompilationHooks crates/rspack_core/src/compilation/mod.rs:150— TooManyFields — 39 stored fields. The bar is 30 stored fields; this is 9 over it, 1.30× 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.
TooManyFields: StatsModule crates/rspack_core/src/stats/struct.rs:153— TooManyFields — 35 stored fields. The bar is 30 stored fields; this is 5 over it, 1.17× 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.
TooManyFields: JavascriptParserOptions crates/rspack_core/src/options/module.rs:501— TooManyFields — 31 stored fields beside 3 methods. The bar is 30 stored fields; this is 1 over it, 1.03× 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.
TooManyFields: RawJavascriptParserOptions crates/rspack_binding_api/src/raw_options/raw_module/mod.rs:297— TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× 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.
Duplicated block (15 lines × 2) crates/rspack/src/builder/mod.rs:2941— crates/rspack/src/builder/mod.rs:2941-2955 | crates/rspack/src/builder/mod.rs:2987-3001 — both copies are in the same file, so extract the 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/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:457— crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:457-471 | crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:496-510 — both copies are in the same file, so extract the 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/rspack_core/src/compilation/create_hash/mod.rs:175— crates/rspack_core/src/compilation/create_hash/mod.rs:175-189 | crates/rspack_core/src/compilation/create_hash/mod.rs:350-364 — both copies are in the same file, so extract the 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/rspack_core/src/module_graph/mod.rs:444— crates/rspack_core/src/module_graph/mod.rs:444-458 | crates/rspack_core/src/module_graph/mod.rs:475-489 — both copies are in the same file, so extract the 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/rspack_core/src/utils/mod.rs:147— crates/rspack_core/src/utils/mod.rs:147-161 | crates/rspack_core/src/utils/mod.rs:174-188 — both copies are in the same file, so extract the 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/rspack_ids/src/id_helpers.rs:475— crates/rspack_ids/src/id_helpers.rs:475-491 | crates/rspack_ids/src/id_helpers.rs:541-555 — both copies are in the same file, so extract the 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/rspack_plugin_esm_library/src/link.rs:1257— crates/rspack_plugin_esm_library/src/link.rs:1257-1271 | crates/rspack_plugin_esm_library/src/link.rs:1274-1288 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:314— crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:314-328 | crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:343-357 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:495— crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:495-509 | crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:815-829 — both copies are in the same file, so extract the 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/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:264— crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:264-278 | crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:474-488 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 (15 lines × 2) crates/rspack_core/src/compilation/create_chunk_assets/mod.rs:100— crates/rspack_core/src/compilation/create_chunk_assets/mod.rs:100-114 | crates/rspack_core/src/compilation/runtime_requirements/mod.rs:116-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.
Duplicated block (15 lines × 2) crates/rspack_plugin_rstest/src/parser_plugin.rs:263— crates/rspack_plugin_rstest/src/parser_plugin.rs:263-277 | crates/rspack_plugin_rstest/src/parser_plugin.rs:319-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.
EsmLibraryPlugin::link_imports_and_exports (cognitive 218) crates/rspack_plugin_esm_library/src/link.rs:2111— EsmLibraryPlugin::link_imports_and_exports has cognitive complexity 218 (threshold 15). Drivers by points: if/else 43 (139 pts), loops 27 (59 pts), match/switch 5 (13 pts), boolean chains 7 (nesting depth added 136). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EsmLibraryPlugin::link (cognitive 158) crates/rspack_plugin_esm_library/src/link.rs:514— EsmLibraryPlugin::link has cognitive complexity 158 (threshold 15). Drivers by points: if/else 27 (112 pts), match/switch 3 (28 pts), loops 7 (13 pts), boolean chains 5 (nesting depth added 116). 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.
EsmLibraryPlugin::render_chunk (cognitive 136) crates/rspack_plugin_esm_library/src/render.rs:131— EsmLibraryPlugin::render_chunk has cognitive complexity 136 (threshold 15). Drivers by points: if/else 50 (95 pts), loops 20 (32 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EsmLibraryPlugin::deconflict_symbols (cognitive 129) crates/rspack_plugin_esm_library/src/link.rs:1005— EsmLibraryPlugin::deconflict_symbols has cognitive complexity 129 (threshold 15). Drivers by points: if/else 33 (93 pts), loops 11 (19 pts), boolean chains 11, match/switch 3 (6 pts) (nesting depth added 71). 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.
EsmLibraryPlugin::link_entry_module_exports (cognitive 91) crates/rspack_plugin_esm_library/src/link.rs:1789— EsmLibraryPlugin::link_entry_module_exports has cognitive complexity 91 (threshold 15). Drivers by points: if/else 19 (59 pts), boolean chains 17, match/switch 4 (12 pts), loops 2 (3 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EsmLibraryPlugin::get_binding (cognitive 33) crates/rspack_plugin_esm_library/src/link.rs:2909— EsmLibraryPlugin::get_binding has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 9 (15 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.
EsmLibraryPlugin::mark_modules (cognitive 30) crates/rspack_plugin_esm_library/src/plugin.rs:112— EsmLibraryPlugin::mark_modules has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 5, loops 3 (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.
EsmLibraryPlugin::render_module (cognitive 26) crates/rspack_plugin_esm_library/src/render.rs:773— EsmLibraryPlugin::render_module has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (5 pts), match/switch 1 (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.
EsmLibraryPlugin::analyze_module (cognitive 25) crates/rspack_plugin_esm_library/src/link.rs:1341— EsmLibraryPlugin::analyze_module has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2, 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.
EsmLibraryPlugin::get_external_import_source_and_binding (cognitive 20) crates/rspack_plugin_esm_library/src/link.rs:467— EsmLibraryPlugin::get_external_import_source_and_binding has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 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.
EsmLibraryPlugin::resolve_re_export_star_from_unknown (cognitive 19) crates/rspack_plugin_esm_library/src/link.rs:1540— EsmLibraryPlugin::resolve_re_export_star_from_unknown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 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.
CodeSplitter::invalidate_chunk_group (cognitive 77) crates/rspack_core/src/compilation/build_chunk_graph/incremental.rs:97— CodeSplitter::invalidate_chunk_group has cognitive complexity 77 (threshold 15). Drivers by points: if/else 24 (57 pts), loops 9 (16 pts), boolean chains 4 (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.
CodeSplitter::update_with_compilation (cognitive 56) crates/rspack_core/src/compilation/build_chunk_graph/incremental.rs:488— CodeSplitter::update_with_compilation has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (31 pts), loops 12 (22 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.
CodeSplitter::split (cognitive 44) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1147— CodeSplitter::split has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 6 (10 pts), boolean chains 3 (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.
CodeSplitter::make_chunk_group (cognitive 44) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1863— CodeSplitter::make_chunk_group has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 4 (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.
CodeSplitter::process_chunk_groups_for_merging (cognitive 43) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2703— CodeSplitter::process_chunk_groups_for_merging has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 6 (11 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.
CodeSplitter::set_entry_runtime_and_depend_on (cognitive 38) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:810— CodeSplitter::set_entry_runtime_and_depend_on has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 3 (8 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.
CodeSplitter::can_reuse_affected_module (cognitive 28) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:478— CodeSplitter::can_reuse_affected_module has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 5 (8 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.
CodeSplitter::process_block (cognitive 22) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1761— CodeSplitter::process_block has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (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.
CodeSplitter::process_chunk_groups_for_combining (cognitive 20) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2507— CodeSplitter::process_chunk_groups_for_combining has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (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.
CodeSplitter::process_outdated_chunk_group_info (cognitive 18) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2350— CodeSplitter::process_outdated_chunk_group_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 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.
CodeSplitter::process_chunk_groups_for_adding (cognitive 16) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2601— CodeSplitter::process_chunk_groups_for_adding has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 6 (7 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.
JavascriptParser::walk_assignment_expression (cognitive 33) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1947— JavascriptParser::walk_assignment_expression has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 5 (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.
JavascriptParser::walk_call_expression (cognitive 32) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1642— JavascriptParser::walk_call_expression has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 4, match/switch 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.
JavascriptParser::walk_member_expression (cognitive 27) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1279— JavascriptParser::walk_member_expression has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 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.
JavascriptParser::evaluating (cognitive 25) crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1792— JavascriptParser::evaluating has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, 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.
JavascriptParser::walk_variable_declaration (cognitive 24) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:548— JavascriptParser::walk_variable_declaration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 4, 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.
JavascriptParser::walk_class (cognitive 24) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:2283— JavascriptParser::walk_class has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 2 (3 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.
JavascriptParser::build_plugin_drive (cognitive 23) crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:553— JavascriptParser::build_plugin_drive has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8 (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.
JavascriptParser::walk_if_statement (cognitive 22) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:390— JavascriptParser::walk_if_statement has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (21 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.
JavascriptParser::_walk_iife (cognitive 19) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1519— JavascriptParser::_walk_iife has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2, match/switch 2 (nesting depth added 3). Of this number, 14 points are the body's own statements and 5 belong to 2 function items 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.
JavascriptParser::extract_member_expression_chain_raw (cognitive 17) crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1427— JavascriptParser::extract_member_expression_chain_raw 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.
JavascriptParser::enter_assignment_target_pattern (cognitive 17) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1887— JavascriptParser::enter_assignment_target_pattern has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 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.
Low cohesion: NativeFileSystem (LCOM4 15) crates/rspack_fs/src/native_fs.rs:23— NativeFileSystem's methods fall into 15 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 15 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: APIPlugin (LCOM4 12) crates/rspack_plugin_javascript/src/parser_plugin/api_plugin.rs:262— APIPlugin's methods fall into 12 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 12 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: InnerGraphParserPlugin (LCOM4 12) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:46— InnerGraphParserPlugin's methods fall into 12 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 12 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: Compilation (LCOM4 7) crates/rspack_core/src/compilation/mod.rs:213— Compilation'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: ImportMetaPlugin (LCOM4 6) crates/rspack_plugin_javascript/src/parser_plugin/import_meta_plugin.rs:307— ImportMetaPlugin'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: ResolveContext (LCOM4 6) crates/rspack_resolver/src/context.rs:8— ResolveContext'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: JsPlugin (LCOM4 5) crates/rspack_plugin_javascript/src/plugin/mod.rs:109— JsPlugin'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: OutputOptionsBuilder (LCOM4 4) crates/rspack/src/builder/mod.rs:2174— OutputOptionsBuilder'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: RuntimeGlobals (LCOM4 4) crates/rspack_core/src/runtime_globals.rs:10— RuntimeGlobals'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: SplitChunkSizes (LCOM4 4) crates/rspack_plugin_split_chunks/src/common.rs:121— SplitChunkSizes'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: FsWatcher (LCOM4 4) crates/rspack_watcher/src/lib.rs:138— FsWatcher'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.
LexDependencies::lex_streaming_inner (cyclomatic 82) crates/css-module-lexer/src/dependencies.rs:1567— LexDependencies::lex_streaming_inner has cyclomatic complexity 82 (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.
LexDependencies::handle_ident (cyclomatic 43) crates/css-module-lexer/src/dependencies.rs:4109— LexDependencies::handle_ident 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.
LexDependencies::lex_composes (cyclomatic 30) crates/css-module-lexer/src/dependencies.rs:3185— LexDependencies::lex_composes 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.
LexDependencies::handle_function (cyclomatic 23) crates/css-module-lexer/src/dependencies.rs:3938— LexDependencies::handle_function 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.
LexDependencies::handle_string (cyclomatic 21) crates/css-module-lexer/src/dependencies.rs:3510— LexDependencies::handle_string 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.
LexDependencies::lex_local_function_decl (cyclomatic 20) crates/css-module-lexer/src/dependencies.rs:3027— LexDependencies::lex_local_function_decl 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. This is NOT this file's highest cyclomatic complexity: AnimationReserved::check (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.
LexDependencies::lex_value_at_rule (cyclomatic 19) crates/css-module-lexer/src/dependencies.rs:2493— LexDependencies::lex_value_at_rule 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: AnimationReserved::check (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.
LexDependencies::handle_left_curly_bracket (cyclomatic 19) crates/css-module-lexer/src/dependencies.rs:4377— LexDependencies::handle_left_curly_bracket 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: AnimationReserved::check (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.
LexDependencies::handle_at_keyword (cyclomatic 17) crates/css-module-lexer/src/dependencies.rs:3611— LexDependencies::handle_at_keyword 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: AnimationReserved::check (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.
LexDependencies::lex_local_keyframes_decl (cyclomatic 16) crates/css-module-lexer/src/dependencies.rs:2828— LexDependencies::lex_local_keyframes_decl 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: AnimationReserved::check (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.
rspack_plugin_mf::manifest::process_assets (cognitive 245) crates/rspack_plugin_mf/src/manifest/mod.rs:163— rspack_plugin_mf::manifest::process_assets has cognitive complexity 245 (threshold 15). Drivers by points: if/else 48 (175 pts), loops 19 (61 pts), boolean chains 7, match/switch 2 (nesting depth added 169). 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.
rspack_plugin_mf::sharing::shared_used_exports_optimizer_plugin::optimize_dependencies (cognitive 72) crates/rspack_plugin_mf/src/sharing/shared_used_exports_optimizer_plugin.rs:129— rspack_plugin_mf::sharing::shared_used_exports_optimizer_plugin::optimize_dependencies has cognitive complexity 72 (threshold 15). Drivers by points: if/else 17 (51 pts), loops 4 (15 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 47). 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.
rspack_plugin_mf::manifest::utils::collect_entry_files (cognitive 67) crates/rspack_plugin_mf/src/manifest/utils.rs:37— rspack_plugin_mf::manifest::utils::collect_entry_files has cognitive complexity 67 (threshold 15). Drivers by points: if/else 8 (38 pts), loops 7 (28 pts), boolean chains 1 (nesting depth added 51). 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.
rspack_plugin_mf::sharing::collect_shared_entry_plugin::finish_make (cognitive 53) crates/rspack_plugin_mf/src/sharing/collect_shared_entry_plugin.rs:100— rspack_plugin_mf::sharing::collect_shared_entry_plugin::finish_make has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 6 (12 pts), match/switch 2 (6 pts), boolean chains 2 (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.
rspack_plugin_mf::manifest::asset::collect_assets_from_chunk (cognitive 48) crates/rspack_plugin_mf/src/manifest/asset.rs:11— rspack_plugin_mf::manifest::asset::collect_assets_from_chunk has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 8 (18 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.
rspack_plugin_mf::container::hoist_container_references_plugin::optimize_chunks (cognitive 34) crates/rspack_plugin_mf/src/container/hoist_container_references_plugin.rs:140— rspack_plugin_mf::container::hoist_container_references_plugin::optimize_chunks has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 20). Of this number, 21 points are the body's own statements and 13 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.
rspack_plugin_mf::sharing::shared_used_exports_optimizer_plugin::dependency_referenced_exports (cognitive 24) crates/rspack_plugin_mf/src/sharing/shared_used_exports_optimizer_plugin.rs:384— rspack_plugin_mf::sharing::shared_used_exports_optimizer_plugin::dependency_referenced_exports has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (5 pts), boolean chains 4 (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.
rspack_plugin_mf::manifest::asset::module_source_path (cognitive 23) crates/rspack_plugin_mf/src/manifest/asset.rs:190— rspack_plugin_mf::manifest::asset::module_source_path has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 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.
rspack_plugin_mf::container::container_reference_plugin::factorize (cognitive 19) crates/rspack_plugin_mf/src/container/container_reference_plugin.rs:66— rspack_plugin_mf::container::container_reference_plugin::factorize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (2 pts) (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.
rspack_plugin_esm_library::optimize_chunks::extract_tla_shared_modules (cognitive 99) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:27— rspack_plugin_esm_library::optimize_chunks::extract_tla_shared_modules has cognitive complexity 99 (threshold 15). Drivers by points: if/else 19 (62 pts), loops 16 (36 pts), boolean chains 1 (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rspack_plugin_esm_library::optimize_chunks::analyze_dyn_import_targets (cognitive 84) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:565— rspack_plugin_esm_library::optimize_chunks::analyze_dyn_import_targets has cognitive complexity 84 (threshold 15). Drivers by points: if/else 22 (59 pts), loops 10 (18 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rspack_plugin_esm_library::split_chunks::split (cognitive 68) crates/rspack_plugin_esm_library/src/split_chunks.rs:176— rspack_plugin_esm_library::split_chunks::split has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (40 pts), loops 8 (15 pts), match/switch 6 (13 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.
rspack_plugin_esm_library::preserve_modules::preserve_modules (cognitive 53) crates/rspack_plugin_esm_library/src/preserve_modules.rs:114— rspack_plugin_esm_library::preserve_modules::preserve_modules has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (46 pts), match/switch 2 (4 pts), boolean chains 2, 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.
rspack_plugin_esm_library::optimize_chunks::assign_dyn_import_chunk_short_names (cognitive 40) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:878— rspack_plugin_esm_library::optimize_chunks::assign_dyn_import_chunk_short_names has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 7 (12 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.
rspack_plugin_esm_library::plugin::process_assets (cognitive 37) crates/rspack_plugin_esm_library/src/plugin.rs:559— rspack_plugin_esm_library::plugin::process_assets has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 4 (6 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.
rspack_plugin_esm_library::dependency::commonjs_external::cutout_commonjs_externals (cognitive 36) crates/rspack_plugin_esm_library/src/dependency/commonjs_external.rs:43— rspack_plugin_esm_library::dependency::commonjs_external::cutout_commonjs_externals has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 4 (6 pts), boolean chains 4 (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.
rspack_plugin_esm_library::plugin::optimize_chunk_modules (cognitive 33) crates/rspack_plugin_esm_library/src/plugin.rs:762— rspack_plugin_esm_library::plugin::optimize_chunk_modules has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 6 (13 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.
rspack_plugin_esm_library::optimize_chunks::ensure_entry_exports (cognitive 22) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:273— rspack_plugin_esm_library::optimize_chunks::ensure_entry_exports has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 4 (9 pts) (nesting depth added 11). 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.
Repeated repair: crates/rspack_plugin_javascript/src/plugin/url_plugin.rs crates/rspack_plugin_javascript/src/plugin/url_plugin.rs:69— crates/rspack_plugin_javascript/src/plugin/url_plugin.rs changed 9 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 rspack_plugin_javascript::plugin::url_plugin::replace_static_url_placeholders at line 69), 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: revert "feat: support JavaScript URL entries with factory type probes" (#15840)”; “fix(javascript): handle shared URL asset runtimes (#15446)”; “revert: remove faster module concatenation (#15262)”; “fix: preserve ignored URL when import.meta.url is disabled (#15075)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/plugin/url_plugin.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/rspack_binding_api/src/plugins/js_hooks_plugin.rs crates/rspack_binding_api/src/plugins/js_hooks_plugin.rs:84— crates/rspack_binding_api/src/plugins/js_hooks_plugin.rs changed 9 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 1 (its worst body is JsHooksAdapterPlugin::fmt at line 84), 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(loader): revert native loader hook invocation (#15719)”; “fix: revert "feat(core): expose NormalModule beforeLoaders hook to JS" (#15660)”; “fix(loader): invoke loader hooks through the native hook (#15591)”; “fix: revert afterOptimizeChunkIds and renderContent hooks (#15471)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_binding_api/src/plugins/js_hooks_plugin.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/rspack_ids/src/compact_hashed_chunk_ids_plugin.rs crates/rspack_ids/src/compact_hashed_chunk_ids_plugin.rs:44— crates/rspack_ids/src/compact_hashed_chunk_ids_plugin.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 6 (its worst body is rspack_ids::compact_hashed_chunk_ids_plugin::chunk_ids at line 44), 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(ids): rehash identical keys in compact-hashed ids (#15915)”; “fix: avoid chunk name collisions in compact hashed ids (#15693)”; “fix(esm): remove empty chunks except for facade chunks (#15424)”; “fix(ids): correct compact hashed API names (#15356)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_ids/src/compact_hashed_chunk_ids_plugin.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/rspack_binding_api/src/raw_options/raw_split_chunks/mod.rs crates/rspack_binding_api/src/raw_options/raw_split_chunks/mod.rs:123— crates/rspack_binding_api/src/raw_options/raw_split_chunks/mod.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 12 (its worst body is RawSplitChunksOptions::normalize at line 123), 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: “Revert "fix: inherit splitChunks request limits in cache group" (#16273)”; “fix: inherit splitChunks request limits in cache groups (#16191)”; “fix(split-chunks): support minRemainingSize (#15594)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_binding_api/src/raw_options/raw_split_chunks/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/css-module-lexer/src/dependency_types.rs crates/css-module-lexer/src/dependency_types.rs:686— crates/css-module-lexer/src/dependency_types.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 12 (its worst body is Warning::fmt at line 686), 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): localize type-first nested selectors (#16011)”; “fix(css): align CSS Modules behavior with webpack css-loader fixtures (#15816)”; “fix(css): CSS module dashed identifier and composes edge cases (#15223)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/css-module-lexer/src/dependency_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.
Repeated repair: crates/rspack_plugin_javascript/src/plugin/impl_plugin_for_js_plugin.rs crates/rspack_plugin_javascript/src/plugin/impl_plugin_for_js_plugin.rs:554— crates/rspack_plugin_javascript/src/plugin/impl_plugin_for_js_plugin.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 12 (its worst body is rspack_plugin_javascript::plugin::impl_plugin_for_js_plugin::render_manifest at line 554), 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: use the module exports argument for the AMD exports dependency (#16122)”; “fix: skip entry modules without JavaScript in the chunk startup (#15767)”; “fix: warn on invalid chunk names (#14854)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_javascript/src/plugin/impl_plugin_for_js_plugin.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: packages/rspack/src/util/fs.ts packages/rspack/src/util/fs.ts:590— packages/rspack/src/util/fs.ts 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 11 (its worst body is fs.rmrf at line 590), 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(types): allow Node fs as intermediate file system (#15895)”; “fix(types): allow optionless filesystem sync calls (#15438)”; “fix(types): improve loader context filesystem types (#15437)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- packages/rspack/src/util/fs.ts`: 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/rspack_plugin_sri/src/lib.rs crates/rspack_plugin_sri/src/lib.rs:186— crates/rspack_plugin_sri/src/lib.rs changed 3 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 4 (its worst body is SubresourceIntegrityPlugin::apply at line 186), 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(release): synchronize workspace versions and CLI peer dependencies (#16181)”; “fix: avoid runtime scope conflicts in module factories (#15002)”; “fix: clean up compilation-scoped plugin caches (#14999)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 10:17:13 +08:00' --until='2026-10-27 10:17:13 +08:00' --full-history --no-merges -- crates/rspack_plugin_sri/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.
Lexer::scan_value (cognitive 164) crates/css-module-lexer/src/lexer.rs:352— Lexer::scan_value has cognitive complexity 164 (threshold 15). Drivers by points: if/else 47 (125 pts), boolean chains 28, match/switch 3 (6 pts), loops 2 (5 pts) (nesting depth added 84). 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.
Lexer::scan_url (cognitive 54) crates/css-module-lexer/src/lexer.rs:1457— Lexer::scan_url has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (48 pts), boolean chains 3, loops 2 (3 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.
Lexer::fast_forward_selector (cognitive 48) crates/css-module-lexer/src/lexer.rs:759— Lexer::fast_forward_selector has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (33 pts), match/switch 4 (9 pts), boolean chains 5, loops 1 (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.
Lexer::scan_string (cognitive 41) crates/css-module-lexer/src/lexer.rs:1354— Lexer::scan_string has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (37 pts), loops 2 (3 pts), boolean chains 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.
Lexer::scan_bad_url (cognitive 36) crates/css-module-lexer/src/lexer.rs:1568— Lexer::scan_bad_url has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 2 (3 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.
Lexer::scan_name_impl (cognitive 34) crates/css-module-lexer/src/lexer.rs:1756— Lexer::scan_name_impl has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 2 (3 pts) (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.
Lexer::next_token_without_visit (cognitive 26) crates/css-module-lexer/src/lexer.rs:1069— Lexer::next_token_without_visit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 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.
Lexer::fast_forward (cognitive 16) crates/css-module-lexer/src/lexer.rs:933— Lexer::fast_forward 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.
EsmLibraryPlugin::link_imports_and_exports (cyclomatic 80) crates/rspack_plugin_esm_library/src/link.rs:2111— EsmLibraryPlugin::link_imports_and_exports has cyclomatic complexity 80 (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.
EsmLibraryPlugin::render_chunk (cyclomatic 70) crates/rspack_plugin_esm_library/src/render.rs:131— EsmLibraryPlugin::render_chunk has cyclomatic complexity 70 (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.
EsmLibraryPlugin::deconflict_symbols (cyclomatic 55) crates/rspack_plugin_esm_library/src/link.rs:1005— EsmLibraryPlugin::deconflict_symbols has cyclomatic complexity 55 (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.
EsmLibraryPlugin::link_entry_module_exports (cyclomatic 40) crates/rspack_plugin_esm_library/src/link.rs:1789— EsmLibraryPlugin::link_entry_module_exports 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.
EsmLibraryPlugin::link (cyclomatic 39) crates/rspack_plugin_esm_library/src/link.rs:514— EsmLibraryPlugin::link 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.
EsmLibraryPlugin::get_binding (cyclomatic 31) crates/rspack_plugin_esm_library/src/link.rs:2909— EsmLibraryPlugin::get_binding 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.
EsmLibraryPlugin::mark_modules (cyclomatic 18) crates/rspack_plugin_esm_library/src/plugin.rs:112— EsmLibraryPlugin::mark_modules 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.
rspack_plugin_mf::manifest::process_assets (cyclomatic 71) crates/rspack_plugin_mf/src/manifest/mod.rs:163— rspack_plugin_mf::manifest::process_assets 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.
rspack_plugin_mf::sharing::shared_used_exports_optimizer_plugin::optimize_dependencies (cyclomatic 25) crates/rspack_plugin_mf/src/sharing/shared_used_exports_optimizer_plugin.rs:129— rspack_plugin_mf::sharing::shared_used_exports_optimizer_plugin::optimize_dependencies 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.
rspack_plugin_mf::sharing::collect_shared_entry_plugin::finish_make (cyclomatic 23) crates/rspack_plugin_mf/src/sharing/collect_shared_entry_plugin.rs:100— rspack_plugin_mf::sharing::collect_shared_entry_plugin::finish_make 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.
rspack_plugin_mf::manifest::asset::collect_assets_from_chunk (cyclomatic 22) crates/rspack_plugin_mf/src/manifest/asset.rs:11— rspack_plugin_mf::manifest::asset::collect_assets_from_chunk 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.
rspack_plugin_mf::manifest::utils::collect_entry_files (cyclomatic 17) crates/rspack_plugin_mf/src/manifest/utils.rs:37— rspack_plugin_mf::manifest::utils::collect_entry_files 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.
rspack_plugin_mf::sharing::shared_used_exports_optimizer_plugin::dependency_referenced_exports (cyclomatic 17) crates/rspack_plugin_mf/src/sharing/shared_used_exports_optimizer_plugin.rs:384— rspack_plugin_mf::sharing::shared_used_exports_optimizer_plugin::dependency_referenced_exports 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.
rspack_plugin_mf::manifest::asset::module_source_path (cyclomatic 16) crates/rspack_plugin_mf/src/manifest/asset.rs:190— rspack_plugin_mf::manifest::asset::module_source_path 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.
CodeSplitter::invalidate_chunk_group (cyclomatic 38) crates/rspack_core/src/compilation/build_chunk_graph/incremental.rs:97— CodeSplitter::invalidate_chunk_group 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.
CodeSplitter::update_with_compilation (cyclomatic 29) crates/rspack_core/src/compilation/build_chunk_graph/incremental.rs:488— CodeSplitter::update_with_compilation 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.
CodeSplitter::split (cyclomatic 24) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1147— CodeSplitter::split 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.
CodeSplitter::make_chunk_group (cyclomatic 21) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:1863— CodeSplitter::make_chunk_group 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.
CodeSplitter::process_chunk_groups_for_merging (cyclomatic 19) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2703— CodeSplitter::process_chunk_groups_for_merging 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.
CodeSplitter::set_entry_runtime_and_depend_on (cyclomatic 18) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:810— CodeSplitter::set_entry_runtime_and_depend_on 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.
CodeSplitter::can_reuse_affected_module (cyclomatic 16) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:478— CodeSplitter::can_reuse_affected_module 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.
JavascriptParser::evaluating (cyclomatic 28) crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:1792— JavascriptParser::evaluating 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.
JavascriptParser::walk_call_expression (cyclomatic 23) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1642— JavascriptParser::walk_call_expression 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. This is NOT this file's highest cyclomatic complexity: JavascriptParser::walk_expression (cyclomatic 28) 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.
JavascriptParser::build_plugin_drive (cyclomatic 21) crates/rspack_plugin_javascript/src/visitors/dependency/parser/mod.rs:553— JavascriptParser::build_plugin_drive has cyclomatic complexity 21 (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.
JavascriptParser::walk_assignment_expression (cyclomatic 21) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1947— JavascriptParser::walk_assignment_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: JavascriptParser::walk_expression (cyclomatic 28) 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.
JavascriptParser::_walk_iife (cyclomatic 18) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1519— JavascriptParser::_walk_iife has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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: JavascriptParser::walk_expression (cyclomatic 28) 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.
JavascriptParser::walk_member_expression (cyclomatic 16) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:1279— JavascriptParser::walk_member_expression 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: JavascriptParser::walk_expression (cyclomatic 28) 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.
JavascriptParser::walk_class (cyclomatic 16) crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs:2283— JavascriptParser::walk_class 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: JavascriptParser::walk_expression (cyclomatic 28) 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.
No assertions: test a-1 tests/rspack-test/configCases/source-map/nosources/list.test.ts:4— 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: test a-2 tests/rspack-test/configCases/source-map/nosources/list.test.ts:9— 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: (unnamed test) tests/rspack-test/configCases/source-map/nosources/list.test.ts:17— 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: should compile tests/e2e/cases/persistent-cache/rename-file/index.test.ts:12— 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: should compile tests/e2e/cases/make/rewrite-factorize-request/index.test.ts:12— 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: should compile tests/e2e/cases/make/rewrite-factorize-reexport-request/index.test.ts:12— 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: should compile tests/e2e/cases/make/rewrite-factorize-provide-request/index.test.ts:12— 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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.
rspack_ids::named_chunk_ids_plugin::assign_named_chunk_ids (cognitive 43) crates/rspack_ids/src/named_chunk_ids_plugin.rs:19— rspack_ids::named_chunk_ids_plugin::assign_named_chunk_ids has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 7 (14 pts), boolean chains 4 (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.
rspack_ids::named_module_ids_plugin::assign_named_module_ids (cognitive 39) crates/rspack_ids/src/named_module_ids_plugin.rs:33— rspack_ids::named_module_ids_plugin::assign_named_module_ids has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 7 (14 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.
rspack_ids::named_module_ids_plugin::module_ids (cognitive 28) crates/rspack_ids/src/named_module_ids_plugin.rs:194— rspack_ids::named_module_ids_plugin::module_ids has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, loops 2 (5 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.
rspack_ids::named_chunk_ids_plugin::chunk_ids (cognitive 26) crates/rspack_ids/src/named_chunk_ids_plugin.rs:240— rspack_ids::named_chunk_ids_plugin::chunk_ids has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (7 pts), boolean chains 5, 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.
rspack_ids::occurrence_chunk_ids_plugin::chunk_ids (cognitive 22) crates/rspack_ids/src/occurrence_chunk_ids_plugin.rs:32— rspack_ids::occurrence_chunk_ids_plugin::chunk_ids has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (7 pts), boolean chains 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.
rspack_ids::sync_module_ids_plugin::revive_modules (cognitive 18) crates/rspack_ids/src/sync_module_ids_plugin.rs:101— rspack_ids::sync_module_ids_plugin::revive_modules has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 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.
rspack_ids::id_helpers::assign_ascending_chunk_ids (cognitive 16) crates/rspack_ids/src/id_helpers.rs:682— rspack_ids::id_helpers::assign_ascending_chunk_ids has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (8 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.
rspack_plugin_runtime::common_js_chunk_loading::runtime_requirements_in_tree (cognitive 36) crates/rspack_plugin_runtime/src/common_js_chunk_loading.rs:57— rspack_plugin_runtime::common_js_chunk_loading::runtime_requirements_in_tree has cognitive complexity 36 (threshold 15). Drivers by points: if/else 23 (36 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.
rspack_plugin_runtime::module_chunk_format::render_chunk (cognitive 26) crates/rspack_plugin_runtime/src/module_chunk_format.rs:132— rspack_plugin_runtime::module_chunk_format::render_chunk has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (5 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.
rspack_plugin_runtime::module_chunk_loading::runtime_requirements_in_tree (cognitive 25) crates/rspack_plugin_runtime/src/module_chunk_loading.rs:47— rspack_plugin_runtime::module_chunk_loading::runtime_requirements_in_tree has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 6 (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.
rspack_plugin_runtime::array_push_callback_chunk_format::render_chunk (cognitive 20) crates/rspack_plugin_runtime/src/array_push_callback_chunk_format.rs:104— rspack_plugin_runtime::array_push_callback_chunk_format::render_chunk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 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.
rspack_plugin_runtime::runtime_plugin::runtime_requirements_in_tree (cognitive 20) crates/rspack_plugin_runtime/src/runtime_plugin.rs:157— rspack_plugin_runtime::runtime_plugin::runtime_requirements_in_tree has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (5 pts), boolean chains 4, 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.
rspack_plugin_runtime::helpers::get_all_chunks::add_chunks (cognitive 19) crates/rspack_plugin_runtime/src/helpers.rs:84— rspack_plugin_runtime::helpers::get_all_chunks::add_chunks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 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.
rspack_plugin_runtime::helpers::generate_entry_startup (cognitive 18) crates/rspack_plugin_runtime/src/helpers.rs:223— rspack_plugin_runtime::helpers::generate_entry_startup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 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.
Duplicated block (8 lines × 3) crates/rspack_core/src/context_module.rs:1070— crates/rspack_core/src/context_module.rs:1070-1077 | crates/rspack_core/src/context_module.rs:1148-1155 | crates/rspack_core/src/context_module.rs:1258-1265 — 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/rspack_core/src/options/module.rs:1352— crates/rspack_core/src/options/module.rs:1352-1359 | crates/rspack_core/src/options/module.rs:1395-1402 | crates/rspack_core/src/options/module.rs:1641-1648 — 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/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:248— crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:248-255 | crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs:177-184 | crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:1472-1479 — before extracting anything, compare `crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs` and `crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (8 lines × 3) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:722— crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:722-729 | crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:817-824 | crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:867-874 — 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/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:164— crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:164-171 | crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:199-206 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:206-213 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
Duplicated block (8 lines × 3) crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:282— crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:282-289 | crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:253-260 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:264-271 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
Duplicated block (8 lines × 3) crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:106— crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:106-113 | crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:178-185 | crates/rspack_plugin_javascript/src/visitors/dependency/context_dependency_helper.rs:205-212 — 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.
Off the main sequence: rspack_browserslist — rspack_browserslist: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: rspack_swc_plugin_ts_collector — rspack_swc_plugin_ts_collector: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: rspack_tasks — rspack_tasks: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: css-module-lexer — css-module-lexer: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: rspack_intern — rspack_intern: abstractness 0.10, instability 0.06, distance 0.84 — zone of pain — concrete and depended on by 16 project(s), so it's rigid to change.
Off the main sequence: rspack_regex — rspack_regex: abstractness 0.00, instability 0.18, distance 0.82 — zone of pain — concrete and depended on by 14 project(s), so it's rigid to change.
Off the main sequence: rspack_paths — rspack_paths: abstractness 0.17, instability 0.08, distance 0.76 — zone of pain — concrete and depended on by 24 project(s), so it's rigid to change.
AC3 · Page structure· Page without a main landmark · ×6
Page without a main landmark packages/create-rspack/template-react-js/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark packages/create-rspack/template-react-ts/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark packages/create-rspack/template-vanilla-js/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark packages/create-rspack/template-vanilla-ts/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark packages/create-rspack/template-vue-js/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark packages/create-rspack/template-vue-ts/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
Lexer::scan_value (cyclomatic 87) crates/css-module-lexer/src/lexer.rs:352— Lexer::scan_value 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.
Lexer::next_token_without_visit (cyclomatic 38) crates/css-module-lexer/src/lexer.rs:1069— Lexer::next_token_without_visit has cyclomatic complexity 38 (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::fast_forward_selector (cyclomatic 31) crates/css-module-lexer/src/lexer.rs:759— Lexer::fast_forward_selector 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.
Lexer::scan_url (cyclomatic 22) crates/css-module-lexer/src/lexer.rs:1457— Lexer::scan_url 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.
Lexer::scan_string (cyclomatic 17) crates/css-module-lexer/src/lexer.rs:1354— Lexer::scan_string 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.
Lexer::fast_forward (cyclomatic 16) crates/css-module-lexer/src/lexer.rs:933— Lexer::fast_forward 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.
rspack_plugin_esm_library::optimize_chunks::analyze_dyn_import_targets (cyclomatic 39) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:565— rspack_plugin_esm_library::optimize_chunks::analyze_dyn_import_targets 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.
rspack_plugin_esm_library::optimize_chunks::extract_tla_shared_modules (cyclomatic 37) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:27— rspack_plugin_esm_library::optimize_chunks::extract_tla_shared_modules 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.
rspack_plugin_esm_library::split_chunks::split (cyclomatic 35) crates/rspack_plugin_esm_library/src/split_chunks.rs:176— rspack_plugin_esm_library::split_chunks::split 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.
rspack_plugin_esm_library::preserve_modules::preserve_modules (cyclomatic 24) crates/rspack_plugin_esm_library/src/preserve_modules.rs:114— rspack_plugin_esm_library::preserve_modules::preserve_modules 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.
rspack_plugin_esm_library::dependency::commonjs_external::cutout_commonjs_externals (cyclomatic 18) crates/rspack_plugin_esm_library/src/dependency/commonjs_external.rs:43— rspack_plugin_esm_library::dependency::commonjs_external::cutout_commonjs_externals 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.
rspack_plugin_esm_library::optimize_chunks::assign_dyn_import_chunk_short_names (cyclomatic 18) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:878— rspack_plugin_esm_library::optimize_chunks::assign_dyn_import_chunk_short_names 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.
JsPlugin::render_rspack_bootstrap (cognitive 100) crates/rspack_plugin_javascript/src/plugin/runtime_context.rs:135— JsPlugin::render_rspack_bootstrap has cognitive complexity 100 (threshold 15). Drivers by points: if/else 37 (77 pts), boolean chains 20, loops 1 (3 pts) (nesting depth added 42). 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.
JsPlugin::get_renamed_inline_module (cognitive 91) crates/rspack_plugin_javascript/src/plugin/mod.rs:1050— JsPlugin::get_renamed_inline_module has cognitive complexity 91 (threshold 15). Drivers by points: if/else 17 (52 pts), loops 10 (26 pts), match/switch 4 (7 pts), boolean chains 6 (nesting depth added 54). 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.
JsPlugin::render_webpack_bootstrap (cognitive 88) crates/rspack_plugin_javascript/src/plugin/mod.rs:262— JsPlugin::render_webpack_bootstrap has cognitive complexity 88 (threshold 15). Drivers by points: if/else 33 (71 pts), boolean chains 14, loops 1 (3 pts) (nesting depth added 40). 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.
JsPlugin::render_rspack_main (cognitive 78) crates/rspack_plugin_javascript/src/plugin/runtime_context.rs:620— JsPlugin::render_rspack_main has cognitive complexity 78 (threshold 15). Drivers by points: if/else 41 (66 pts), boolean chains 10, loops 1 (2 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.
JsPlugin::render_webpack_main (cognitive 76) crates/rspack_plugin_javascript/src/plugin/mod.rs:720— JsPlugin::render_webpack_main has cognitive complexity 76 (threshold 15). Drivers by points: if/else 40 (65 pts), boolean chains 9, loops 1 (2 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.
JsPlugin::render_rspack_require (cognitive 17) crates/rspack_plugin_javascript/src/plugin/runtime_context.rs:22— JsPlugin::render_rspack_require has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 pts) (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.
rspack_plugin_rslib::dyn_import_external::cutout_dyn_import_externals (cognitive 43) crates/rspack_plugin_rslib/src/dyn_import_external.rs:134— rspack_plugin_rslib::dyn_import_external::cutout_dyn_import_externals has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (36 pts), loops 4 (7 pts) (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.
rspack_plugin_rslib::dyn_import_external::cutout_star_re_export_externals (cognitive 40) crates/rspack_plugin_rslib/src/dyn_import_external.rs:14— rspack_plugin_rslib::dyn_import_external::cutout_star_re_export_externals has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 5 (7 pts), match/switch 1 (3 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.
rspack_plugin_rslib::isolated_dts::complete_isolated_dts_outputs (cognitive 30) crates/rspack_plugin_rslib/src/isolated_dts.rs:37— rspack_plugin_rslib::isolated_dts::complete_isolated_dts_outputs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (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.
rspack_plugin_rslib::worker_external::cutout_worker_externals (cognitive 30) crates/rspack_plugin_rslib/src/worker_external.rs:26— rspack_plugin_rslib::worker_external::cutout_worker_externals has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 4 (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.
rspack_plugin_rslib::plugin::render (cognitive 22) crates/rspack_plugin_rslib/src/plugin.rs:271— rspack_plugin_rslib::plugin::render has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (9 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.
rspack_plugin_rslib::url_external::cutout_url_externals (cognitive 19) crates/rspack_plugin_rslib/src/url_external.rs:34— rspack_plugin_rslib::url_external::cutout_url_externals has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (4 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.
ResolverGeneric::package_target_resolve (cognitive 41) crates/rspack_resolver/src/lib.rs:2125— ResolverGeneric::package_target_resolve has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (nesting depth added 19). Of this number, 30 points are the body's own statements and 11 belong to one function item inside it that branches. 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.
ResolverGeneric::resolve_in_module_dir (cognitive 31) crates/rspack_resolver/src/lib.rs:921— ResolverGeneric::resolve_in_module_dir has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 1 (nesting depth added 18). 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.
ResolverGeneric::package_exports_resolve (cognitive 28) crates/rspack_resolver/src/lib.rs:1864— ResolverGeneric::package_exports_resolve has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 11). 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.
ResolverGeneric::package_imports_exports_resolve (cognitive 21) crates/rspack_resolver/src/lib.rs:2036— ResolverGeneric::package_imports_exports_resolve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 1 (nesting depth added 7). 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.
ResolverGeneric::load_as_directory (cognitive 20) crates/rspack_resolver/src/lib.rs:685— ResolverGeneric::load_as_directory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 12). 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.
ResolverGeneric::package_resolve_in_dir (cognitive 17) crates/rspack_resolver/src/lib.rs:1822— ResolverGeneric::package_resolve_in_dir has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). 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.
rspack_plugin_rsc::reference_manifest::build_server_manifest_per_entry (cognitive 24) crates/rspack_plugin_rsc/src/reference_manifest.rs:113— rspack_plugin_rsc::reference_manifest::build_server_manifest_per_entry has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (8 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.
rspack_plugin_rsc::client_plugin::record_chunk_group (cognitive 22) crates/rspack_plugin_rsc/src/client_plugin.rs:248— rspack_plugin_rsc::client_plugin::record_chunk_group has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (4 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.
rspack_plugin_rsc::server_plugin::group_client_entries_by_owner (cognitive 22) crates/rspack_plugin_rsc/src/server_plugin.rs:96— rspack_plugin_rsc::server_plugin::group_client_entries_by_owner has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), 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.
rspack_plugin_rsc::loaders::action_entry_loader::parse_action_entries (cognitive 21) crates/rspack_plugin_rsc/src/loaders/action_entry_loader.rs:41— rspack_plugin_rsc::loaders::action_entry_loader::parse_action_entries has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 2 (8 pts), loops 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.
rspack_plugin_rsc::component_info::add_client_import (cognitive 18) crates/rspack_plugin_rsc/src/component_info.rs:368— rspack_plugin_rsc::component_info::add_client_import has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 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.
rspack_plugin_rsc::client_plugin::collect_server_entry_css_files (cognitive 17) crates/rspack_plugin_rsc/src/client_plugin.rs:173— rspack_plugin_rsc::client_plugin::collect_server_entry_css_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×6
JsPlugin::render_rspack_bootstrap (cyclomatic 54) crates/rspack_plugin_javascript/src/plugin/runtime_context.rs:135— JsPlugin::render_rspack_bootstrap has cyclomatic complexity 54 (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.
JsPlugin::render_webpack_bootstrap (cyclomatic 45) crates/rspack_plugin_javascript/src/plugin/mod.rs:262— JsPlugin::render_webpack_bootstrap 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.
JsPlugin::render_rspack_main (cyclomatic 43) crates/rspack_plugin_javascript/src/plugin/runtime_context.rs:620— JsPlugin::render_rspack_main 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.
JsPlugin::render_webpack_main (cyclomatic 41) crates/rspack_plugin_javascript/src/plugin/mod.rs:720— JsPlugin::render_webpack_main 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.
JsPlugin::get_renamed_inline_module (cyclomatic 37) crates/rspack_plugin_javascript/src/plugin/mod.rs:1050— JsPlugin::get_renamed_inline_module 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.
SplitChunksPlugin::inner_impl (cognitive 160) crates/rspack_plugin_split_chunks/src/plugin/mod.rs:93— SplitChunksPlugin::inner_impl has cognitive complexity 160 (threshold 15). Drivers by points: if/else 27 (80 pts), loops 14 (53 pts), match/switch 5 (16 pts), boolean chains 11 (nesting depth added 103). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SplitChunksPlugin::prepare_module_group_map (cognitive 83) crates/rspack_plugin_split_chunks/src/plugin/module_group.rs:1012— SplitChunksPlugin::prepare_module_group_map has cognitive complexity 83 (threshold 15). Drivers by points: if/else 27 (56 pts), match/switch 3 (10 pts), loops 5 (9 pts), boolean chains 8 (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.
SplitChunksPlugin::ensure_max_size_fit (cognitive 76) crates/rspack_plugin_split_chunks/src/plugin/max_size.rs:477— SplitChunksPlugin::ensure_max_size_fit has cognitive complexity 76 (threshold 15). Drivers by points: if/else 27 (61 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 38). 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.
SplitChunksPlugin::prepare_native_cache_group_matches (cognitive 40) crates/rspack_plugin_split_chunks/src/plugin/module_group.rs:915— SplitChunksPlugin::prepare_native_cache_group_matches has cognitive complexity 40 (threshold 15). Drivers by points: loops 8 (20 pts), if/else 5 (14 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 25). 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.
SplitChunksPlugin::check_min_size_reduction_for_module_chunks (cognitive 18) crates/rspack_plugin_split_chunks/src/plugin/min_size.rs:170— SplitChunksPlugin::check_min_size_reduction_for_module_chunks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (7 pts), match/switch 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.
rspack_plugin_split_chunks::plugin::max_size::deterministic_grouping (cognitive 55) crates/rspack_plugin_split_chunks/src/plugin/max_size.rs:279— rspack_plugin_split_chunks::plugin::max_size::deterministic_grouping has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 6 (20 pts), boolean chains 4 (nesting depth added 33). 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.
rspack_plugin_split_chunks::plugin::intersections::collect_intersections (cognitive 47) crates/rspack_plugin_split_chunks/src/plugin/intersections.rs:158— rspack_plugin_split_chunks::plugin::intersections::collect_intersections has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (31 pts), loops 8 (13 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.
rspack_plugin_split_chunks::plugin::intersections::discover_intersections (cognitive 41) crates/rspack_plugin_split_chunks/src/plugin/intersections.rs:68— rspack_plugin_split_chunks::plugin::intersections::discover_intersections has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 2 (4 pts), boolean chains 2 (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.
rspack_plugin_split_chunks::plugin::module_group::process_name_requests (cognitive 17) crates/rspack_plugin_split_chunks/src/plugin/module_group.rs:272— rspack_plugin_split_chunks::plugin::module_group::process_name_requests has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 1 (4 pts), boolean chains 2 (nesting depth added 9). 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.
rspack_plugin_split_chunks::plugin::max_size::remove_problematic_nodes (cognitive 16) crates/rspack_plugin_split_chunks/src/plugin/max_size.rs:150— rspack_plugin_split_chunks::plugin::max_size::remove_problematic_nodes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/rspack_binding_api/src/chunk.rs:95— crates/rspack_binding_api/src/chunk.rs:95-104 | crates/rspack_binding_api/src/chunk.rs:129-139 | crates/rspack_binding_api/src/chunk.rs:142-151 | crates/rspack_binding_api/src/chunk.rs:207-216 — 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/rspack_plugin_esm_library/src/optimize_chunks.rs:27— crates/rspack_plugin_esm_library/src/optimize_chunks.rs:27-264 | crates/rspack_plugin_esm_library/src/optimize_chunks.rs:569-801 | crates/rspack_plugin_rslib/src/dyn_import_external.rs:138-194 | crates/rspack_plugin_rslib/src/worker_external.rs:30-70 — 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/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:171— crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:171-244 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:298-344 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:354-421 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:431-492 — 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/rspack_plugin_library/src/amd_library_plugin.rs:79— crates/rspack_plugin_library/src/amd_library_plugin.rs:79-85 | crates/rspack_plugin_library/src/jsonp_library_plugin.rs:62-68 | crates/rspack_plugin_library/src/system_library_plugin.rs:71-77 | crates/rspack_plugin_library/src/umd_library_plugin.rs:87-93 — 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/rspack_sources/src/helpers.rs:600— crates/rspack_sources/src/helpers.rs:600-648 | crates/rspack_sources/src/helpers.rs:656-792 | crates/rspack_sources/src/helpers.rs:800-836 | crates/rspack_sources/src/helpers.rs:844-924 — 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.
Duplicated block (22 lines × 2) crates/rspack_core/src/compilation/mod.rs:721— crates/rspack_core/src/compilation/mod.rs:721-742 | crates/rspack_core/src/compilation/mod.rs:778-799 — both copies are in the same file, so extract the 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/rspack_core/src/stats/mod.rs:1581— crates/rspack_core/src/stats/mod.rs:1581-1602 | crates/rspack_core/src/stats/mod.rs:1698-1719 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:325— crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:325-346 | crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:394-415 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/runtime_context.rs:223— crates/rspack_plugin_javascript/src/runtime_context.rs:223-244 | crates/rspack_plugin_javascript/src/runtime_context.rs:519-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.
Duplicated block (22 lines × 2) crates/rspack_plugin_runtime/src/common_js_chunk_format.rs:78— crates/rspack_plugin_runtime/src/common_js_chunk_format.rs:78-99 | crates/rspack_plugin_runtime/src/module_chunk_format.rs:81-102 — before extracting anything, compare `crates/rspack_plugin_runtime/src/common_js_chunk_format.rs` and `crates/rspack_plugin_runtime/src/module_chunk_format.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. 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 (10–12 lines × 2) crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:823— crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:823-834 | crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:853-862 — both copies are in the same file, so extract the 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/rspack_core/src/compilation/build_module_graph/mod.rs:73— crates/rspack_core/src/compilation/build_module_graph/mod.rs:73-84 | crates/rspack_core/src/compilation/build_module_graph/module_executor/mod.rs:70-79 — 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 (10–12 lines × 2) crates/rspack_core/src/concatenated_module.rs:1155— crates/rspack_core/src/concatenated_module.rs:1155-1164 | crates/rspack_plugin_javascript/src/plugin/mod.rs:1360-1371 — 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 (10–12 lines × 2) crates/rspack_plugin_devtool/src/module_filename_helpers.rs:156— crates/rspack_plugin_devtool/src/module_filename_helpers.rs:156-167 | crates/rspack_plugin_devtool/src/module_filename_helpers.rs:196-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.
Duplicated block (10–12 lines × 2) crates/rspack_plugin_rsc/src/server_plugin.rs:417— crates/rspack_plugin_rsc/src/server_plugin.rs:417-428 | crates/rspack_plugin_rsc/src/server_plugin.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.
Duplicated block (9–10 lines × 2) crates/css-module-lexer/src/dependencies.rs:2901— crates/css-module-lexer/src/dependencies.rs:2901-2909 | crates/css-module-lexer/src/dependencies.rs:3108-3117 — both copies are in the same file, so extract the 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/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2535— crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2535-2543 | crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:2556-2565 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:286— crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:286-294 | crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:361-370 — both copies are in the same file, so extract the 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/rspack_plugin_rslib/src/dyn_import_external.rs:139— crates/rspack_plugin_rslib/src/dyn_import_external.rs:139-147 | crates/rspack_plugin_rslib/src/worker_external.rs:31-40 — 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 (9–10 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:252— crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:252-260 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:263-272 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
SplitChunksPlugin::inner_impl (cyclomatic 57) crates/rspack_plugin_split_chunks/src/plugin/mod.rs:93— SplitChunksPlugin::inner_impl has cyclomatic complexity 57 (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.
SplitChunksPlugin::prepare_module_group_map (cyclomatic 42) crates/rspack_plugin_split_chunks/src/plugin/module_group.rs:1012— SplitChunksPlugin::prepare_module_group_map 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.
SplitChunksPlugin::ensure_max_size_fit (cyclomatic 33) crates/rspack_plugin_split_chunks/src/plugin/max_size.rs:477— SplitChunksPlugin::ensure_max_size_fit has cyclomatic complexity 33 (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.
SplitChunksPlugin::prepare_native_cache_group_matches (cyclomatic 17) crates/rspack_plugin_split_chunks/src/plugin/module_group.rs:915— SplitChunksPlugin::prepare_native_cache_group_matches has cyclomatic complexity 17 (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.
ESMExportImportedSpecifierDependency::add_export_fragments (cyclomatic 26) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:517— ESMExportImportedSpecifierDependency::add_export_fragments 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.
ESMExportImportedSpecifierDependency::get_conflicting_star_exports_errors (cyclomatic 22) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1043— ESMExportImportedSpecifierDependency::get_conflicting_star_exports_errors 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.
ESMExportImportedSpecifierDependency::get_star_reexports (cyclomatic 19) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:325— ESMExportImportedSpecifierDependency::get_star_reexports 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.
ESMExportImportedSpecifierDependency::get_mode_inner (cyclomatic 17) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:163— ESMExportImportedSpecifierDependency::get_mode_inner 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.
rspack_ids::named_chunk_ids_plugin::assign_named_chunk_ids (cyclomatic 22) crates/rspack_ids/src/named_chunk_ids_plugin.rs:19— rspack_ids::named_chunk_ids_plugin::assign_named_chunk_ids 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.
rspack_ids::named_module_ids_plugin::assign_named_module_ids (cyclomatic 22) crates/rspack_ids/src/named_module_ids_plugin.rs:33— rspack_ids::named_module_ids_plugin::assign_named_module_ids 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.
rspack_ids::named_module_ids_plugin::module_ids (cyclomatic 20) crates/rspack_ids/src/named_module_ids_plugin.rs:194— rspack_ids::named_module_ids_plugin::module_ids 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.
rspack_ids::named_chunk_ids_plugin::chunk_ids (cyclomatic 19) crates/rspack_ids/src/named_chunk_ids_plugin.rs:240— rspack_ids::named_chunk_ids_plugin::chunk_ids 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.
ConcatenatedModule::code_generation (cognitive 186) crates/rspack_core/src/concatenated_module.rs:1009— ConcatenatedModule::code_generation has cognitive complexity 186 (threshold 15). Drivers by points: if/else 58 (140 pts), loops 20 (35 pts), boolean chains 7, match/switch 2 (4 pts) (nesting depth added 99). 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.
ConcatenatedModule::get_final_binding (cognitive 38) crates/rspack_core/src/concatenated_module.rs:2691— ConcatenatedModule::get_final_binding has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 6 (12 pts), boolean chains 3 (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.
ConcatenatedModule::enter_module (cognitive 24) crates/rspack_core/src/concatenated_module.rs:2154— ConcatenatedModule::enter_module has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, 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.
ConcatenatedModule::is_missing_star_export (cognitive 22) crates/rspack_core/src/concatenated_module.rs:2500— ConcatenatedModule::is_missing_star_export has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 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.
ModuleConcatenationPlugin::optimize_chunk_modules_impl (cognitive 82) crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:1048— ModuleConcatenationPlugin::optimize_chunk_modules_impl has cognitive complexity 82 (threshold 15). Drivers by points: if/else 30 (44 pts), loops 17 (24 pts), boolean chains 9, 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.
ModuleConcatenationPlugin::compute_incoming_modules (cognitive 62) crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:682— ModuleConcatenationPlugin::compute_incoming_modules has cognitive complexity 62 (threshold 15). Drivers by points: if/else 19 (50 pts), loops 5 (12 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.
ModuleConcatenationPlugin::try_to_add (cognitive 22) crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:855— ModuleConcatenationPlugin::try_to_add has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), loops 2, boolean chains 1, match/switch 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.
ModuleConcatenationPlugin::get_imports (cognitive 20) crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:584— ModuleConcatenationPlugin::get_imports has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, 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.
ESMExportImportedSpecifierDependency::get_conflicting_star_exports_errors (cognitive 51) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1043— ESMExportImportedSpecifierDependency::get_conflicting_star_exports_errors has cognitive complexity 51 (threshold 15). Drivers by points: if/else 22 (47 pts), boolean chains 2, loops 1 (2 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.
ESMExportImportedSpecifierDependency::add_export_fragments (cognitive 44) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:517— ESMExportImportedSpecifierDependency::add_export_fragments has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (38 pts), boolean chains 3, loops 1 (2 pts), match/switch 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.
ESMExportImportedSpecifierDependency::get_star_reexports (cognitive 37) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:325— ESMExportImportedSpecifierDependency::get_star_reexports has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 4, 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.
ESMExportImportedSpecifierDependency::get_mode_inner (cognitive 27) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:163— ESMExportImportedSpecifierDependency::get_mode_inner has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 3 (9 pts), loops 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.
rspack_plugin_devtool::module_filename_helpers::template_replace (cognitive 47) crates/rspack_plugin_devtool/src/module_filename_helpers.rs:518— rspack_plugin_devtool::module_filename_helpers::template_replace has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 5, match/switch 1 (2 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.
rspack_plugin_devtool::eval_source_map_dev_tool_plugin::render_module_content (cognitive 29) crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs:94— rspack_plugin_devtool::eval_source_map_dev_tool_plugin::render_module_content has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 2 (5 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.
rspack_plugin_devtool::source_map_dev_tool_plugin::process_assets (cognitive 23) crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:1231— rspack_plugin_devtool::source_map_dev_tool_plugin::process_assets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (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.
rspack_plugin_devtool::eval_dev_tool_module_plugin::encode_uri (cognitive 17) crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:261— rspack_plugin_devtool::eval_dev_tool_module_plugin::encode_uri has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 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.
ChunkGraph::get_runtime_chunk_dependent_chunks_iterable (cognitive 36) crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:778— ChunkGraph::get_runtime_chunk_dependent_chunks_iterable has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (20 pts), loops 6 (14 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.
ChunkGraph::integrate_chunks (cognitive 20) crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:1014— ChunkGraph::integrate_chunks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (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.
ChunkGraph::get_chunk_entry_dependent_chunks_iterable (cognitive 16) crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:839— ChunkGraph::get_chunk_entry_dependent_chunks_iterable has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 2 (7 pts), boolean chains 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.
ChunkGraph::can_chunks_be_integrated (cognitive 16) crates/rspack_core/src/chunk_graph/chunk_graph_chunk.rs:883— ChunkGraph::can_chunks_be_integrated has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 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.
GraphicalReportHandler::render_snippets (cognitive 35) crates/rspack_error/src/displayer/renderer/graphical.rs:284— GraphicalReportHandler::render_snippets has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 22). 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.
GraphicalReportHandler::render_context (cognitive 20) crates/rspack_error/src/displayer/renderer/graphical.rs:347— GraphicalReportHandler::render_context has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 7). 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.
GraphicalReportHandler::render_causes (cognitive 16) crates/rspack_error/src/displayer/renderer/graphical.rs:171— GraphicalReportHandler::render_causes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). 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.
GraphicalReportHandler::render_single_line_highlights (cognitive 16) crates/rspack_error/src/displayer/renderer/graphical.rs:634— GraphicalReportHandler::render_single_line_highlights has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (8 pts) (nesting depth added 9). 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.
ContextModule::get_lazy_source (cognitive 26) crates/rspack_core/src/context_module.rs:800— ContextModule::get_lazy_source has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 2, match/switch 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.
ContextModule::get_glob_source (cognitive 20) crates/rspack_core/src/context_module.rs:657— ContextModule::get_glob_source has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 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.
ContextModule::get_source_string (cognitive 20) crates/rspack_core/src/context_module.rs:745— ContextModule::get_source_string has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), 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.
ContextModule::lib_ident (cognitive 16) crates/rspack_core/src/context_module.rs:1373— ContextModule::lib_ident has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 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.
CommonJsImportsParserPlugin::call (cognitive 26) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2530— CommonJsImportsParserPlugin::call has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5 (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.
CommonJsImportsParserPlugin::require_handler (cognitive 19) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:1913— CommonJsImportsParserPlugin::require_handler has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, loops 1 (2 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.
CommonJsImportsParserPlugin::finish (cognitive 18) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2796— CommonJsImportsParserPlugin::finish has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, 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.
CommonJsImportsParserPlugin::declarator (cognitive 17) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2106— CommonJsImportsParserPlugin::declarator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8 (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.
Duplicated block (19 lines × 2) crates/css-module-lexer/src/dependencies.rs:2829— crates/css-module-lexer/src/dependencies.rs:2829-2847 | crates/css-module-lexer/src/dependencies.rs:3028-3046 — both copies are in the same file, so extract the 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/css-module-lexer/src/lexer.rs:1497— crates/css-module-lexer/src/lexer.rs:1497-1515 | crates/css-module-lexer/src/lexer.rs:1588-1606 — both copies are in the same file, so extract the 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/rspack_loader_swc/src/rsc_transforms/server_actions.rs:437— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:437-455 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:599-617 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:516— crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:516-534 | crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:542-560 — both copies are in the same file, so extract the 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 (11–12 lines × 2) crates/css-module-lexer/src/dependencies.rs:2858— crates/css-module-lexer/src/dependencies.rs:2858-2868 | crates/css-module-lexer/src/dependencies.rs:3057-3068 — both copies are in the same file, so extract the 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 (11–12 lines × 2) crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:70— crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:70-81 | crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs:81-91 — before extracting anything, compare `crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs` and `crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (11–12 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:550— crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:550-561 | crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:855-865 — both copies are in the same file, so extract the 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 (11–12 lines × 2) crates/rspack_plugin_rstest/src/parser_plugin.rs:347— crates/rspack_plugin_rstest/src/parser_plugin.rs:347-358 | crates/rspack_plugin_rstest/src/plugin.rs:224-234 — 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 × 4) crates/rspack_binding_api/src/build_info.rs:165— crates/rspack_binding_api/src/build_info.rs:165-170 | crates/rspack_binding_api/src/build_info.rs:188-193 | crates/rspack_binding_api/src/build_info.rs:211-216 | crates/rspack_binding_api/src/build_info.rs:234-239 — 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 (6 lines × 4) crates/rspack_macros/src/rspack_hash.rs:146— crates/rspack_macros/src/rspack_hash.rs:146-152 | crates/rspack_macros/src/rspack_hash.rs:172-178 | crates/rspack_macros/src/rspack_hash.rs:221-226 | crates/rspack_macros/src/rspack_hash.rs:253-258 — 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 (6 lines × 4) crates/rspack_plugin_library/src/amd_library_plugin.rs:80— crates/rspack_plugin_library/src/amd_library_plugin.rs:80-85 | crates/rspack_plugin_library/src/jsonp_library_plugin.rs:63-68 | crates/rspack_plugin_library/src/system_library_plugin.rs:72-77 | crates/rspack_plugin_library/src/umd_library_plugin.rs:88-93 — before extracting anything, compare `crates/rspack_plugin_library/src/amd_library_plugin.rs` and `crates/rspack_plugin_library/src/jsonp_library_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (6 lines × 4) crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:157— crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:157-163 | crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:191-197 | crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:183-188 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:190-195 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 locations) packages/create-rspack/template-vue-js/rspack.config.js:35— packages/create-rspack/template-vue-js/rspack.config.js:35 · packages/create-rspack/template-vue-ts/rspack.config.ts:37 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (19 lines × 2 locations) packages/rspack/src/Compilation.ts:493— packages/rspack/src/Compilation.ts:493 · packages/rspack/src/Compiler.ts:273 — the 2 copies are spread across 2 files, 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.
Duplicated block (19 lines × 2 locations) packages/rspack/src/loader-runner/index.ts:997— packages/rspack/src/loader-runner/index.ts:997 · packages/rspack/src/loader-runner/index.ts:1016 — 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.
Duplicated block (19 lines × 2 locations) packages/rspack/src/stats/StatsFactory.ts:113— packages/rspack/src/stats/StatsFactory.ts:113 · packages/rspack/src/stats/StatsFactory.ts:134 — 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.
Duplicated block (16 lines × 2 locations) packages/rspack/src/NativeWatchFileSystem.ts:475— packages/rspack/src/NativeWatchFileSystem.ts:475 · packages/rspack/src/node/NodeWatchFileSystem.ts:308 — the 2 copies are spread across 2 files, 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.
Duplicated block (16 lines × 2 locations) packages/rspack/src/container/ModuleFederationPlugin.ts:101— packages/rspack/src/container/ModuleFederationPlugin.ts:101 · packages/rspack/src/container/ModuleFederationPlugin.ts:118 — 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.
Duplicated block (16 lines × 2 locations) packages/rspack/src/loader-runner/index.ts:675— packages/rspack/src/loader-runner/index.ts:675 · packages/rspack/src/loader-runner/worker.ts:263 — the 2 copies are spread across 2 files, 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.
Duplicated block (16 lines × 2 locations) packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:173— packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:173 · packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Swallowed exception (empty catch) scripts/build-npm.mjs:104— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) scripts/build-npm.mjs:196— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/rspack/src/container/ModuleFederationManifestPlugin.ts:42— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/rspack/src/container/ModuleFederationManifestPlugin.ts:65— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
ModuleConcatenationPlugin::optimize_chunk_modules_impl (cyclomatic 55) crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:1048— ModuleConcatenationPlugin::optimize_chunk_modules_impl has cyclomatic complexity 55 (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.
ModuleConcatenationPlugin::compute_incoming_modules (cyclomatic 21) crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:682— ModuleConcatenationPlugin::compute_incoming_modules 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.
ModuleConcatenationPlugin::try_to_add (cyclomatic 17) crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:855— ModuleConcatenationPlugin::try_to_add 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.
rspack_plugin_runtime::runtime_plugin::runtime_requirements_in_tree (cyclomatic 47) crates/rspack_plugin_runtime/src/runtime_plugin.rs:157— rspack_plugin_runtime::runtime_plugin::runtime_requirements_in_tree 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.
rspack_plugin_runtime::module_chunk_loading::runtime_requirements_in_tree (cyclomatic 22) crates/rspack_plugin_runtime/src/module_chunk_loading.rs:47— rspack_plugin_runtime::module_chunk_loading::runtime_requirements_in_tree has cyclomatic complexity 22 (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.
rspack_plugin_runtime::common_js_chunk_loading::runtime_requirements_in_tree (cyclomatic 21) crates/rspack_plugin_runtime/src/common_js_chunk_loading.rs:57— rspack_plugin_runtime::common_js_chunk_loading::runtime_requirements_in_tree 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.
PathManager::collect_time_info_entries (cyclomatic 19) crates/rspack_watcher/src/paths.rs:1017— PathManager::collect_time_info_entries 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.
PathManager::scan_below (cyclomatic 17) crates/rspack_watcher/src/paths.rs:563— PathManager::scan_below 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.
PathManager::update (cyclomatic 16) crates/rspack_watcher/src/paths.rs:841— PathManager::update 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.
ServerActions::visit_mut_module_items (cognitive 191) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1294— ServerActions::visit_mut_module_items has cognitive complexity 191 (threshold 15). Drivers by points: if/else 41 (111 pts), match/switch 9 (38 pts), loops 9 (31 pts), boolean chains 11 (nesting depth added 121). 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.
ServerActions::visit_mut_function (cognitive 19) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:864— ServerActions::visit_mut_function has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3 (nesting depth added 6). 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.
ServerActions::visit_mut_arrow_expr (cognitive 18) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1006— ServerActions::visit_mut_arrow_expr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). 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.
InnerGraphParserPlugin::infer_dependency_usage (cognitive 121) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:106— InnerGraphParserPlugin::infer_dependency_usage has cognitive complexity 121 (threshold 15). Drivers by points: if/else 20 (75 pts), match/switch 5 (24 pts), loops 7 (21 pts), boolean chains 1 (nesting depth added 88). 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.
InnerGraphParserPlugin::finalize_dependency_usage (cognitive 37) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:258— InnerGraphParserPlugin::finalize_dependency_usage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (8 pts), match/switch 2 (4 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.
InnerGraphParserPlugin::block_pre_module_declaration (cognitive 21) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:490— InnerGraphParserPlugin::block_pre_module_declaration has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (4 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.
FlagDependencyUsagePluginProxy::process_referenced_module (cognitive 94) crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:435— FlagDependencyUsagePluginProxy::process_referenced_module has cognitive complexity 94 (threshold 15). Drivers by points: if/else 24 (86 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 66). 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.
FlagDependencyUsagePluginProxy::apply (cognitive 52) crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:64— FlagDependencyUsagePluginProxy::apply has cognitive complexity 52 (threshold 15). Drivers by points: loops 18 (35 pts), if/else 9 (16 pts), boolean chains 1 (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.
FlagDependencyUsagePluginProxy::process_module (cognitive 16) crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:310— FlagDependencyUsagePluginProxy::process_module has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 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.
rspack_loader_swc::rsc_transforms::react_server_components::collect_top_level_directives_and_imports (cognitive 75) crates/rspack_loader_swc/src/rsc_transforms/react_server_components.rs:245— rspack_loader_swc::rsc_transforms::react_server_components::collect_top_level_directives_and_imports has cognitive complexity 75 (threshold 15). Drivers by points: match/switch 11 (34 pts), if/else 10 (33 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 49). 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.
rspack_loader_swc::rsc_transforms::server_actions::retain_names_from_declared_idents (cognitive 23) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1964— rspack_loader_swc::rsc_transforms::server_actions::retain_names_from_declared_idents has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 14). 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.
rspack_loader_swc::rsc_transforms::server_actions::detect_similar_strings (cognitive 19) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:2158— rspack_loader_swc::rsc_transforms::server_actions::detect_similar_strings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts) (nesting depth added 10). 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.
SourceMapDevToolPlugin::collect_tasks (cognitive 56) crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:585— SourceMapDevToolPlugin::collect_tasks has cognitive complexity 56 (threshold 15). Drivers by points: if/else 9 (24 pts), match/switch 8 (16 pts), loops 6 (13 pts), boolean chains 3 (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.
SourceMapDevToolPlugin::create_mapped_asset (cognitive 34) crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:1023— SourceMapDevToolPlugin::create_mapped_asset has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 5 (10 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.
SourceMapDevToolPlugin::use_new_cache (cognitive 25) crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:440— SourceMapDevToolPlugin::use_new_cache has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 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.
ExportInfoData::get_used (cognitive 46) crates/rspack_core/src/exports/export_info_getter.rs:60— ExportInfoData::get_used has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 3 (11 pts), match/switch 1 (4 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.
ExportInfoData::set_used_conditionally (cognitive 24) crates/rspack_core/src/exports/export_info_setter.rs:131— ExportInfoData::set_used_conditionally has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (7 pts), boolean chains 4, loops 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.
ExportInfoData::set_used (cognitive 17) crates/rspack_core/src/exports/export_info_setter.rs:94— ExportInfoData::set_used has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (7 pts), 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.
PathManager::scan_below (cognitive 41) crates/rspack_watcher/src/paths.rs:563— PathManager::scan_below has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 2 (3 pts), boolean chains 2 (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.
PathManager::collect_time_info_entries (cognitive 35) crates/rspack_watcher/src/paths.rs:1017— PathManager::collect_time_info_entries has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 9 (14 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.
PathManager::update (cognitive 25) crates/rspack_watcher/src/paths.rs:841— PathManager::update has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 7, 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.
rspack_plugin_rsdoctor::chunk_graph::collect_chunk_dependencies (cognitive 39) crates/rspack_plugin_rsdoctor/src/chunk_graph.rs:56— rspack_plugin_rsdoctor::chunk_graph::collect_chunk_dependencies has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (22 pts), loops 5 (17 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rspack_plugin_rsdoctor::plugin::optimize_chunk_modules (cognitive 33) crates/rspack_plugin_rsdoctor/src/plugin.rs:368— rspack_plugin_rsdoctor::plugin::optimize_chunk_modules has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 8 (10 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.
rspack_plugin_rsdoctor::module_graph::get_esm_export_imported_specifier_target_exports (cognitive 16) crates/rspack_plugin_rsdoctor/src/module_graph.rs:397— rspack_plugin_rsdoctor::module_graph::get_esm_export_imported_specifier_target_exports has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 1 (3 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.
rspack_plugin_sri::asset::process_chunks (cognitive 31) crates/rspack_plugin_sri/src/asset.rs:39— rspack_plugin_sri::asset::process_chunks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (6 pts), boolean chains 3 (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.
rspack_plugin_sri::asset::digest_chunks (cognitive 29) crates/rspack_plugin_sri/src/asset.rs:205— rspack_plugin_sri::asset::digest_chunks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (22 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.
rspack_plugin_sri::html::process_tag (cognitive 17) crates/rspack_plugin_sri/src/html.rs:159— rspack_plugin_sri::html::process_tag has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 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.
rspack_plugin_library::umd_library_plugin::render (cognitive 26) crates/rspack_plugin_library/src/umd_library_plugin.rs:96— rspack_plugin_library::umd_library_plugin::render has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 2, loops 1 (2 pts) (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.
rspack_plugin_library::assign_library_plugin::render_startup (cognitive 18) crates/rspack_plugin_library/src/assign_library_plugin.rs:244— rspack_plugin_library::assign_library_plugin::render_startup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 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.
rspack_plugin_library::export_property_library_plugin::finish_modules (cognitive 16) crates/rspack_plugin_library/src/export_property_library_plugin.rs:114— rspack_plugin_library::export_property_library_plugin::finish_modules has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 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.
Chunk::get_all_async_chunks (cognitive 25) crates/rspack_core/src/chunk.rs:626— Chunk::get_all_async_chunks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 12). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 2 function items inside it that branch (add_to_queue, add_chunks). 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.
Chunk::has_async_chunks (cognitive 23) crates/rspack_core/src/chunk.rs:549— Chunk::has_async_chunks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (7 pts) (nesting depth added 11). Of this number, 13 points are the body's own statements and 10 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.
Chunk::get_child_ids_by_order (cognitive 23) crates/rspack_core/src/chunk.rs:868— Chunk::get_child_ids_by_order has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 pts), match/switch 2 (5 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.
CssModuleParser::handle_composes (cognitive 24) crates/rspack_plugin_css/src/parser_and_generator/parser.rs:1198— CssModuleParser::handle_composes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 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.
CssModuleParser::ensure_local_definition (cognitive 21) crates/rspack_plugin_css/src/parser_and_generator/parser.rs:1108— CssModuleParser::ensure_local_definition has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3, 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.
CssModuleParser::handle_dependency (cognitive 17) crates/rspack_plugin_css/src/parser_and_generator/parser.rs:508— CssModuleParser::handle_dependency has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, match/switch 1 (nesting depth added 4). 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.
rspack_plugin_css::css_syntax::decode_css_escapes (cognitive 22) crates/rspack_plugin_css/src/css_syntax.rs:13— rspack_plugin_css::css_syntax::decode_css_escapes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), 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.
rspack_plugin_css::css_syntax::parse_escape (cognitive 22) crates/rspack_plugin_css/src/css_syntax.rs:95— rspack_plugin_css::css_syntax::parse_escape has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (3 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.
rspack_plugin_css::plugin::impl_plugin_for_css_plugin::runtime_requirements_in_tree (cognitive 20) crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:403— rspack_plugin_css::plugin::impl_plugin_for_css_plugin::runtime_requirements_in_tree has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9 (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.
rspack_loader_runner::runner::run_loaders_impl (cognitive 21) crates/rspack_loader_runner/src/runner.rs:257— rspack_loader_runner::runner::run_loaders_impl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 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.
rspack_loader_runner::chain::plan_loader_chains (cognitive 20) crates/rspack_loader_runner/src/chain.rs:160— rspack_loader_runner::chain::plan_loader_chains has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (9 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.
rspack_loader_runner::scheme::get_scheme (cognitive 17) crates/rspack_loader_runner/src/scheme.rs:89— rspack_loader_runner::scheme::get_scheme has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), loops 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.
Change coupling clique: context_module.rs, external_module.rs, normal_module.rs, raw_module.rs, self_module.rs, runtime_module.rs, delegated_module.rs, css_module.rs, module.rs, container_entry_module.rs, fallback_module.rs, remote_module.rs, consume_shared_module.rs, provide_shared_module.rs crates/rspack_core/src/context_module.rs— 14 files — `crates/rspack_core/src/context_module.rs`, `crates/rspack_core/src/external_module.rs`, `crates/rspack_core/src/normal_module.rs`, `crates/rspack_core/src/raw_module.rs`, `crates/rspack_core/src/self_module.rs`, `crates/rspack_macros/src/runtime_module.rs`, `crates/rspack_plugin_dll/src/dll_reference/delegated_module.rs`, `crates/rspack_plugin_extract_css/src/css_module.rs`, `crates/rspack_plugin_lazy_compilation/src/module.rs`, `crates/rspack_plugin_mf/src/container/container_entry_module.rs`, `crates/rspack_plugin_mf/src/container/fallback_module.rs`, `crates/rspack_plugin_mf/src/container/remote_module.rs`, `crates/rspack_plugin_mf/src/sharing/consume_shared_module.rs`, `crates/rspack_plugin_mf/src/sharing/provide_shared_module.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 91 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Change coupling clique: add.rs, process_dependencies.rs, entry.rs crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/add.rs— 3 files — `crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/add.rs`, `crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/process_dependencies.rs`, `crates/rspack_core/src/compilation/build_module_graph/module_executor/entry.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Change coupling clique: IgnorePlugin.ts, RsdoctorPlugin.ts, SubresourceIntegrityPlugin.ts, options.ts packages/rspack/src/builtin-plugin/IgnorePlugin.ts— 4 files — `packages/rspack/src/builtin-plugin/IgnorePlugin.ts`, `packages/rspack/src/builtin-plugin/RsdoctorPlugin.ts`, `packages/rspack/src/builtin-plugin/SubresourceIntegrityPlugin.ts`, `packages/rspack/src/builtin-plugin/html-plugin/options.ts` — all change together with no explicit dependency: a fully-connected co-change clique, not 6 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Change-coupling hub: binding.d.ts → rspack.wasi-browser.js, async_dependency_block.rs, chunk.rs, chunk_graph.rs, entries.rs, mod.rs, dependency.rs, macros.rs, interceptor.rs, context.rs, raw_banner.rs, raw_copy.rs, raw_devtool.rs, mod.rs, raw_external.rs, raw_optimization.rs, mod.rs, mod.rs, externals.rs, struct.rs, lib.rs, cache_group.rs crates/node_binding/binding.d.ts— `crates/node_binding/binding.d.ts` changes together with 22 other files — `crates/node_binding/rspack.wasi-browser.js`, `crates/rspack_binding_api/src/async_dependency_block.rs`, `crates/rspack_binding_api/src/chunk.rs`, `crates/rspack_binding_api/src/chunk_graph.rs`, `crates/rspack_binding_api/src/compilation/entries.rs`, `crates/rspack_binding_api/src/compilation/mod.rs`, `crates/rspack_binding_api/src/dependency.rs`, `crates/rspack_binding_api/src/modules/macros.rs`, `crates/rspack_binding_api/src/plugins/interceptor.rs`, `crates/rspack_binding_api/src/plugins/js_loader/context.rs`, `crates/rspack_binding_api/src/raw_options/raw_builtins/raw_banner.rs`, `crates/rspack_binding_api/src/raw_options/raw_builtins/raw_copy.rs`, `crates/rspack_binding_api/src/raw_options/raw_devtool.rs`, `crates/rspack_binding_api/src/raw_options/raw_experiments/mod.rs`, `crates/rspack_binding_api/src/raw_options/raw_external.rs`, `crates/rspack_binding_api/src/raw_options/raw_optimization.rs`, `crates/rspack_binding_api/src/raw_options/raw_split_chunks/mod.rs`, `crates/rspack_core/src/options/experiments/mod.rs`, `crates/rspack_core/src/options/externals.rs`, `crates/rspack_core/src/stats/struct.rs`, `crates/rspack_napi/src/lib.rs`, `crates/rspack_plugin_split_chunks/src/options/cache_group.rs` — none of which declares a dependency on it: one file is the hub of 22 separate couplings, not 22 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 22.
Change-coupling hub: esm_export_imported_specifier_dependency.rs → common_js_self_reference_dependency.rs, esm_compatibility_dependency.rs, esm_export_expression_dependency.rs, esm_export_specifier_dependency.rs crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs— `crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs` changes together with 4 other files — `crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_self_reference_dependency.rs`, `crates/rspack_plugin_javascript/src/dependency/esm/esm_compatibility_dependency.rs`, `crates/rspack_plugin_javascript/src/dependency/esm/esm_export_expression_dependency.rs`, `crates/rspack_plugin_javascript/src/dependency/esm/esm_export_specifier_dependency.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: wasm_plugin.rs → lib.rs, impl_plugin_for_css_plugin.rs, impl_plugin_for_js_plugin.rs crates/rspack_plugin_wasm/src/wasm_plugin.rs— `crates/rspack_plugin_wasm/src/wasm_plugin.rs` changes together with 3 other files — `crates/rspack_plugin_asset/src/lib.rs`, `crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs`, `crates/rspack_plugin_javascript/src/plugin/impl_plugin_for_js_plugin.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Duplicated block (21 lines × 2) crates/rspack_plugin_esm_library/src/link.rs:86— crates/rspack_plugin_esm_library/src/link.rs:86-106 | crates/rspack_plugin_esm_library/src/link.rs:155-175 — both copies are in the same file, so extract the 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/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:237— crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:237-257 | crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs:166-186 — before extracting anything, compare `crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs` and `crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (21 lines × 2) crates/rspack_loader_swc/src/rsc_transforms/to_server_entry.rs:23— crates/rspack_loader_swc/src/rsc_transforms/to_server_entry.rs:23-43 | crates/rspack_loader_swc/src/rsc_transforms/to_server_entry.rs:62-83 — both copies are in the same file, so extract the 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/rspack_core/src/stats/mod.rs:949— crates/rspack_core/src/stats/mod.rs:949-966 | crates/rspack_core/src/stats/mod.rs:1032-1049 — both copies are in the same file, so extract the 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/rspack_plugin_runtime/src/helpers.rs:145— crates/rspack_plugin_runtime/src/helpers.rs:145-162 | crates/rspack_plugin_runtime/src/helpers.rs:173-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.
Duplicated block (18 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:384— crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:384-401 | crates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs:400-417 — 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 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/compatibility_plugin.rs:200— crates/rspack_plugin_javascript/src/parser_plugin/compatibility_plugin.rs:200-216 | crates/rspack_plugin_javascript/src/parser_plugin/compatibility_plugin.rs:283-299 — both copies are in the same file, so extract the 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/rspack_plugin_mf/src/container/remote_module.rs:66— crates/rspack_plugin_mf/src/container/remote_module.rs:66-82 | crates/rspack_plugin_mf/src/sharing/provide_shared_module.rs:75-91 — 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 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:101— crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:101-117 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:105-121 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
Duplicated block (15–16 lines × 2) crates/rspack_core/src/chunk.rs:891— crates/rspack_core/src/chunk.rs:891-906 | crates/rspack_core/src/stats/utils.rs:185-199 — 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 (15–16 lines × 2) crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:458— crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:458-473 | crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:787-801 — both copies are in the same file, so extract the 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–16 lines × 2) crates/rspack_plugin_rsc/src/server_plugin.rs:442— crates/rspack_plugin_rsc/src/server_plugin.rs:442-457 | crates/rspack_plugin_rsc/src/server_plugin.rs:536-550 — both copies are in the same file, so extract the 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 × 3) crates/rspack/src/builder/target.rs:249— crates/rspack/src/builder/target.rs:249-258 | crates/rspack/src/builder/target.rs:351-360 | crates/rspack/src/builder/target.rs:404-413 — 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/rspack_plugin_javascript/src/dependency/commonjs/common_js_export_require_dependency.rs:460— crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_export_require_dependency.rs:460-469 | crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_exports_dependency.rs:198-207 | crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_self_reference_dependency.rs:167-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.
Duplicated block (10 lines × 3) crates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs:188— crates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs:188-197 | crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:183-192 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:190-199 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
Duplicated block (8–9 lines × 2) crates/rspack_binding_api/src/module.rs:167— crates/rspack_binding_api/src/module.rs:167-174 | crates/rspack_napi/src/utils.rs:11-19 — 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–9 lines × 2) crates/rspack_cacheable_macros/src/cacheable/impl_with.rs:34— crates/rspack_cacheable_macros/src/cacheable/impl_with.rs:34-41 | crates/rspack_cacheable_macros/src/cacheable_dyn/impl_trait.rs:14-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.
Duplicated block (8–9 lines × 2) crates/rspack_plugin_mf/src/sharing/provide_shared_module.rs:170— crates/rspack_plugin_mf/src/sharing/provide_shared_module.rs:170-177 | crates/rspack_plugin_rsc/src/rsc_entry_module.rs:359-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.
Duplicated block (7 lines × 4) crates/rspack/src/builder/browserslist_target.rs:125— crates/rspack/src/builder/browserslist_target.rs:125-131 | crates/rspack/src/builder/browserslist_target.rs:166-172 | crates/rspack/src/builder/browserslist_target.rs:223-229 | crates/rspack/src/builder/browserslist_target.rs:244-250 — 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 (7 lines × 4) crates/rspack_binding_api/src/chunk.rs:98— crates/rspack_binding_api/src/chunk.rs:98-104 | crates/rspack_binding_api/src/chunk.rs:133-139 | crates/rspack_binding_api/src/chunk.rs:145-151 | crates/rspack_binding_api/src/chunk.rs:210-216 — 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 (7 lines × 4) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:47— crates/rspack_plugin_esm_library/src/optimize_chunks.rs:47-53 | crates/rspack_plugin_esm_library/src/optimize_chunks.rs:578-584 | crates/rspack_plugin_rslib/src/dyn_import_external.rs:142-148 | crates/rspack_plugin_rslib/src/worker_external.rs:35-41 — 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.
Duplicated block (7 lines × 3) crates/rspack_binding_api/src/module_graph.rs:208— crates/rspack_binding_api/src/module_graph.rs:208-214 | crates/rspack_binding_api/src/module_graph.rs:237-243 | crates/rspack_binding_api/src/module_graph.rs:266-272 — 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 (7 lines × 3) crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:183— crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:183-189 | crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:214-220 | crates/rspack_plugin_javascript/src/utils/eval/eval_binary_expr.rs:260-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.
Duplicated block (7 lines × 3) crates/rspack_plugin_rstest/src/parser_plugin.rs:232— crates/rspack_plugin_rstest/src/parser_plugin.rs:232-238 | crates/rspack_plugin_rstest/src/parser_plugin.rs:287-293 | crates/rspack_plugin_rstest/src/parser_plugin.rs:615-621 — 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/rspack_tracing/src/perfetto.rs:95— crates/rspack_tracing/src/perfetto.rs:95-100 | crates/rspack_tracing/src/perfetto.rs:126-130 | crates/rspack_tracing/src/perfetto.rs:151-156 — 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/rspack_binding_api/src/build_info.rs:72— crates/rspack_binding_api/src/build_info.rs:72-76 | crates/rspack_binding_api/src/build_info.rs:118-122 | crates/rspack_binding_api/src/compilation/chunks.rs:31-35 — 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 (5 lines × 3) crates/rspack_plugin_dll/src/dll_entry/dll_entry_plugin.rs:38— crates/rspack_plugin_dll/src/dll_entry/dll_entry_plugin.rs:38-44 | crates/rspack_plugin_dynamic_entry/src/lib.rs:133-137 | crates/rspack_plugin_entry/src/lib.rs:53-57 — 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 (23 lines × 2 locations) packages/rspack/src/rspackOptionsApply.ts:360— packages/rspack/src/rspackOptionsApply.ts:360 · packages/rspack/src/rspackOptionsApply.ts:388 — 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.
Duplicated block (23 lines × 2 locations) packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts:240— packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts:240 · packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts:264 — 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.
Duplicated block (23 lines × 2 locations) packages/rspack/src/taps/compilation.ts:446— packages/rspack/src/taps/compilation.ts:446 · packages/rspack/src/taps/javascriptModules.ts:16 — the 2 copies are spread across 2 files, 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.
Duplicated block (15 lines × 2 locations) packages/rspack/src/ChunkGraph.ts:7— packages/rspack/src/ChunkGraph.ts:7 · packages/rspack/src/ChunkGraph.ts:27 — 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.
Duplicated block (15 lines × 2 locations) packages/rspack/src/loader-runner/index.ts:548— packages/rspack/src/loader-runner/index.ts:548 · packages/rspack/src/loader-runner/worker.ts:130 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (15 lines × 2 locations) packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:118— packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:118 · packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:287 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Unused dependency 'mini-css-extract-plugin' — Declared in tests/rspack-test/configCases/css/css-order-concatenate-modules/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'mini-css-extract-plugin' — Declared in tests/rspack-test/configCases/css/css-order-reexport/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'mini-css-extract-plugin' — Declared in tests/rspack-test/configCases/css/css-order2/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
ConcatenatedModule::code_generation (cyclomatic 81) crates/rspack_core/src/concatenated_module.rs:1009— ConcatenatedModule::code_generation has cyclomatic complexity 81 (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.
ConcatenatedModule::get_final_binding (cyclomatic 32) crates/rspack_core/src/concatenated_module.rs:2691— ConcatenatedModule::get_final_binding 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.
rspack_sources::helpers::stream_chunks_of_combined_source_map (cyclomatic 42) crates/rspack_sources/src/helpers.rs:935— rspack_sources::helpers::stream_chunks_of_combined_source_map 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.
rspack_sources::helpers::stream_chunks_of_source_map_full (cyclomatic 21) crates/rspack_sources/src/helpers.rs:650— rspack_sources::helpers::stream_chunks_of_source_map_full 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.
ModuleCodeTemplate::export_from_import (cyclomatic 35) crates/rspack_core/src/runtime_template.rs:1375— ModuleCodeTemplate::export_from_import 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.
ModuleCodeTemplate::module_namespace_promise (cyclomatic 18) crates/rspack_core/src/runtime_template.rs:1605— ModuleCodeTemplate::module_namespace_promise 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.
InnerGraphParserPlugin::infer_dependency_usage (cyclomatic 34) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:106— InnerGraphParserPlugin::infer_dependency_usage 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.
InnerGraphParserPlugin::finalize_dependency_usage (cyclomatic 17) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:258— InnerGraphParserPlugin::finalize_dependency_usage 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.
FileSystemInfo::validate_snapshot (cyclomatic 31) crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:887— FileSystemInfo::validate_snapshot 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.
FileSystemInfo::read_context (cyclomatic 24) crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:721— FileSystemInfo::read_context 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.
Executer::compute_jump_table (cyclomatic 27) crates/rspack_dojang/src/exec.rs:45— Executer::compute_jump_table 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.
Executer::render (cyclomatic 18) crates/rspack_dojang/src/exec.rs:191— Executer::render 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.
rspack_plugin_split_chunks::plugin::intersections::collect_intersections (cyclomatic 27) crates/rspack_plugin_split_chunks/src/plugin/intersections.rs:158— rspack_plugin_split_chunks::plugin::intersections::collect_intersections 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.
rspack_plugin_split_chunks::plugin::max_size::deterministic_grouping (cyclomatic 20) crates/rspack_plugin_split_chunks/src/plugin/max_size.rs:279— rspack_plugin_split_chunks::plugin::max_size::deterministic_grouping has cyclomatic complexity 20 (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.
AssetParserAndGenerator::generate (cyclomatic 26) crates/rspack_plugin_asset/src/lib.rs:527— AssetParserAndGenerator::generate 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.
AssetParserAndGenerator::source_types (cyclomatic 19) crates/rspack_plugin_asset/src/lib.rs:343— AssetParserAndGenerator::source_types 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.
FlagDependencyUsagePluginProxy::apply (cyclomatic 26) crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:64— FlagDependencyUsagePluginProxy::apply has cyclomatic complexity 26 (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.
FlagDependencyUsagePluginProxy::process_referenced_module (cyclomatic 24) crates/rspack_plugin_javascript/src/plugin/flag_dependency_usage_plugin.rs:435— FlagDependencyUsagePluginProxy::process_referenced_module 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.
CopyRspackPlugin::run_pattern (cyclomatic 25) crates/rspack_plugin_copy/src/lib.rs:394— CopyRspackPlugin::run_pattern 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.
CopyRspackPlugin::analyze_every_entry (cyclomatic 19) crates/rspack_plugin_copy/src/lib.rs:202— CopyRspackPlugin::analyze_every_entry 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.
SourceMapDevToolPlugin::collect_tasks (cyclomatic 25) crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:585— SourceMapDevToolPlugin::collect_tasks has cyclomatic complexity 25 (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.
SourceMapDevToolPlugin::create_mapped_asset (cyclomatic 16) crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:1023— SourceMapDevToolPlugin::create_mapped_asset 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.
ValueAtRuleStream::push (cyclomatic 23) crates/css-module-lexer/src/dependencies.rs:577— ValueAtRuleStream::push 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.
ValueAtRuleStream::push_parsed_item (cyclomatic 16) crates/css-module-lexer/src/dependencies.rs:765— ValueAtRuleStream::push_parsed_item 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: AnimationReserved::check (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.
ResolverGeneric::package_target_resolve (cyclomatic 22) crates/rspack_resolver/src/lib.rs:2125— ResolverGeneric::package_target_resolve has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to one function item inside it that branches. 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.
ResolverGeneric::package_exports_resolve (cyclomatic 18) crates/rspack_resolver/src/lib.rs:1864— ResolverGeneric::package_exports_resolve has cyclomatic complexity 18 (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.
Eval::run (cyclomatic 21) crates/rspack_dojang/src/context.rs:180— Eval::run 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.
Eval::new (cyclomatic 16) crates/rspack_dojang/src/eval.rs:28— Eval::new 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.
ExportedEnumCollector::evaluate_bin (cyclomatic 21) crates/swc_plugin_ts_collector/src/enums.rs:154— ExportedEnumCollector::evaluate_bin 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.
ExportedEnumCollector::visit_program (cyclomatic 16) crates/swc_plugin_ts_collector/src/enums.rs:314— ExportedEnumCollector::visit_program 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.
rspack_macros::string_enum::expand (cyclomatic 20) crates/rspack_macros/src/string_enum.rs:69— rspack_macros::string_enum::expand 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.
rspack_macros::ast_object::expand_ast_object_derive (cyclomatic 18) crates/rspack_macros/src/ast_object.rs:8— rspack_macros::ast_object::expand_ast_object_derive 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.
rspack_plugin_rslib::dyn_import_external::cutout_star_re_export_externals (cyclomatic 20) crates/rspack_plugin_rslib/src/dyn_import_external.rs:14— rspack_plugin_rslib::dyn_import_external::cutout_star_re_export_externals 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.
rspack_plugin_rslib::isolated_dts::complete_isolated_dts_outputs (cyclomatic 16) crates/rspack_plugin_rslib/src/isolated_dts.rs:37— rspack_plugin_rslib::isolated_dts::complete_isolated_dts_outputs 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.
CommonJsImportsParserPlugin::declarator (cyclomatic 17) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2106— CommonJsImportsParserPlugin::declarator 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.
CommonJsImportsParserPlugin::call (cyclomatic 17) crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs:2530— CommonJsImportsParserPlugin::call 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.
ImportPlugin::transform (cyclomatic 16) crates/swc_plugin_import/src/lib.rs:251— ImportPlugin::transform 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.
ImportPlugin::visit_mut_module (cyclomatic 16) crates/swc_plugin_import/src/lib.rs:376— ImportPlugin::visit_mut_module 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.
rspack::builder::target::merge_target_properties (cognitive 180) crates/rspack/src/builder/target.rs:187— rspack::builder::target::merge_target_properties has cognitive complexity 180 (threshold 15). Drivers by points: boolean chains 60, match/switch 30 (60 pts), if/else 30, loops 30 (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.
rspack::builder::target::get_target_properties (cognitive 22) crates/rspack/src/builder/target.rs:245— rspack::builder::target::get_target_properties 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.
rspack_sources::helpers::stream_chunks_of_combined_source_map (cognitive 155) crates/rspack_sources/src/helpers.rs:935— rspack_sources::helpers::stream_chunks_of_combined_source_map has cognitive complexity 155 (threshold 15). Drivers by points: if/else 43 (133 pts), match/switch 4 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 105). 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.
rspack_sources::helpers::stream_chunks_of_source_map_full (cognitive 28) crates/rspack_sources/src/helpers.rs:650— rspack_sources::helpers::stream_chunks_of_source_map_full has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 4, loops 4 (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.
ExternalModule::get_source (cognitive 115) crates/rspack_core/src/external_module.rs:688— ExternalModule::get_source has cognitive complexity 115 (threshold 15). Drivers by points: if/else 31 (83 pts), loops 3 (20 pts), boolean chains 7, match/switch 2 (5 pts) (nesting depth added 72). 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.
ExternalModule::code_generation (cognitive 18) crates/rspack_core/src/external_module.rs:1263— ExternalModule::code_generation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (17 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.
ModuleCodeTemplate::export_from_import (cognitive 81) crates/rspack_core/src/runtime_template.rs:1375— ModuleCodeTemplate::export_from_import has cognitive complexity 81 (threshold 15). Drivers by points: if/else 30 (63 pts), match/switch 5 (13 pts), boolean chains 5 (nesting depth added 41). 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.
ModuleCodeTemplate::module_namespace_promise (cognitive 39) crates/rspack_core/src/runtime_template.rs:1605— ModuleCodeTemplate::module_namespace_promise has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 2, match/switch 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.
AMDDefineDependencyParserPlugin::process_call_define (cognitive 69) crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:262— AMDDefineDependencyParserPlugin::process_call_define has cognitive complexity 69 (threshold 15). Drivers by points: if/else 37 (62 pts), loops 2 (4 pts), match/switch 2, 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.
AMDDefineDependencyParserPlugin::process_array (cognitive 23) crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:117— AMDDefineDependencyParserPlugin::process_array has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 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.
Stats::get_module (cognitive 68) crates/rspack_core/src/stats/mod.rs:1136— Stats::get_module has cognitive complexity 68 (threshold 15). Drivers by points: if/else 38 (51 pts), match/switch 3 (8 pts), boolean chains 7, 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.
Stats::get_assets (cognitive 24) crates/rspack_core/src/stats/mod.rs:304— Stats::get_assets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 6 (9 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.
AssetParserAndGenerator::generate (cognitive 66) crates/rspack_plugin_asset/src/lib.rs:527— AssetParserAndGenerator::generate has cognitive complexity 66 (threshold 15). Drivers by points: if/else 28 (55 pts), match/switch 4 (9 pts), boolean chains 2 (nesting depth added 32). 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.
AssetParserAndGenerator::source_types (cognitive 30) crates/rspack_plugin_asset/src/lib.rs:343— AssetParserAndGenerator::source_types has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 6, 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.
FixIssuers::clean_cycle_module (cognitive 64) crates/rspack_core/src/compilation/build_module_graph/graph_updater/cutout/fix_issuers.rs:402— FixIssuers::clean_cycle_module has cognitive complexity 64 (threshold 15). Drivers by points: if/else 9 (38 pts), loops 8 (21 pts), match/switch 1 (4 pts), boolean chains 1 (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.
FixIssuers::try_set_first_incoming (cognitive 22) crates/rspack_core/src/compilation/build_module_graph/graph_updater/cutout/fix_issuers.rs:259— FixIssuers::try_set_first_incoming has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (6 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.
FileSystemInfo::validate_snapshot (cognitive 61) crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:887— FileSystemInfo::validate_snapshot has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 9 (18 pts), match/switch 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.
FileSystemInfo::read_context (cognitive 36) crates/rspack_core/src/new_cache/snapshot/file_system_info.rs:721— FileSystemInfo::read_context has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 4 (7 pts), loops 2, 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.
Eval::run (cognitive 54) crates/rspack_dojang/src/context.rs:180— Eval::run has cognitive complexity 54 (threshold 15). Drivers by points: match/switch 8 (27 pts), if/else 6 (18 pts), loops 3 (9 pts) (nesting depth added 37). 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.
Eval::new (cognitive 37) crates/rspack_dojang/src/eval.rs:28— Eval::new has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 3 (10 pts), loops 3 (8 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.
ImportPlugin::visit_mut_module (cognitive 53) crates/swc_plugin_import/src/lib.rs:376— ImportPlugin::visit_mut_module has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (35 pts), match/switch 2 (11 pts), loops 4 (7 pts) (nesting depth added 36). 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.
ImportPlugin::transform (cognitive 21) crates/swc_plugin_import/src/lib.rs:251— ImportPlugin::transform has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 4 (7 pts) (nesting depth added 5). 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.
CopyRspackPlugin::run_pattern (cognitive 50) crates/rspack_plugin_copy/src/lib.rs:394— CopyRspackPlugin::run_pattern has cognitive complexity 50 (threshold 15). Drivers by points: if/else 27 (43 pts), match/switch 3 (6 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.
CopyRspackPlugin::analyze_every_entry (cognitive 32) crates/rspack_plugin_copy/src/lib.rs:202— CopyRspackPlugin::analyze_every_entry has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (25 pts), match/switch 3 (6 pts), boolean chains 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.
rspack_util::node_path::normalize_string (cognitive 48) crates/rspack_util/src/node_path.rs:18— rspack_util::node_path::normalize_string has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (44 pts), boolean chains 3, loops 1 (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.
rspack_util::location::byte_line_column_to_offset (cognitive 16) crates/rspack_util/src/location.rs:6— rspack_util::location::byte_line_column_to_offset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), 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.
rspack_macros::string_enum::expand (cognitive 43) crates/rspack_macros/src/string_enum.rs:69— rspack_macros::string_enum::expand has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (35 pts), loops 3 (4 pts), match/switch 2 (4 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.
rspack_macros::ast_object::expand_ast_object_derive (cognitive 33) crates/rspack_macros/src/ast_object.rs:8— rspack_macros::ast_object::expand_ast_object_derive has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 3 (5 pts), loops 3 (4 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.
CssPlugin::get_modules_in_order (cognitive 43) crates/rspack_plugin_css/src/plugin/mod.rs:53— CssPlugin::get_modules_in_order has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 4 (8 pts), boolean chains 1 (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.
CssPlugin::render_ordered_css_sources (cognitive 17) crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:242— CssPlugin::render_ordered_css_sources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, 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.
CssLoadingRuntimeModule::generate (cognitive 40) crates/rspack_plugin_css/src/runtime/mod.rs:242— CssLoadingRuntimeModule::generate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 9, 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.
CssLoadingRuntimeModule::generate (cognitive 22) crates/rspack_plugin_extract_css/src/runtime.rs:255— CssLoadingRuntimeModule::generate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, loops 2 (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.
Executer::compute_jump_table (cognitive 39) crates/rspack_dojang/src/exec.rs:45— Executer::compute_jump_table has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 5 (7 pts), match/switch 2 (5 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.
Executer::render (cognitive 34) crates/rspack_dojang/src/exec.rs:191— Executer::render has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 4 (11 pts), 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.
ImportMetaPlugin::meta_property (cognitive 39) crates/rspack_plugin_javascript/src/parser_plugin/import_meta_plugin.rs:653— ImportMetaPlugin::meta_property has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (35 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 22). 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.
ImportMetaPlugin::unhandled_expression_member_chain (cognitive 24) crates/rspack_plugin_javascript/src/parser_plugin/import_meta_plugin.rs:875— ImportMetaPlugin::unhandled_expression_member_chain has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 2 (4 pts), boolean chains 1 (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.
xtask::release_check::run_inner (cognitive 37) xtask/src/release_check/mod.rs:13— xtask::release_check::run_inner has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 2 (6 pts) (nesting depth added 25). 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.
xtask::deny_ext::enforce_workspace_version (cognitive 36) xtask/src/deny_ext/mod.rs:23— xtask::deny_ext::enforce_workspace_version has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 3 (8 pts), boolean chains 1 (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.
ValueAtRuleStream::push (cognitive 36) crates/css-module-lexer/src/dependencies.rs:577— ValueAtRuleStream::push has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 6 (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.
ValueAtRuleStream::push_parsed_item (cognitive 26) crates/css-module-lexer/src/dependencies.rs:765— ValueAtRuleStream::push_parsed_item has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 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.
PluginCssExtract::render_content_asset (cognitive 35) crates/rspack_plugin_extract_css/src/plugin.rs:345— PluginCssExtract::render_content_asset has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 2, 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.
PluginCssExtract::sort_modules (cognitive 33) crates/rspack_plugin_extract_css/src/plugin.rs:139— PluginCssExtract::sort_modules has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 5 (9 pts), boolean chains 2, 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.
RstestParserPlugin::process_mock (cognitive 33) crates/rspack_plugin_rstest/src/parser_plugin.rs:384— RstestParserPlugin::process_mock has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 1, match/switch 1 (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.
RstestParserPlugin::load_mock (cognitive 19) crates/rspack_plugin_rstest/src/parser_plugin.rs:609— RstestParserPlugin::load_mock has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, 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.
rspack_allocative_derive::derive_allocative::extract_attrs (cognitive 30) crates/rspack_allocative_derive/src/derive_allocative.rs:427— rspack_allocative_derive::derive_allocative::extract_attrs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 2 (3 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.
rspack_allocative_derive::derive_allocative::uses_enum_reflection (cognitive 17) crates/rspack_allocative_derive/src/derive_allocative.rs:172— rspack_allocative_derive::derive_allocative::uses_enum_reflection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, 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.
ESMImportSpecifierDependencyTemplate::render_evaluated_in_operator (cognitive 29) crates/rspack_plugin_javascript/src/dependency/esm/esm_import_specifier_dependency.rs:530— ESMImportSpecifierDependencyTemplate::render_evaluated_in_operator has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 3 (4 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.
ESMImportSpecifierDependencyTemplate::render (cognitive 23) crates/rspack_plugin_javascript/src/dependency/esm/esm_import_specifier_dependency.rs:638— ESMImportSpecifierDependencyTemplate::render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, 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.
HashHelper::dir_hash (cognitive 28) crates/rspack_core/src/legacy_cache/persistent/snapshot/strategy/hash_helper.rs:112— HashHelper::dir_hash has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 1 (3 pts), boolean chains 1 (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.
HashHelper::dir_timestamp_hash (cognitive 28) crates/rspack_core/src/legacy_cache/persistent/snapshot/strategy/hash_helper.rs:163— HashHelper::dir_timestamp_hash has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 1 (2 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.
AsyncWasmParserAndGenerator::parse (cognitive 27) crates/rspack_plugin_wasm/src/parser_and_generator.rs:51— AsyncWasmParserAndGenerator::parse has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 4 (15 pts), loops 3 (9 pts), if/else 2 (3 pts) (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.
AsyncWasmParserAndGenerator::generate (cognitive 16) crates/rspack_plugin_wasm/src/parser_and_generator.rs:166— AsyncWasmParserAndGenerator::generate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), 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.
rspack_watcher::ignored::glob_to_regexp (cognitive 23) crates/rspack_watcher/src/ignored.rs:45— rspack_watcher::ignored::glob_to_regexp has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, loops 2 (4 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.
rspack_watcher::executor::create_execute_task (cognitive 20) crates/rspack_watcher/src/executor.rs:221— rspack_watcher::executor::create_execute_task has cognitive complexity 20 (threshold 15). Drivers by points: if/else 2 (10 pts), match/switch 2 (6 pts), 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.
Near-duplicate member pair (41 shared lines) crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:542— crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:542-602 | crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:609-666 — These two members are variants of one another: 41 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 (41 shared lines) crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:285— crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:285-346 | crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:360-415 — These two members are variants of one another: 41 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.
Duplicated block (36 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:178— crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:178-213 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:185-220 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
Duplicated block (36 lines × 2) crates/rspack_core/src/artifacts/async_modules_artifact.rs:17— crates/rspack_core/src/artifacts/async_modules_artifact.rs:17-52 | crates/rspack_core/src/artifacts/imported_by_defer_modules_artifact.rs:17-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.
Duplicated block (30 lines × 2) crates/rspack_plugin_esm_library/src/link.rs:1958— crates/rspack_plugin_esm_library/src/link.rs:1958-1987 | crates/rspack_plugin_esm_library/src/link.rs:2007-2036 — both copies are in the same file, so extract the 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 (30 lines × 2) crates/rspack_binding_api/src/chunk.rs:380— crates/rspack_binding_api/src/chunk.rs:380-409 | crates/rspack_binding_api/src/chunk_group.rs:223-252 — 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 (24 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:80— crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:80-103 | crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:654-677 — both copies are in the same file, so extract the 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 (24 lines × 2) crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:699— crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:699-722 | crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:749-772 — both copies are in the same file, so extract the 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 (20 lines × 2) crates/rspack_hash/src/lib.rs:258— crates/rspack_hash/src/lib.rs:258-277 | crates/rspack_hash/src/lib.rs:282-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.
Duplicated block (20 lines × 2) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1063— crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1063-1082 | crates/rspack_plugin_javascript/src/dependency/esm/esm_import_dependency.rs:321-340 — 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 (16–17 lines × 2) crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:166— crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:166-182 | crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs:273-288 — before extracting anything, compare `crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs` and `crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (16–17 lines × 2) crates/rspack_plugin_mf/src/manifest/asset.rs:28— crates/rspack_plugin_mf/src/manifest/asset.rs:28-44 | crates/rspack_plugin_mf/src/manifest/asset.rs:75-90 — both copies are in the same file, so extract the 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 (16 lines × 2) crates/rspack_core/src/resolver/resolver_impl.rs:304— crates/rspack_core/src/resolver/resolver_impl.rs:304-319 | crates/rspack_core/src/resolver/resolver_impl.rs:335-350 — both copies are in the same file, so extract the 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 (16 lines × 2) crates/rspack_plugin_runtime/src/common_js_chunk_format.rs:48— crates/rspack_plugin_runtime/src/common_js_chunk_format.rs:48-63 | crates/rspack_plugin_runtime/src/module_chunk_format.rs:52-67 — before extracting anything, compare `crates/rspack_plugin_runtime/src/common_js_chunk_format.rs` and `crates/rspack_plugin_runtime/src/module_chunk_format.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. 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 (14–15 lines × 2) crates/css-module-lexer/src/dependencies.rs:3231— crates/css-module-lexer/src/dependencies.rs:3231-3244 | crates/css-module-lexer/src/dependencies.rs:3387-3401 — both copies are in the same file, so extract the 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–15 lines × 2) crates/rspack_plugin_mf/src/sharing/collect_shared_entry_plugin.rs:173— crates/rspack_plugin_mf/src/sharing/collect_shared_entry_plugin.rs:173-186 | crates/rspack_plugin_mf/src/sharing/shared_used_exports_optimizer_plugin.rs:108-122 — 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 (12–13 lines × 2) crates/rspack_plugin_css/src/runtime/mod.rs:164— crates/rspack_plugin_css/src/runtime/mod.rs:164-175 | crates/rspack_plugin_extract_css/src/runtime.rs:198-210 — 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/rspack_plugin_javascript/src/parser_plugin/define_plugin/parser.rs:186— crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/parser.rs:186-197 | crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/parser.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 (10–11 lines × 3) crates/rspack_plugin_library/src/amd_library_plugin.rs:143— crates/rspack_plugin_library/src/amd_library_plugin.rs:143-152 | crates/rspack_plugin_library/src/assign_library_plugin.rs:160-170 | crates/rspack_plugin_library/src/jsonp_library_plugin.rs:92-101 — before extracting anything, compare `crates/rspack_plugin_library/src/amd_library_plugin.rs` and `crates/rspack_plugin_library/src/jsonp_library_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (10–11 lines × 3) crates/rspack_plugin_library/src/umd_library_plugin.rs:385— crates/rspack_plugin_library/src/umd_library_plugin.rs:385-395 | crates/rspack_plugin_runtime/src/runtime_module/auto_public_path.rs:62-71 | crates/rspack_plugin_runtime/src/runtime_module/utils.rs:126-135 — 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/rspack_binding_api/src/module_graph.rs:196— crates/rspack_binding_api/src/module_graph.rs:196-204 | crates/rspack_binding_api/src/module_graph.rs:225-233 | crates/rspack_binding_api/src/module_graph.rs:254-262 — 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/css-module-lexer/src/dependencies.rs:2335— crates/css-module-lexer/src/dependencies.rs:2335-2343 | crates/css-module-lexer/src/dependencies.rs:2906-2914 | crates/css-module-lexer/src/dependencies.rs:3114-3122 — 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 × 4) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1299— crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1299-1306 | crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1313-1320 | crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1327-1334 | crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1348-1355 — 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 (8 lines × 4) crates/rspack_napi/src/js_values/one_shot_value_ref.rs:66— crates/rspack_napi/src/js_values/one_shot_value_ref.rs:66-73 | crates/rspack_napi/src/js_values/one_shot_value_ref.rs:77-84 | crates/rspack_napi/src/js_values/threadsafe_one_shot_value_ref.rs:147-154 | crates/rspack_napi/src/js_values/threadsafe_one_shot_value_ref.rs:158-165 — 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.
Duplicated block (6 lines × 3) crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_require_dependency.rs:87— crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_require_dependency.rs:87-92 | crates/rspack_plugin_javascript/src/dependency/esm/esm_import_specifier_dependency.rs:172-177 | crates/rspack_plugin_javascript/src/dependency/esm/import_dependency.rs:77-82 — 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 (6 lines × 3) crates/rspack_cacheable/src/with/as_preset/lightningcss.rs:34— crates/rspack_cacheable/src/with/as_preset/lightningcss.rs:34-39 | crates/rspack_cacheable/src/with/as_preset/serde_json.rs:35-40 | crates/rspack_cacheable/src/with/as_preset/serde_json.rs:75-80 — 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 (32 lines × 2 locations) packages/rspack/src/Compiler.ts:1112— packages/rspack/src/Compiler.ts:1112 · packages/rspack/src/Compiler.ts:1151 — 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.
Duplicated block (32 lines × 2 locations) packages/rspack/src/FileSystemDependencies.ts:126— packages/rspack/src/FileSystemDependencies.ts:126 · packages/rspack/src/Modules.ts:45 — the 2 copies are spread across 2 files, 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.
Duplicated block (30 lines × 2 locations) packages/rspack-cli/src/commands/preview.ts:47— packages/rspack-cli/src/commands/preview.ts:47 · packages/rspack-cli/src/commands/serve.ts:61 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (30 lines × 2 locations) packages/rspack/src/ConcatenatedModule.ts:6— packages/rspack/src/ConcatenatedModule.ts:6 · packages/rspack/src/ContextModule.ts:6 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (26 lines × 2 locations) packages/rspack/src/FileSystem.ts:75— packages/rspack/src/FileSystem.ts:75 · packages/rspack/src/FileSystem.ts:176 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (26 lines × 2 locations) packages/rspack/src/browser/service.ts:1— packages/rspack/src/browser/service.ts:1 · packages/rspack/src/loader-runner/service.ts:125 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (22 lines × 2 locations) packages/rspack/src/loader-runner/index.ts:700— packages/rspack/src/loader-runner/index.ts:700 · packages/rspack/src/loader-runner/worker.ts:451 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (22 lines × 2 locations) packages/rspack/src/util/fs.ts:287— packages/rspack/src/util/fs.ts:287 · packages/rspack/src/util/fs.ts:465 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (19 lines × 4 locations) packages/rspack/src/NativeWatchFileSystem.ts:436— packages/rspack/src/NativeWatchFileSystem.ts:436 · packages/rspack/src/NativeWatchFileSystem.ts:456 · packages/rspack/src/node/NodeWatchFileSystem.ts:269 · packages/rspack/src/node/NodeWatchFileSystem.ts:289 — the 4 copies are spread across 2 files, 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.
Duplicated block (19 lines × 4 locations) packages/rspack/src/builtin-plugin/html-plugin/taps.ts:23— packages/rspack/src/builtin-plugin/html-plugin/taps.ts:23 · packages/rspack/src/builtin-plugin/html-plugin/taps.ts:45 · packages/rspack/src/builtin-plugin/html-plugin/taps.ts:67 · packages/rspack/src/builtin-plugin/html-plugin/taps.ts:110 — 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.
Boundary violation [package:relative-cross-package] crates/node_binding/scripts/build.mjs:5— crates/node_binding/scripts/build.mjs:5 reaches into another package with a relative path (../../../scripts/allocative-driver.mjs) — import the package by name instead.
Boundary violation [package:third-party-deep-import] packages/rspack/src/node/NodeEnvironmentPlugin.ts:12— packages/rspack/src/node/NodeEnvironmentPlugin.ts:12 imports enhanced-resolve/lib/CachedInputFileSystem, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Complex function resolveToUnqualified (cyclomatic 54, cognitive 161) tests/rspack-test/configCases/resolve/pnp-enable/.pnp.cjs:10134— resolveToUnqualified has cyclomatic complexity 54 and cognitive complexity 161; 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.
Complex function resolveToUnqualified (cyclomatic 54, cognitive 161) tests/rspack-test/diagnosticsCases/config/pnp-disable/.pnp.cjs:10134— resolveToUnqualified has cyclomatic complexity 54 and cognitive complexity 161; 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.
Complex function arg (cyclomatic 40, cognitive 81) tests/rspack-test/configCases/resolve/pnp-enable/.pnp.cjs:9545— arg has cyclomatic complexity 40 and cognitive complexity 81; 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.
Complex function arg (cyclomatic 40, cognitive 81) tests/rspack-test/diagnosticsCases/config/pnp-disable/.pnp.cjs:9545— arg has cyclomatic complexity 40 and cognitive complexity 81; 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.
Complex function _resolveFilename (cyclomatic 30, cognitive 49) tests/rspack-test/configCases/resolve/pnp-enable/.pnp.cjs:8772— _resolveFilename has cyclomatic complexity 30 and cognitive complexity 49; 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.
Complex function _resolveFilename (cyclomatic 30, cognitive 49) tests/rspack-test/diagnosticsCases/config/pnp-disable/.pnp.cjs:8772— _resolveFilename has cyclomatic complexity 30 and cognitive complexity 49; 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.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 38 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
rspack::builder::target::merge_target_properties (cyclomatic 181) crates/rspack/src/builder/target.rs:187— rspack::builder::target::merge_target_properties has cyclomatic complexity 181 (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.
RspackOptionsApply.process (cyclomatic 90) packages/rspack/src/rspackOptionsApply.ts:88— RspackOptionsApply.process has cyclomatic complexity 90 (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.
ServerActions::visit_mut_module_items (cyclomatic 77) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1294— ServerActions::visit_mut_module_items has cyclomatic complexity 77 (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.
rspack_plugin_hmr::process_assets (cyclomatic 60) crates/rspack_plugin_hmr/src/lib.rs:153— rspack_plugin_hmr::process_assets has cyclomatic complexity 60 (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.
NormalModuleFactory::resolve_normal_module (cyclomatic 52) crates/rspack_core/src/normal_module_factory.rs:721— NormalModuleFactory::resolve_normal_module 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.
rspack_plugin_css_chunking::optimize_chunks (cyclomatic 52) crates/rspack_plugin_css_chunking/src/lib.rs:73— rspack_plugin_css_chunking::optimize_chunks 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.
ReplaceSourceChunks::stream (cyclomatic 48) crates/rspack_sources/src/replace_source.rs:600— ReplaceSourceChunks::stream has cyclomatic complexity 48 (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.
InitializeEvaluating::evaluate_call_expression_member (cyclomatic 46) crates/rspack_plugin_javascript/src/parser_plugin/initialize_evaluating.rs:66— InitializeEvaluating::evaluate_call_expression_member 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.
index.runLoaders (cyclomatic 46) packages/rspack/src/loader-runner/index.ts:249— index.runLoaders has cyclomatic complexity 46 (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.
worker.loaderImpl (cyclomatic 46) packages/rspack/src/loader-runner/worker.ts:69— worker.loaderImpl has cyclomatic complexity 46 (threshold 15). Of this number, 28 points are the body's own statements and 18 belong to 12 function items inside it that branch. 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.
build.build (cyclomatic 44) crates/node_binding/scripts/build.mjs:37— build.build has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 2 of the 44 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 39, 168). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ExternalModule::get_source (cyclomatic 39) crates/rspack_core/src/external_module.rs:688— ExternalModule::get_source 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.
AMDDefineDependencyParserPlugin::process_call_define (cyclomatic 39) crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:262— AMDDefineDependencyParserPlugin::process_call_define 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.
rspack_loader_swc::rsc_transforms::react_server_components::collect_top_level_directives_and_imports (cyclomatic 38) crates/rspack_loader_swc/src/rsc_transforms/react_server_components.rs:245— rspack_loader_swc::rsc_transforms::react_server_components::collect_top_level_directives_and_imports has cyclomatic complexity 38 (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.
Stats::get_module (cyclomatic 37) crates/rspack_core/src/stats/mod.rs:1136— Stats::get_module 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.
rspack_plugin_swc_js_minimizer::process_assets (cyclomatic 37) crates/rspack_plugin_swc_js_minimizer/src/lib.rs:223— rspack_plugin_swc_js_minimizer::process_assets 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.
MultiCompiler.#runGraph (cyclomatic 36) packages/rspack/src/MultiCompiler.ts:320— MultiCompiler.#runGraph has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to 8 function items inside it that branch (processQueueWorker, nodeDone, nodeInvalidFromParent, …). 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.
EventProcessor::process (cyclomatic 35) crates/rspack_watcher/src/trigger.rs:227— EventProcessor::process 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.
(anonymous) (cyclomatic 35) packages/rspack/src/runtime/moduleFederationDefaultRuntime.js:9— (anonymous) has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 27 function items inside it that branch (a function literal at line 119, a function literal at line 68, merge, …). 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.
CssModuleParser::handle_dependency (cyclomatic 34) crates/rspack_plugin_css/src/parser_and_generator/parser.rs:508— CssModuleParser::handle_dependency 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.
smartGrouping.smartGrouping::runGrouping (cyclomatic 34) packages/rspack/src/util/smartGrouping.ts:71— smartGrouping.smartGrouping::runGrouping has cyclomatic complexity 34 (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.
plugin.HtmlRspackPluginImpl (cyclomatic 32) packages/rspack/src/builtin-plugin/html-plugin/plugin.ts:37— plugin.HtmlRspackPluginImpl has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 3 function items inside it that branch. 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.
ImportParserPlugin::import_call (cyclomatic 31) crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs:386— ImportParserPlugin::import_call 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.
rspack_plugin_limit_chunk_count::optimize_chunks (cyclomatic 31) crates/rspack_plugin_limit_chunk_count/src/lib.rs:56— rspack_plugin_limit_chunk_count::optimize_chunks 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.
ServeCommand.apply (cyclomatic 31) packages/rspack-cli/src/commands/serve.ts:41— ServeCommand.apply has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 58, 177). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
rspack_watcher::ignored::glob_to_regexp (cyclomatic 30) crates/rspack_watcher/src/ignored.rs:45— rspack_watcher::ignored::glob_to_regexp has cyclomatic complexity 30 (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.
moduleFederationDefaultRuntime.default (cyclomatic 30) packages/rspack/src/runtime/moduleFederationDefaultRuntime.js:9— moduleFederationDefaultRuntime.default has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 119, a function literal at line 68, merge, …). 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.
ConcatenationBindingResolver::resolve_inner (cyclomatic 29) crates/rspack_core/src/concatenation_backend.rs:202— ConcatenationBindingResolver::resolve_inner 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.
HttpCache::fetch_content (cyclomatic 29) crates/rspack_plugin_schemes/src/http_uri/http_cache.rs:102— HttpCache::fetch_content 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.
StrategyHelper::validate (cyclomatic 28) crates/rspack_core/src/legacy_cache/persistent/snapshot/strategy/mod.rs:223— StrategyHelper::validate 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.
OptimizationOptionsBuilder::build (cyclomatic 27) crates/rspack/src/builder/mod.rs:3489— OptimizationOptionsBuilder::build 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.
rspack_plugin_devtool::module_filename_helpers::template_replace (cyclomatic 27) crates/rspack_plugin_devtool/src/module_filename_helpers.rs:518— rspack_plugin_devtool::module_filename_helpers::template_replace 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.
ExecuteTask::main_run (cyclomatic 25) crates/rspack_core/src/compilation/build_module_graph/module_executor/execute.rs:195— ExecuteTask::main_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.
ModuleGroup::update_candidate (cyclomatic 25) crates/rspack_plugin_split_chunks/src/module_group.rs:449— ModuleGroup::update_candidate 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.
compilation.createCompilationHooksRegisters (cyclomatic 25) packages/rspack/src/taps/compilation.ts:29— compilation.createCompilationHooksRegisters has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 406, 214, 138, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Compilation.getLogger (cyclomatic 25) packages/rspack/src/Compilation.ts:889— Compilation.getLogger has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 898, 950, 946, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CommonJsExportRequireDependency::get_star_reexports (cyclomatic 24) crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_export_require_dependency.rs:63— CommonJsExportRequireDependency::get_star_reexports 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.
GetChunkFilenameRuntimeModule::generate (cyclomatic 24) crates/rspack_plugin_runtime/src/runtime_module/get_chunk_filename.rs:214— GetChunkFilenameRuntimeModule::generate 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.
ResolveOptions::fmt (cyclomatic 23) crates/rspack_resolver/src/options.rs:532— ResolveOptions::fmt 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.
RspackCLI.buildConfig::internalBuildConfig (cyclomatic 23) packages/rspack-cli/src/cli.ts:212— RspackCLI.buildConfig::internalBuildConfig 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.
NativeWatchFileSystem.watch (cyclomatic 23) packages/rspack/src/NativeWatchFileSystem.ts:156— NativeWatchFileSystem.watch has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 4 function items inside it that branch. 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.
CompilerOptionsBuilder::build (cyclomatic 22) crates/rspack/src/builder/mod.rs:936— CompilerOptionsBuilder::build has cyclomatic complexity 22 (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.
Cutout::cutout_artifact (cyclomatic 22) crates/rspack_core/src/compilation/build_module_graph/graph_updater/cutout/mod.rs:28— Cutout::cutout_artifact has cyclomatic complexity 22 (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.
CssLoadingRuntimeModule::generate (cyclomatic 22) crates/rspack_plugin_css/src/runtime/mod.rs:242— CssLoadingRuntimeModule::generate 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.
NodeStuffPlugin::identifier (cyclomatic 22) crates/rspack_plugin_javascript/src/parser_plugin/node_stuff_plugin.rs:134— NodeStuffPlugin::identifier 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.
RscServerPlugin::create_client_entries (cyclomatic 22) crates/rspack_plugin_rsc/src/server_plugin.rs:326— RscServerPlugin::create_client_entries 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.
TypeExportsCollector::visit_program (cyclomatic 22) crates/swc_plugin_ts_collector/src/type_exports.rs:29— TypeExportsCollector::visit_program 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.
SwcLoader::loader_impl (cyclomatic 21) crates/rspack_loader_swc/src/lib.rs:58— SwcLoader::loader_impl has cyclomatic complexity 21 (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.
rspack_plugin_ensure_chunk_conditions::optimize_chunks (cyclomatic 21) crates/rspack_plugin_ensure_chunk_conditions/src/lib.rs:12— rspack_plugin_ensure_chunk_conditions::optimize_chunks 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.
HtmlPluginAssets::create_assets (cyclomatic 21) crates/rspack_plugin_html/src/asset.rs:40— HtmlPluginAssets::create_assets 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.
rspack_plugin_merge_duplicate_chunks::optimize_chunks (cyclomatic 21) crates/rspack_plugin_merge_duplicate_chunks/src/lib.rs:15— rspack_plugin_merge_duplicate_chunks::optimize_chunks 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.
rspack_plugin_remove_duplicate_modules::optimize_chunks (cyclomatic 21) crates/rspack_plugin_remove_duplicate_modules/src/lib.rs:135— rspack_plugin_remove_duplicate_modules::optimize_chunks 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.
OutputOptionsBuilder::build (cyclomatic 20) crates/rspack/src/builder/mod.rs:2697— OutputOptionsBuilder::build 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.
FixIssuers::clean_cycle_module (cyclomatic 20) crates/rspack_core/src/compilation/build_module_graph/graph_updater/cutout/fix_issuers.rs:402— FixIssuers::clean_cycle_module 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.
rspack_plugin_real_content_hash::inner_impl (cyclomatic 20) crates/rspack_plugin_real_content_hash/src/lib.rs:78— rspack_plugin_real_content_hash::inner_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.
WatcherDirectoriesAnalyzer::analyze (cyclomatic 20) crates/rspack_watcher/src/analyzer/directories.rs:35— WatcherDirectoriesAnalyzer::analyze 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.
BlockItemCandidates::observe (cyclomatic 19) crates/css-module-lexer/src/parser.rs:217— BlockItemCandidates::observe 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.
ModuleObject::to_napi_value (cyclomatic 19) crates/rspack_binding_api/src/module.rs:665— ModuleObject::to_napi_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.
rspack_plugin_copy::process_assets (cyclomatic 19) crates/rspack_plugin_copy/src/lib.rs:733— rspack_plugin_copy::process_assets 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.
rspack_plugin_css::plugin::impl_plugin_for_css_plugin::runtime_requirements_in_tree (cyclomatic 19) crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:403— rspack_plugin_css::plugin::impl_plugin_for_css_plugin::runtime_requirements_in_tree 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.
rspack_plugin_rsdoctor::plugin::optimize_chunk_modules (cyclomatic 19) crates/rspack_plugin_rsdoctor/src/plugin.rs:368— rspack_plugin_rsdoctor::plugin::optimize_chunk_modules 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.
ConcatSourceChunks::stream (cyclomatic 19) crates/rspack_sources/src/concat_source.rs:267— ConcatSourceChunks::stream 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.
MultiStats.toJson (cyclomatic 19) packages/rspack/src/MultiStats.ts:75— MultiStats.toJson has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
ContextModule::get_lazy_source (cyclomatic 18) crates/rspack_core/src/context_module.rs:800— ContextModule::get_lazy_source 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.
CssPlugin::get_modules_in_order (cyclomatic 18) crates/rspack_plugin_css/src/plugin/mod.rs:53— CssPlugin::get_modules_in_order 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.
RscClientPlugin::traverse_modules (cyclomatic 18) crates/rspack_plugin_rsc/src/client_plugin.rs:469— RscClientPlugin::traverse_modules 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.
rspack_plugin_rstest::import_dependency::module_namespace_promise_rstest (cyclomatic 18) crates/rspack_plugin_rstest/src/import_dependency.rs:184— rspack_plugin_rstest::import_dependency::module_namespace_promise_rstest 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.
ModuleChunkLoadingRuntimeModule::generate (cyclomatic 18) crates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs:267— ModuleChunkLoadingRuntimeModule::generate 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.
rspack_util::node_path::normalize_string (cyclomatic 18) crates/rspack_util/src/node_path.rs:18— rspack_util::node_path::normalize_string 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.
loadConfig.loadExtendedConfig (cyclomatic 18) packages/rspack-cli/src/utils/loadConfig.ts:112— loadConfig.loadExtendedConfig 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.
cleverMerge.mergeSingleValue (cyclomatic 18) packages/rspack/src/util/cleverMerge.ts:457— cleverMerge.mergeSingleValue has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
version.version_handler (cyclomatic 18) scripts/release/version.mjs:59— version.version_handler 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.
RuleSetLogicalConditions::try_match_sync (cyclomatic 17) crates/rspack_core/src/options/module.rs:1517— RuleSetLogicalConditions::try_match_sync 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.
rspack_javascript_compiler::compiler::stringify::build_rspack_source_map (cyclomatic 17) crates/rspack_javascript_compiler/src/compiler/stringify.rs:166— rspack_javascript_compiler::compiler::stringify::build_rspack_source_map 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.
ESMImportSpecifierDependencyTemplate::render_evaluated_in_operator (cyclomatic 17) crates/rspack_plugin_javascript/src/dependency/esm/esm_import_specifier_dependency.rs:530— ESMImportSpecifierDependencyTemplate::render_evaluated_in_operator 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.
ExportInfoDependency::get_property (cyclomatic 17) crates/rspack_plugin_javascript/src/dependency/export_info_dependency.rs:43— ExportInfoDependency::get_property 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.
URLPlugin::new_expression (cyclomatic 17) crates/rspack_plugin_javascript/src/parser_plugin/url_plugin.rs:106— URLPlugin::new_expression 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.
rspack_plugin_size_limits::after_emit (cyclomatic 17) crates/rspack_plugin_size_limits/src/lib.rs:134— rspack_plugin_size_limits::after_emit 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.
utils.runSyncOrAsync (cyclomatic 17) packages/rspack/src/loader-runner/utils.ts:49— utils.runSyncOrAsync has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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.
IndependentSharedPlugin.createIndependentCompiler (cyclomatic 17) packages/rspack/src/sharing/IndependentSharedPlugin.ts:352— IndependentSharedPlugin.createIndependentCompiler has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 476, 382, 400, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
DeclarationCandidate::advance (cyclomatic 16) crates/css-module-lexer/src/parser.rs:94— DeclarationCandidate::advance 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.
IncrementalArtifacts::recover (cyclomatic 16) crates/rspack_core/src/artifacts/incremental_artifacts.rs:30— IncrementalArtifacts::recover 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.
rspack_loader_runner::scheme::get_scheme (cyclomatic 16) crates/rspack_loader_runner/src/scheme.rs:89— rspack_loader_runner::scheme::get_scheme has cyclomatic complexity 16 (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.
ExternalsPlugin::handle_external (cyclomatic 16) crates/rspack_plugin_externals/src/plugin.rs:44— ExternalsPlugin::handle_external has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
PluginCssExtract::render_content_asset (cyclomatic 16) crates/rspack_plugin_extract_css/src/plugin.rs:345— PluginCssExtract::render_content_asset 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.
RequireEnsureDependenciesBlockParserPlugin::call (cyclomatic 16) crates/rspack_plugin_javascript/src/parser_plugin/require_ensure_dependencies_block_parse_plugin.rs:72— RequireEnsureDependenciesBlockParserPlugin::call 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.
ChunkModules::next (cyclomatic 16) crates/rspack_plugin_rsc/src/utils.rs:77— ChunkModules::next 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.
RstestPlugin::resolve_mock_request (cyclomatic 16) crates/rspack_plugin_rstest/src/plugin.rs:273— RstestPlugin::resolve_mock_request 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.
JsonpChunkLoadingRuntimeModule::generate (cyclomatic 16) crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:277— JsonpChunkLoadingRuntimeModule::generate 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.
rspack_plugin_sri::asset::process_chunks (cyclomatic 16) crates/rspack_plugin_sri/src/asset.rs:39— rspack_plugin_sri::asset::process_chunks 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.
build.runBuild (cyclomatic 16) packages/rspack-cli/src/commands/build.ts:23— build.runBuild has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (errorHandler, errorHandler::getStatsOptions, a function literal at line 59, …). 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.
Watching.#go (cyclomatic 16) packages/rspack/src/Watching.ts:284— Watching.#go has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 6 function items inside it that branch. 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.
loader.pitch::handleExports (cyclomatic 16) packages/rspack/src/builtin-plugin/css-extract/loader.ts:163— loader.pitch::handleExports 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.
Skipped test: should have `process.env.WEBPACK_SERVE` set on serve mode packages/rspack-cli/tests/build/issue-6359/index.test.ts:15— Skipped — switched off by it.skip
HackComment crates/rspack_plugin_javascript/src/plugin/module_concatenation_plugin.rs:1596— // HACK: Sort configurations by length and start with the longest one — 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.
rspack_plugin_hmr::process_assets (cognitive 141) crates/rspack_plugin_hmr/src/lib.rs:153— rspack_plugin_hmr::process_assets has cognitive complexity 141 (threshold 15). Drivers by points: if/else 39 (97 pts), loops 16 (34 pts), boolean chains 7, match/switch 2 (3 pts) (nesting depth added 77). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rspack_plugin_css_chunking::optimize_chunks (cognitive 134) crates/rspack_plugin_css_chunking/src/lib.rs:73— rspack_plugin_css_chunking::optimize_chunks has cognitive complexity 134 (threshold 15). Drivers by points: if/else 22 (74 pts), loops 16 (38 pts), match/switch 4 (16 pts), boolean chains 6 (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplaceSourceChunks::stream (cognitive 125) crates/rspack_sources/src/replace_source.rs:600— ReplaceSourceChunks::stream has cognitive complexity 125 (threshold 15). Drivers by points: if/else 61 (118 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.runLoaders (cognitive 106) packages/rspack/src/loader-runner/index.ts:249— index.runLoaders has cognitive complexity 106 (threshold 15). Drivers by points: if/else 33 (57 pts), boolean chains 26, ternaries 9 (11 pts), loops 5 (9 pts), match/switch 2, error handling 1 (nesting depth added 30). Of this number, 60 points are the body's own statements and 46 belong to 28 function items inside it that branch. 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.
RspackOptionsApply.process (cognitive 103) packages/rspack/src/rspackOptionsApply.ts:88— RspackOptionsApply.process has cognitive complexity 103 (threshold 15). Drivers by points: if/else 49 (57 pts), ternaries 6 (20 pts), boolean chains 12, loops 4 (8 pts), match/switch 3 (6 pts) (nesting depth added 29). 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.
NormalModuleFactory::resolve_normal_module (cognitive 94) crates/rspack_core/src/normal_module_factory.rs:721— NormalModuleFactory::resolve_normal_module has cognitive complexity 94 (threshold 15). Drivers by points: if/else 40 (61 pts), boolean chains 14, match/switch 5 (13 pts), loops 6 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rspack_plugin_limit_chunk_count::optimize_chunks (cognitive 94) crates/rspack_plugin_limit_chunk_count/src/lib.rs:56— rspack_plugin_limit_chunk_count::optimize_chunks has cognitive complexity 94 (threshold 15). Drivers by points: if/else 18 (62 pts), loops 11 (31 pts), boolean chains 1 (nesting depth added 64). 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.
(anonymous) (cognitive 83) packages/rspack/src/runtime/moduleFederationDefaultRuntime.js:9— (anonymous) has cognitive complexity 83 (threshold 15). Drivers by points: if/else 15 (45 pts), ternaries 5 (16 pts), loops 6 (13 pts), other 5, boolean chains 4 (nesting depth added 48). Most of this is not in the body itself: 14 of the 83 points are its own statements and the rest belongs to 27 function items inside it that branch (a function literal at line 119, a function literal at line 68, merge, …). 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.
rspack_plugin_swc_js_minimizer::process_assets (cognitive 79) crates/rspack_plugin_swc_js_minimizer/src/lib.rs:223— rspack_plugin_swc_js_minimizer::process_assets has cognitive complexity 79 (threshold 15). Drivers by points: if/else 31 (61 pts), match/switch 5 (11 pts), boolean chains 5, loops 1 (2 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.
smartGrouping.smartGrouping::runGrouping (cognitive 76) packages/rspack/src/util/smartGrouping.ts:71— smartGrouping.smartGrouping::runGrouping has cognitive complexity 76 (threshold 15). Drivers by points: if/else 15 (48 pts), loops 8 (13 pts), boolean chains 10, ternaries 2 (5 pts) (nesting depth added 41). 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.
rspack_plugin_ensure_chunk_conditions::optimize_chunks (cognitive 74) crates/rspack_plugin_ensure_chunk_conditions/src/lib.rs:12— rspack_plugin_ensure_chunk_conditions::optimize_chunks has cognitive complexity 74 (threshold 15). Drivers by points: if/else 12 (52 pts), loops 10 (22 pts) (nesting depth added 52). 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.
InitializeEvaluating::evaluate_call_expression_member (cognitive 73) crates/rspack_plugin_javascript/src/parser_plugin/initialize_evaluating.rs:66— InitializeEvaluating::evaluate_call_expression_member has cognitive complexity 73 (threshold 15). Drivers by points: if/else 29 (49 pts), boolean chains 14, match/switch 2 (6 pts), 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.
moduleFederationDefaultRuntime.default (cognitive 67) packages/rspack/src/runtime/moduleFederationDefaultRuntime.js:9— moduleFederationDefaultRuntime.default has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (45 pts), loops 6 (13 pts), ternaries 1 (5 pts), boolean chains 4 (nesting depth added 41). Most of this is not in the body itself: 9 of the 67 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 119, merge, a function literal at line 226, …). 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.
EventProcessor::process (cognitive 62) crates/rspack_watcher/src/trigger.rs:227— EventProcessor::process has cognitive complexity 62 (threshold 15). Drivers by points: if/else 16 (41 pts), boolean chains 12, loops 4 (8 pts), match/switch 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
build.build (cognitive 59) crates/node_binding/scripts/build.mjs:37— build.build has cognitive complexity 59 (threshold 15). Drivers by points: if/else 29 (40 pts), ternaries 5 (12 pts), boolean chains 7 (nesting depth added 18). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 39, 168). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
rspack_plugin_merge_duplicate_chunks::optimize_chunks (cognitive 58) crates/rspack_plugin_merge_duplicate_chunks/src/lib.rs:15— rspack_plugin_merge_duplicate_chunks::optimize_chunks has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (45 pts), loops 4 (10 pts), boolean chains 3 (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.
ModuleGroup::update_candidate (cognitive 58) crates/rspack_plugin_split_chunks/src/module_group.rs:449— ModuleGroup::update_candidate has cognitive complexity 58 (threshold 15). Drivers by points: if/else 25 (51 pts), loops 2 (4 pts), boolean chains 2, match/switch 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.
CommonJsExportRequireDependency::get_star_reexports (cognitive 54) crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_export_require_dependency.rs:63— CommonJsExportRequireDependency::get_star_reexports has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (48 pts), loops 2 (4 pts), boolean chains 2 (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.
cleverMerge.parseObject (cognitive 52) packages/rspack/src/util/cleverMerge.ts:107— cleverMerge.parseObject has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (35 pts), loops 4 (17 pts) (nesting depth added 36). Of this number, 51 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
worker.loaderImpl (cognitive 52) packages/rspack/src/loader-runner/worker.ts:69— worker.loaderImpl has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (34 pts), boolean chains 11, loops 2 (4 pts), ternaries 2, match/switch 1 (nesting depth added 24). Of this number, 44 points are the body's own statements and 8 belong to 12 function items 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.
ChunkModules::next (cognitive 51) crates/rspack_plugin_rsc/src/utils.rs:77— ChunkModules::next has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (42 pts), match/switch 2 (8 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.
TypeExportsCollector::visit_program (cognitive 51) crates/swc_plugin_ts_collector/src/type_exports.rs:29— TypeExportsCollector::visit_program has cognitive complexity 51 (threshold 15). Drivers by points: if/else 8 (27 pts), match/switch 5 (18 pts), loops 2 (6 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.
Compilation.getLogger (cognitive 50) packages/rspack/src/Compilation.ts:889— Compilation.getLogger has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (48 pts), boolean chains 1, ternaries 1 (nesting depth added 27). Most of this is not in the body itself: 1 of the 50 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 898, 950, 946, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
rspack_plugin_remove_duplicate_modules::optimize_chunks (cognitive 49) crates/rspack_plugin_remove_duplicate_modules/src/lib.rs:135— rspack_plugin_remove_duplicate_modules::optimize_chunks has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 5 (12 pts), boolean chains 4 (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.
ConcatenationBindingResolver::resolve_inner (cognitive 47) crates/rspack_core/src/concatenation_backend.rs:202— ConcatenationBindingResolver::resolve_inner has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (34 pts), match/switch 6 (11 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.
StrategyHelper::validate (cognitive 47) crates/rspack_core/src/legacy_cache/persistent/snapshot/strategy/mod.rs:223— StrategyHelper::validate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 27 (46 pts), match/switch 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.
ImportParserPlugin::import_call (cognitive 47) crates/rspack_plugin_javascript/src/parser_plugin/import_parser_plugin.rs:386— ImportParserPlugin::import_call has cognitive complexity 47 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 10 (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.
GetChunkFilenameRuntimeModule::generate (cognitive 46) crates/rspack_plugin_runtime/src/runtime_module/get_chunk_filename.rs:214— GetChunkFilenameRuntimeModule::generate has cognitive complexity 46 (threshold 15). Drivers by points: match/switch 7 (23 pts), if/else 12 (22 pts), loops 1 (nesting depth added 26). 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.
MultiCompiler.#runGraph (cognitive 46) packages/rspack/src/MultiCompiler.ts:320— MultiCompiler.#runGraph has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (29 pts), loops 9 (12 pts), boolean chains 5 (nesting depth added 12). Most of this is not in the body itself: 9 of the 46 points are its own statements and the rest belongs to 8 function items inside it that branch (processQueueWorker, nodeDone, nodeInvalidFromParent, …). 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.
plugin.HtmlRspackPluginImpl (cognitive 44) packages/rspack/src/builtin-plugin/html-plugin/plugin.ts:37— plugin.HtmlRspackPluginImpl has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (24 pts), loops 5 (12 pts), ternaries 5 (7 pts), boolean chains 1 (nesting depth added 15). Of this number, 37 points are the body's own statements and 7 belong to 3 function items 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.
RscClientPlugin::traverse_modules (cognitive 43) crates/rspack_plugin_rsc/src/client_plugin.rs:469— RscClientPlugin::traverse_modules has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 5 (11 pts), match/switch 3 (4 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.
ExecuteTask::main_run (cognitive 42) crates/rspack_core/src/compilation/build_module_graph/module_executor/execute.rs:195— ExecuteTask::main_run has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 6 (9 pts), boolean chains 5, 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.
RscServerPlugin::create_client_entries (cognitive 40) crates/rspack_plugin_rsc/src/server_plugin.rs:326— RscServerPlugin::create_client_entries has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 9 (14 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.
HttpCache::fetch_content (cognitive 40) crates/rspack_plugin_schemes/src/http_uri/http_cache.rs:102— HttpCache::fetch_content has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 7, match/switch 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.
HtmlPluginAssets::create_assets (cognitive 39) crates/rspack_plugin_html/src/asset.rs:40— HtmlPluginAssets::create_assets has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 6, 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.
css_module_lexer::css_syntax::decode_css_keyword (cognitive 38) crates/css-module-lexer/src/css_syntax.rs:132— css_module_lexer::css_syntax::decode_css_keyword has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 22). 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.
rspack_plugin_copy::process_assets (cognitive 38) crates/rspack_plugin_copy/src/lib.rs:733— rspack_plugin_copy::process_assets has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (7 pts), boolean chains 3, match/switch 1 (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.
rspack_plugin_real_content_hash::inner_impl (cognitive 38) crates/rspack_plugin_real_content_hash/src/lib.rs:78— rspack_plugin_real_content_hash::inner_impl has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 7 (12 pts), boolean chains 3, 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.
ShareRuntimeModule::generate (cognitive 37) crates/rspack_plugin_mf/src/sharing/share_runtime_module.rs:74— ShareRuntimeModule::generate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 4 (10 pts), match/switch 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.
ServeCommand.apply (cognitive 37) packages/rspack-cli/src/commands/serve.ts:41— ServeCommand.apply has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7, ternaries 4, error handling 2, loops 1 (nesting depth added 10). None of this is in the body itself: all 37 points belong to 2 function literals inside it that branch (lines 58, 177). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WatcherDirectoriesAnalyzer::analyze (cognitive 36) crates/rspack_watcher/src/analyzer/directories.rs:35— WatcherDirectoriesAnalyzer::analyze has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 6, loops 4 (6 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.
ESMExportExpressionDependencyTemplate::render (cognitive 34) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_expression_dependency.rs:157— ESMExportExpressionDependencyTemplate::render has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 3, 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.
ConcatSourceChunks::stream (cognitive 34) crates/rspack_sources/src/concat_source.rs:267— ConcatSourceChunks::stream has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 5, 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.
rspack_plugin_rstest::import_dependency::module_namespace_promise_rstest (cognitive 33) crates/rspack_plugin_rstest/src/import_dependency.rs:184— rspack_plugin_rstest::import_dependency::module_namespace_promise_rstest has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (31 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.
Compiler.getInfrastructureLogger (cognitive 33) packages/rspack/src/Compiler.ts:458— Compiler.getInfrastructureLogger has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (33 pts) (nesting depth added 18). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 483, 467, 479, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
OriginalSourceChunks::stream (cognitive 32) crates/rspack_sources/src/original_source.rs:130— OriginalSourceChunks::stream has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4 (10 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.
Cutout::cutout_artifact (cognitive 31) crates/rspack_core/src/compilation/build_module_graph/graph_updater/cutout/mod.rs:28— Cutout::cutout_artifact has cognitive complexity 31 (threshold 15). Drivers by points: loops 9 (16 pts), if/else 6 (11 pts), boolean chains 2, match/switch 1 (2 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.
cleverMerge.mergeSingleValue (cognitive 31) packages/rspack/src/util/cleverMerge.ts:457— cleverMerge.mergeSingleValue has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 5 (15 pts), loops 2 (8 pts), if/else 2 (5 pts), match/switch 2 (3 pts) (nesting depth added 20). Of this number, 28 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
rspack_javascript_compiler::compiler::stringify::build_rspack_source_map (cognitive 30) crates/rspack_javascript_compiler/src/compiler/stringify.rs:166— rspack_javascript_compiler::compiler::stringify::build_rspack_source_map has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4, 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.
rspack_plugin_dll::lib_manifest_plugin::emit (cognitive 30) crates/rspack_plugin_dll/src/lib_manifest_plugin.rs:53— rspack_plugin_dll::lib_manifest_plugin::emit has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (7 pts), loops 3 (4 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.
ExternalsPlugin.#getRawExternalItem (cognitive 30) packages/rspack/src/builtin-plugin/ExternalsPlugin.ts:66— ExternalsPlugin.#getRawExternalItem has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 3 (10 pts), boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 4 of the 30 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 106, 117, 100, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
version.version_handler (cognitive 30) scripts/release/version.mjs:59— version.version_handler has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 5, 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.
CompilerOptionsBuilder::build (cognitive 29) crates/rspack/src/builder/mod.rs:936— CompilerOptionsBuilder::build has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23 (26 pts), boolean chains 2, 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.
FlagDependencyExportsState::apply (cognitive 29) crates/rspack_plugin_javascript/src/plugin/flag_dependency_exports_plugin.rs:35— FlagDependencyExportsState::apply has cognitive complexity 29 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 4 (10 pts), boolean chains 1 (nesting depth added 16). 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.
rspack_plugin_size_limits::after_emit (cognitive 29) crates/rspack_plugin_size_limits/src/lib.rs:134— rspack_plugin_size_limits::after_emit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (7 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.
ExportedEnumCollector::visit_program (cognitive 29) crates/swc_plugin_ts_collector/src/enums.rs:314— ExportedEnumCollector::visit_program has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (5 pts), match/switch 1 (2 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.
loadConfig.loadExtendedConfig (cognitive 29) packages/rspack-cli/src/utils/loadConfig.ts:112— loadConfig.loadExtendedConfig has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 2 (6 pts), boolean chains 4, loops 1, ternaries 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.
JavaScriptTransformer::input_source_map (cognitive 28) crates/rspack_javascript_compiler/src/compiler/transform.rs:529— JavaScriptTransformer::input_source_map has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 8 (12 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.
rspack_plugin_json::create_object_for_exports_info (cognitive 28) crates/rspack_plugin_json/src/lib.rs:282— rspack_plugin_json::create_object_for_exports_info has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (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.
ModuleChunkLoadingRuntimeModule::generate (cognitive 28) crates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs:267— ModuleChunkLoadingRuntimeModule::generate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 6 (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.
SwcLoader::loader_impl (cognitive 27) crates/rspack_loader_swc/src/lib.rs:58— SwcLoader::loader_impl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 2, match/switch 1 (2 pts), loops 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.
rspack_plugin_module_info_header::print_exports_info_to_source (cognitive 27) crates/rspack_plugin_module_info_header/src/lib.rs:30— rspack_plugin_module_info_header::print_exports_info_to_source has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 3 (8 pts), boolean chains 2, 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.
MultiCompiler.validateDependencies (cognitive 27) packages/rspack/src/MultiCompiler.ts:246— MultiCompiler.validateDependencies has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 13). Of this number, 23 points are the body's own statements and 4 belong to 2 function items inside it that branch. 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.
NativeWatchFileSystem.watch (cognitive 27) packages/rspack/src/NativeWatchFileSystem.ts:156— NativeWatchFileSystem.watch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12, loops 4 (8 pts), boolean chains 7 (nesting depth added 4). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 220, info, a function literal at line 262, …). 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.
compilation.createCompilationHooksRegisters (cognitive 27) packages/rspack/src/taps/compilation.ts:29— compilation.createCompilationHooksRegisters has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 6, boolean chains 3, ternaries 2, error handling 1 (nesting depth added 2). None of this is in the body itself: all 27 points belong to 8 function literals inside it that branch (lines 406, 214, 138, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
rspack_dojang::eval::get_tokens_belong_to_accessor (cognitive 26) crates/rspack_dojang/src/eval.rs:211— rspack_dojang::eval::get_tokens_belong_to_accessor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 3 (10 pts), loops 2 (3 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.
ConsumeSharedPlugin::get_required_version (cognitive 26) crates/rspack_plugin_mf/src/sharing/consume_shared_plugin.rs:210— ConsumeSharedPlugin::get_required_version has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4 (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.
StdoutTracer::sync_trace (cognitive 26) crates/rspack_tracing/src/stdout.rs:107— StdoutTracer::sync_trace has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (8 pts), match/switch 1 (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.
fs.rmrf (cognitive 26) packages/rspack/src/util/fs.ts:590— fs.rmrf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 603, 595, 616). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
MultiStats.toJson (cognitive 26) packages/rspack/src/MultiStats.ts:75— MultiStats.toJson has cognitive complexity 26 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 6, boolean chains 5, ternaries 1 (nesting depth added 8). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
OutputOptionsBuilder::build (cognitive 25) crates/rspack/src/builder/mod.rs:2697— OutputOptionsBuilder::build has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4, loops 3, match/switch 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.
CollectSharedEntryPlugin::infer_version (cognitive 25) crates/rspack_plugin_mf/src/sharing/collect_shared_entry_plugin.rs:48— CollectSharedEntryPlugin::infer_version has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 13). 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.
FullMappingsEncoder::encode (cognitive 25) crates/rspack_sources/src/encoder.rs:103— FullMappingsEncoder::encode has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (23 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.
Parser::parse_tag (cognitive 24) crates/rspack_dojang/src/expr.rs:189— Parser::parse_tag has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 6 (9 pts), boolean chains 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.
rspack_napi::utils::unknown_to_json_value (cognitive 24) crates/rspack_napi/src/utils.rs:28— rspack_napi::utils::unknown_to_json_value has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), match/switch 2 (3 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.
ScopeInfoDB::set_symbol (cognitive 24) crates/rspack_plugin_javascript/src/visitors/scope_info/semantic.rs:261— ScopeInfoDB::set_symbol has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (5 pts), boolean chains 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.
cleverMerge.mergeEntries (cognitive 24) packages/rspack/src/util/cleverMerge.ts:327— cleverMerge.mergeEntries has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 11). 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.
NodeOptionBuilder::build (cognitive 23) crates/rspack/src/builder/mod.rs:1625— NodeOptionBuilder::build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 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.
ConsumeSharedRuntimeModule::generate (cognitive 23) crates/rspack_plugin_mf/src/sharing/consume_shared_runtime_module.rs:103— ConsumeSharedRuntimeModule::generate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 4 (6 pts) (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.
ProgressPlugin::default_handler (cognitive 23) crates/rspack_plugin_progress/src/lib.rs:202— ProgressPlugin::default_handler has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (6 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.
AssetData::compute_new_source (cognitive 23) crates/rspack_plugin_real_content_hash/src/lib.rs:412— AssetData::compute_new_source has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, 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.
RscEntryModule::build (cognitive 23) crates/rspack_plugin_rsc/src/rsc_entry_module.rs:238— RscEntryModule::build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (8 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.
SubresourceIntegrityPlugin.apply (cognitive 23) packages/rspack/src/builtin-plugin/SubresourceIntegrityPlugin.ts:254— SubresourceIntegrityPlugin.apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 265, bindingHtmlHooks, a function literal at line 293). 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.
TokenStream::fast_forward_selector_if_buffer_empty (cognitive 22) crates/css-module-lexer/src/lexer.rs:2536— TokenStream::fast_forward_selector_if_buffer_empty has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, 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.
FileCacheStrategy::after_all_stored_impl (cognitive 22) crates/rspack_core/src/new_cache/file_cache_strategy.rs:318— FileCacheStrategy::after_all_stored_impl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), 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.
CommonJsExportsDependencyTemplate::render (cognitive 22) crates/rspack_plugin_javascript/src/dependency/commonjs/common_js_exports_dependency.rs:168— CommonJsExportsDependencyTemplate::render has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (22 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.
NodeStuffPlugin::identifier (cognitive 22) crates/rspack_plugin_javascript/src/parser_plugin/node_stuff_plugin.rs:134— NodeStuffPlugin::identifier has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 2 (4 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.
ResolveOptions::fmt (cognitive 22) crates/rspack_resolver/src/options.rs:532— ResolveOptions::fmt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22. 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.
loadLoader.loadLoader (cognitive 22) packages/rspack/src/loader-runner/loadLoader.ts:33— loadLoader.loadLoader has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 3 (6 pts), boolean chains 1 (nesting depth added 10). 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.
utils.runSyncOrAsync (cognitive 22) packages/rspack/src/loader-runner/utils.ts:49— utils.runSyncOrAsync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, error handling 2 (nesting depth added 8). Of this number, 18 points are the body's own statements and 4 belong to 2 function items 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.
cleverMerge.serializeObject (cognitive 22) packages/rspack/src/util/cleverMerge.ts:177— cleverMerge.serializeObject has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 10). 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.
RstestPlugin::resolve_mock_request (cognitive 21) crates/rspack_plugin_rstest/src/plugin.rs:273— RstestPlugin::resolve_mock_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, 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.
MappingsDecoder::next (cognitive 21) crates/rspack_sources/src/decoder.rs:63— MappingsDecoder::next has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (4 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.
RspackCLI.buildConfig::internalBuildConfig (cognitive 21) packages/rspack-cli/src/cli.ts:212— RspackCLI.buildConfig::internalBuildConfig has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 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.
loader.pitch::handleExports (cognitive 21) packages/rspack/src/builtin-plugin/css-extract/loader.ts:163— loader.pitch::handleExports has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (2 pts), ternaries 2, error handling 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.
Compilation::par_rename_assets (cognitive 20) crates/rspack_core/src/compilation/mod.rs:944— Compilation::par_rename_assets has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 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.
ConcatenationContext::prepare (cognitive 20) crates/rspack_core/src/concatenation_backend.rs:995— ConcatenationContext::prepare has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (9 pts), match/switch 1 (nesting depth added 11). 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.
ContextModuleFactory::resolve (cognitive 20) crates/rspack_core/src/context_module_factory.rs:221— ContextModuleFactory::resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 4 (6 pts), loops 2 (4 pts), boolean chains 2 (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.
ExternalsPlugin::handle_external (cognitive 20) crates/rspack_plugin_externals/src/plugin.rs:44— ExternalsPlugin::handle_external has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, match/switch 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
RequireEnsureDependenciesBlockParserPlugin::call (cognitive 20) crates/rspack_plugin_javascript/src/parser_plugin/require_ensure_dependencies_block_parse_plugin.rs:72— RequireEnsureDependenciesBlockParserPlugin::call has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (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.
URLPlugin::new_expression (cognitive 20) crates/rspack_plugin_javascript/src/parser_plugin/url_plugin.rs:106— URLPlugin::new_expression has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, 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.
SideEffectsFlagPlugin::get_owning_side_effects (cognitive 20) crates/rspack_plugin_javascript/src/plugin/side_effects_flag_plugin.rs:122— SideEffectsFlagPlugin::get_owning_side_effects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (2 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.
BasicEvaluatedExpression::as_string (cognitive 20) crates/rspack_plugin_javascript/src/utils/eval/mod.rs:303— BasicEvaluatedExpression::as_string has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 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.
rspack_plugin_module_replacement::context_replacement::cmf_after_resolve (cognitive 20) crates/rspack_plugin_module_replacement/src/context_replacement.rs:73— rspack_plugin_module_replacement::context_replacement::cmf_after_resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 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.
CachedPathImpl::package_json (cognitive 20) crates/rspack_resolver/src/cache.rs:373— CachedPathImpl::package_json has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 4 (6 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.
rspack.rspack (cognitive 20) packages/rspack/src/rspack.ts:112— rspack.rspack has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (2 pts) (nesting depth added 5). Of this number, 17 points are the body's own statements and 3 belong to 2 function items inside it that branch. 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.
Modules::visit_item_mod (cognitive 19) crates/rspack_allocative_driver/src/source_tree.rs:128— Modules::visit_item_mod has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 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.
RuntimeRequirementsDependencyTemplate::render (cognitive 19) crates/rspack_core/src/dependency/runtime_requirements_dependency.rs:211— RuntimeRequirementsDependencyTemplate::render has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (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.
CacheContext::load_snapshot (cognitive 19) crates/rspack_core/src/legacy_cache/persistent/context.rs:195— CacheContext::load_snapshot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 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.
DirectiveVisitor::visit_stmt (cognitive 19) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:2340— DirectiveVisitor::visit_stmt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 6). 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.
WalkData::setup_record (cognitive 19) crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/walk_data.rs:237— WalkData::setup_record has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 4 (5 pts) (nesting depth added 1). None of this is in the body itself: all 19 points belong to 5 function items inside it that branch (apply_define, walk_code, apply_define_key, …). 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.
JsonpChunkLoadingRuntimeModule::generate (cognitive 19) crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:277— JsonpChunkLoadingRuntimeModule::generate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 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.
Algo::try_compile_to_end_with_fast_path (cognitive 19) crates/rspack_regex/src/algo.rs:131— Algo::try_compile_to_end_with_fast_path has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 pts), match/switch 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.
Bucket::need_update_packs (cognitive 19) crates/rspack_storage/src/filesystem/db/bucket/mod.rs:173— Bucket::need_update_packs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 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.
build.runBuild (cognitive 19) packages/rspack-cli/src/commands/build.ts:23— build.runBuild has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 3). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (errorHandler, errorHandler::getStatsOptions, a function literal at line 59, …). 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.
index.getSwcLoaderOptions (cognitive 19) packages/rspack/src/builtin-loader/swc/index.ts:40— index.getSwcLoaderOptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 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.
findBaseCommit (cognitive 19) .github/actions/binary-limit/binary-limit-script.mjs:104— findBaseCommit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), 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.
BlockItemCandidates::observe (cognitive 18) crates/css-module-lexer/src/parser.rs:217— BlockItemCandidates::observe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, match/switch 2 (3 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.
ExportsInfoData::set_unknown_exports_provided (cognitive 18) crates/rspack_core/src/exports/exports_info_setter.rs:43— ExportsInfoData::set_unknown_exports_provided has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, 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.
RspackLoaderRunnerPlugin::process_resource (cognitive 18) crates/rspack_core/src/loader/rspack_loader.rs:37— RspackLoaderRunnerPlugin::process_resource has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 4 (8 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.
ModuleGraph::revoke_dependency (cognitive 18) crates/rspack_core/src/module_graph/mod.rs:285— ModuleGraph::revoke_dependency has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 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.
LightningCssLoader::loader_impl (cognitive 18) crates/rspack_loader_lightningcss/src/lib.rs:60— LightningCssLoader::loader_impl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 1 (2 pts), boolean chains 1, 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.
rspack_plugin_dynamic_entry::make (cognitive 18) crates/rspack_plugin_dynamic_entry/src/lib.rs:56— rspack_plugin_dynamic_entry::make has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 9). 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.
rspack_plugin_externals::plugin::factorize (cognitive 18) crates/rspack_plugin_externals/src/plugin.rs:188— rspack_plugin_externals::plugin::factorize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), 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.
RequireContextDependencyParserPlugin::call (cognitive 18) crates/rspack_plugin_javascript/src/parser_plugin/require_context_dependency_parser_plugin.rs:23— RequireContextDependencyParserPlugin::call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (18 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, 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.
Combinator::prepare_direct_groups (cognitive 18) crates/rspack_plugin_split_chunks/src/plugin/module_group.rs:433— Combinator::prepare_direct_groups has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (6 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.
fs.mkdirp (cognitive 18) packages/rspack/src/util/fs.ts:664— fs.mkdirp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (18 pts) (nesting depth added 11). None of this is in the body itself: all 18 points belong to 3 function literals inside it that branch (lines 669, 682, 677). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
OptimizationOptionsBuilder::build (cognitive 17) crates/rspack/src/builder/mod.rs:3489— OptimizationOptionsBuilder::build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 2, 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.
FileSystemDependencies::values (cognitive 17) crates/rspack_binding_api/src/compilation/dependencies.rs:204— FileSystemDependencies::values has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 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.
RawSplitChunksOptions::normalize (cognitive 17) crates/rspack_binding_api/src/raw_options/raw_split_chunks/mod.rs:123— RawSplitChunksOptions::normalize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, match/switch 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.
rspack_binding_api::logging::run_dispatcher (cognitive 17) crates/rspack_binding_api/src/logging.rs:180— rspack_binding_api::logging::run_dispatcher has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (5 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.
ModuleTracker::finish_module (cognitive 17) crates/rspack_core/src/compilation/build_module_graph/module_executor/module_tracker.rs:60— ModuleTracker::finish_module has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 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.
OverlayIter::next (cognitive 17) crates/rspack_core/src/module_graph/rollback/overlay_map.rs:51— OverlayIter::next has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (5 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.
NativeFileSystem::read_dir_sync (cognitive 17) crates/rspack_fs/src/native_fs.rs:239— NativeFileSystem::read_dir_sync 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.
ReplaceSource::rope (cognitive 17) crates/rspack_sources/src/replace_source.rs:332— ReplaceSource::rope has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 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.
Scanner::scan (cognitive 17) crates/rspack_watcher/src/scanner.rs:32— Scanner::scan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 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.
ContainerReferencePlugin.raw (cognitive 17) packages/rspack/src/container/ContainerReferencePlugin.ts:75— ContainerReferencePlugin.raw has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 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.
check (cognitive 17) packages/rspack/hot/dev-server.js:15— check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (5 pts), error handling 1 (nesting depth added 7). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 18, 47). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
DeclarationCandidate::advance (cognitive 16) crates/css-module-lexer/src/parser.rs:94— DeclarationCandidate::advance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, 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.
RuleSetLogicalConditions::try_match_sync (cognitive 16) crates/rspack_core/src/options/module.rs:1517— RuleSetLogicalConditions::try_match_sync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), match/switch 3 (5 pts), loops 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.
Context::get_value (cognitive 16) crates/rspack_dojang/src/context.rs:53— Context::get_value has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 3 (4 pts), 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.
RealDependencyLocation::from_byte_location (cognitive 16) crates/rspack_location/src/lib.rs:44— RealDependencyLocation::from_byte_location has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 1 (2 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.
rspack_plugin_circular_dependencies::circular_dependency_rspack_plugin::optimize_modules (cognitive 16) crates/rspack_plugin_circular_dependencies/src/circular_dependency_rspack_plugin.rs:365— rspack_plugin_circular_dependencies::circular_dependency_rspack_plugin::optimize_modules has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 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.
AMDRequireDependenciesBlockParserPlugin::process_array (cognitive 16) crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs:60— AMDRequireDependenciesBlockParserPlugin::process_array has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 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.
Group::pop_nodes (cognitive 16) crates/rspack_plugin_split_chunks/src/plugin/max_size.rs:56— Group::pop_nodes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (nesting depth added 7). 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.
MapData::visit (cognitive 16) crates/rspack_sources/src/mapping_source.rs:412— MapData::visit 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.
Watching.#go (cognitive 16) packages/rspack/src/Watching.ts:284— Watching.#go has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 343, run, a function literal at line 332, …). 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.
Compiler.run (cognitive 16) packages/rspack/src/Compiler.ts:560— Compiler.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 8 function items inside it that branch (finalCallback, onCompiled, a function literal at line 605, …). 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.
ModuleFederationPlugin.getRemoteInfos (cognitive 16) packages/rspack/src/container/ModuleFederationPlugin.ts:175— ModuleFederationPlugin.getRemoteInfos has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (nesting depth added 3). Of this number, 9 points are the body's own statements and 7 belong to 5 function items inside it that branch. 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.
CssExtractRspackPlugin.normalizeOptions (cognitive 16) packages/rspack/src/builtin-plugin/css-extract/index.ts:78— CssExtractRspackPlugin.normalizeOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (5 pts), boolean chains 3 (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.
SubresourceIntegrityPlugin.processTag (cognitive 16) packages/rspack/src/builtin-plugin/SubresourceIntegrityPlugin.ts:183— SubresourceIntegrityPlugin.processTag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 1 (2 pts), error handling 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.
Near-duplicate member pair (80 shared lines) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:381— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:381-539 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:546-682 — These two members are variants of one another: 80 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 (68 shared lines) crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:251— crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:251-389 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:262-391 — These two members are variants of one another: 68 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 (62 shared lines) crates/css-module-lexer/src/dependencies.rs:2828— crates/css-module-lexer/src/dependencies.rs:2828-2940 | crates/css-module-lexer/src/dependencies.rs:3027-3151 — These two members are variants of one another: 62 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 (38 shared lines) crates/rspack_core/src/stats/mod.rs:948— crates/rspack_core/src/stats/mod.rs:948-1029 | crates/rspack_core/src/stats/mod.rs:1031-1114 — These two members are variants of one another: 38 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· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:150— crates/rspack_plugin_runtime/src/runtime_module/import_scripts_chunk_loading.rs:150-184 | crates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rs:183-230 | crates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs:182-224 | crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:177-213 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:184-220 — 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.
Duplicated block (47 lines × 2) crates/rspack_plugin_library/src/assign_library_plugin.rs:450— crates/rspack_plugin_library/src/assign_library_plugin.rs:450-496 | crates/rspack_plugin_library/src/export_property_library_plugin.rs:121-167 — 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 (37–38 lines × 2) crates/rspack_core/src/context_module.rs:1115— crates/rspack_core/src/context_module.rs:1115-1152 | crates/rspack_core/src/context_module.rs:1226-1262 — both copies are in the same file, so extract the 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 (31 lines × 2) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:593— crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:593-623 | crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:638-668 — both copies are in the same file, so extract the 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 (28 lines × 2) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:512— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:512-539 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:655-682 — both copies are in the same file, so extract the 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 (27 lines × 2) crates/rspack_plugin_javascript/src/runtime_context.rs:379— crates/rspack_plugin_javascript/src/runtime_context.rs:379-405 | crates/rspack_plugin_javascript/src/runtime_context.rs:471-497 — both copies are in the same file, so extract the 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 (26 lines × 3) crates/rspack_plugin_javascript/src/dependency/esm/import_dependency.rs:122— crates/rspack_plugin_javascript/src/dependency/esm/import_dependency.rs:122-147 | crates/rspack_plugin_javascript/src/dependency/esm/import_eager_dependency.rs:102-127 | crates/rspack_plugin_javascript/src/dependency/esm/import_weak_dependency.rs:107-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 all 3 call sites, so a change lands once.
Duplicated block (26 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:298— crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:298-323 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:309-334 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
Duplicated block (25 lines × 2) crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:466— crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:466-490 | crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs:540-564 — both copies are in the same file, so extract the 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–24 lines × 2) crates/rspack_core/src/compiler/mod.rs:251— crates/rspack_core/src/compiler/mod.rs:251-271 | crates/rspack_core/src/compiler/rebuild.rs:27-50 — 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 (23–24 lines × 2) crates/rspack_core/src/context_module.rs:1029— crates/rspack_core/src/context_module.rs:1029-1052 | crates/rspack_core/src/context_module.rs:1216-1238 — both copies are in the same file, so extract the 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–23 lines × 2) crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:903— crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:903-923 | crates/rspack_loader_swc/src/rsc_transforms/server_actions.rs:1053-1075 — both copies are in the same file, so extract the 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/rspack_plugin_runtime/src/runtime_module/auto_public_path.rs:50— crates/rspack_plugin_runtime/src/runtime_module/auto_public_path.rs:50-72 | crates/rspack_plugin_runtime/src/runtime_module/utils.rs:114-136 — 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 (21–22 lines × 2) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:696— crates/rspack_plugin_esm_library/src/optimize_chunks.rs:696-716 | crates/rspack_plugin_esm_library/src/optimize_chunks.rs:759-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.
Duplicated block (20–21 lines × 2) crates/rspack_plugin_split_chunks/src/plugin/chunk.rs:144— crates/rspack_plugin_split_chunks/src/plugin/chunk.rs:144-163 | crates/rspack_plugin_split_chunks/src/plugin/chunk.rs:174-194 — both copies are in the same file, so extract the 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–21 lines × 2) crates/rspack_tracing_perfetto/src/lib.rs:214— crates/rspack_tracing_perfetto/src/lib.rs:214-234 | crates/rspack_tracing_perfetto/src/lib.rs:317-335 — both copies are in the same file, so extract the 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–20 lines × 2) crates/rspack_core/src/context_module.rs:1084— crates/rspack_core/src/context_module.rs:1084-1103 | crates/rspack_core/src/context_module.rs:1207-1224 — both copies are in the same file, so extract the 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–20 lines × 2) crates/rspack_core/src/runtime_template.rs:1734— crates/rspack_core/src/runtime_template.rs:1734-1753 | crates/rspack_plugin_rstest/src/import_dependency.rs:301-317 — 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 (19–20 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:352— crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs:352-370 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:353-372 — before extracting anything, compare `crates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs` and `crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.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.
Duplicated block (19 lines × 3) crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:515— crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:515-533 | crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:557-575 | crates/rspack_plugin_javascript/src/parser_plugin/worker_plugin.rs:624-642 — 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 (17 lines × 3) crates/rspack_core/src/runtime_template.rs:1737— crates/rspack_core/src/runtime_template.rs:1737-1753 | crates/rspack_plugin_esm_library/src/dependency/dyn_import.rs:55-71 | crates/rspack_plugin_rstest/src/import_dependency.rs:301-317 — 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 (13–15 lines × 2) crates/rspack_plugin_javascript/src/magic_comment.rs:507— crates/rspack_plugin_javascript/src/magic_comment.rs:507-519 | crates/rspack_plugin_javascript/src/magic_comment.rs:530-544 — both copies are in the same file, so extract the 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 (13–14 lines × 3) crates/rspack_plugin_esm_library/src/optimize_chunks.rs:646— crates/rspack_plugin_esm_library/src/optimize_chunks.rs:646-659 | crates/rspack_plugin_esm_library/src/optimize_chunks.rs:701-713 | crates/rspack_plugin_esm_library/src/optimize_chunks.rs:765-777 — 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 (13 lines × 3) crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:232— crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:232-244 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:332-344 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:480-492 — 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 × 4) crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:230— crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:230-241 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:330-341 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:406-417 | crates/rspack_plugin_javascript/src/parser_plugin/esm_import_dependency_parser_plugin.rs:478-489 — 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 (12 lines × 3) crates/rspack_sources/src/helpers.rs:660— crates/rspack_sources/src/helpers.rs:660-671 | crates/rspack_sources/src/helpers.rs:803-814 | crates/rspack_sources/src/helpers.rs:847-858 — 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–12 lines × 3) crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1295— crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1295-1306 | crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1309-1320 | crates/rspack_plugin_javascript/src/dependency/esm/esm_export_imported_specifier_dependency.rs:1321-1326 — 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–11 lines × 2) crates/css-module-lexer/src/dependencies.rs:1287— crates/css-module-lexer/src/dependencies.rs:1287-1297 | crates/css-module-lexer/src/dependencies.rs:1345-1353 — both copies are in the same file, so extract the 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–11 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:208— crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs:208-218 | crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs:140-149 — before extracting anything, compare `crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_define_dependency_parser_plugin.rs` and `crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_require_dependencies_block_parser_plugin.rs` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (8–10 lines × 2) crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:116— crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs:116-123 | crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs:169-178 — before extracting anything, compare `crates/rspack_plugin_devtool/src/eval_dev_tool_module_plugin.rs` and `crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (7–10 lines × 2) crates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs:307— crates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs:307-316 | crates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs:279-285 — 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–9 lines × 2) crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:434— crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:434-440 | crates/rspack_plugin_javascript/src/parser_plugin/inner_graph/plugin.rs:470-478 — both copies are in the same file, so extract the 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–8 lines × 2) crates/rspack_plugin_asset/src/lib.rs:366— crates/rspack_plugin_asset/src/lib.rs:366-372 | crates/rspack_plugin_rslib/src/asset.rs:23-30 — 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 (7 lines × 11) crates/rspack/src/builder/browserslist_target.rs:112— crates/rspack/src/builder/browserslist_target.rs:112-118 | crates/rspack/src/builder/browserslist_target.rs:133-139 | crates/rspack/src/builder/browserslist_target.rs:153-159 | crates/rspack/src/builder/browserslist_target.rs:174-180 | crates/rspack/src/builder/browserslist_target.rs:192-198 | crates/rspack/src/builder/browserslist_target.rs:210-216 | crates/rspack/src/builder/browserslist_target.rs:231-237 | crates/rspack/src/builder/browserslist_target.rs:254-260 | crates/rspack/src/builder/browserslist_target.rs:272-278 | crates/rspack/src/builder/browserslist_target.rs:290-296 | crates/rspack/src/builder/browserslist_target.rs:311-317 — 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.
Duplicated block (6–7 lines × 3) crates/rspack/src/builder/browserslist_target.rs:184— crates/rspack/src/builder/browserslist_target.rs:184-190 | crates/rspack/src/builder/browserslist_target.rs:202-208 | crates/rspack/src/builder/browserslist_target.rs:217-222 — 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–7 lines × 2) crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:966— crates/rspack_core/src/compilation/build_chunk_graph/code_splitter.rs:966-971 | crates/rspack_plugin_split_chunks/src/plugin/chunk.rs:138-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.
Duplicated block (42 lines × 2) crates/rspack_core/src/artifacts/cgc_runtime_requirements_artifact.rs:17— crates/rspack_core/src/artifacts/cgc_runtime_requirements_artifact.rs:17-58 | crates/rspack_core/src/artifacts/chunk_render_artifact.rs:17-58 — 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 (38 lines × 2) crates/rspack_core/src/artifacts/dependencies_diagnostics_artifact.rs:16— crates/rspack_core/src/artifacts/dependencies_diagnostics_artifact.rs:16-63 | crates/rspack_core/src/artifacts/module_ids_artifact.rs:17-54 — 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 × 6) crates/rspack_core/src/context_module.rs:1613— crates/rspack_core/src/context_module.rs:1613-1617 | crates/rspack_plugin_mf/src/container/container_entry_module.rs:451-455 | crates/rspack_plugin_mf/src/container/fallback_module.rs:192-196 | crates/rspack_plugin_mf/src/container/remote_module.rs:221-225 | crates/rspack_plugin_mf/src/sharing/provide_shared_module.rs:231-235 | crates/rspack_plugin_rsc/src/rsc_entry_module.rs:393-397 — 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.
Duplicated block (9 lines × 5) crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:55— crates/rspack_plugin_css/src/plugin/impl_plugin_for_css_plugin.rs:55-63 | crates/rspack_plugin_html/src/plugin.rs:47-55 | crates/rspack_plugin_real_content_hash/src/lib.rs:40-48 | crates/rspack_plugin_rsdoctor/src/plugin.rs:223-231 | crates/rspack_plugin_runtime/src/runtime_plugin.rs:91-99 — 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.
Duplicated block (8 lines × 5) crates/rspack_plugin_library/src/amd_library_plugin.rs:218— crates/rspack_plugin_library/src/amd_library_plugin.rs:218-225 | crates/rspack_plugin_library/src/jsonp_library_plugin.rs:149-156 | crates/rspack_plugin_library/src/system_library_plugin.rs:222-229 | crates/rspack_plugin_library/src/umd_library_plugin.rs:362-369 | crates/rspack_plugin_runtime/src/array_push_callback_chunk_format.rs:219-226 — before extracting anything, compare `crates/rspack_plugin_library/src/amd_library_plugin.rs` and `crates/rspack_plugin_library/src/jsonp_library_plugin.rs` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (11 lines × 5) crates/rspack_plugin_runtime/src/bundler_info.rs:96— crates/rspack_plugin_runtime/src/bundler_info.rs:96-106 | crates/rspack_plugin_runtime/src/common_js_chunk_loading.rs:178-188 | crates/rspack_plugin_runtime/src/import_scripts_chunk_loading.rs:116-126 | crates/rspack_plugin_runtime/src/jsonp_chunk_loading.rs:116-126 | crates/rspack_plugin_runtime/src/module_chunk_loading.rs:162-172 — 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.
Duplicated block (6 lines × 5) crates/rspack_binding_api/src/async_dependency_block.rs:132— crates/rspack_binding_api/src/async_dependency_block.rs:132-137 | crates/rspack_binding_api/src/chunk.rs:349-354 | crates/rspack_binding_api/src/chunk_group.rs:211-216 | crates/rspack_binding_api/src/dependency.rs:201-206 | crates/rspack_binding_api/src/module_graph_connection.rs:212-217 — 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.
Duplicated block (9 lines × 4) crates/rspack_ids/src/compact_hashed_module_ids_plugin.rs:53— crates/rspack_ids/src/compact_hashed_module_ids_plugin.rs:53-61 | crates/rspack_ids/src/deterministic_module_ids_plugin.rs:72-80 | crates/rspack_ids/src/hashed_module_ids_plugin.rs:63-71 | crates/rspack_ids/src/natural_module_ids_plugin.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 all 4 call sites, so a change lands once.
Duplication concentrated across 9 sibling directories (5 clone groups) packages/rspack/src/browser/service.ts:1— 5 duplicated blocks under packages/rspack/src/ have copies in at least two of the sibling directories browser, builtin-plugin, config, loader-runner, logging, stats (+3 more sibling(s) not listed) — 3 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (65 matched lines × 2 locations) · ×1
Duplicated block with local edits (65 matched lines × 2 locations) packages/rspack/src/stats/StatsFactory.ts:209— packages/rspack/src/stats/StatsFactory.ts:209 · packages/rspack/src/stats/StatsPrinter.ts:152 — the two spans are one implementation copied and then locally edited — 361 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.
Duplicated block (52 lines × 2 locations) packages/rspack/src/Compilation.ts:944— packages/rspack/src/Compilation.ts:944 · packages/rspack/src/Compiler.ts:477 — the 2 copies are spread across 2 files, 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.
Duplicated block (51 lines × 2 locations) packages/rspack/src/loader-runner/index.ts:459— packages/rspack/src/loader-runner/index.ts:459 · packages/rspack/src/loader-runner/worker.ts:399 — the 2 copies are spread across 2 files, 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.
Duplicated block (38 lines × 2 locations) packages/rspack/src/util/fs.ts:383— packages/rspack/src/util/fs.ts:383 · packages/rspack/src/util/fs.ts:424 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication· Duplicated block with local edits (33 matched lines × 2 locations) · ×1
Duplicated block with local edits (33 matched lines × 2 locations) packages/rspack/hot/lazy-compilation-node.js:35— packages/rspack/hot/lazy-compilation-node.js:35 · packages/rspack/hot/lazy-compilation-web.js:32 — the two spans are one implementation copied and then locally edited — 166 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.
Duplicated block (33 lines × 2 locations) packages/rspack/src/Module.ts:41— packages/rspack/src/Module.ts:41 · packages/rspack/src/Module.ts:110 — 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.
Duplicated block (31 lines × 2 locations) packages/rspack/src/ExternalModule.ts:12— packages/rspack/src/ExternalModule.ts:12 · packages/rspack/src/NormalModule.ts:13 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (28 lines × 2 locations) packages/rspack/src/Stats.ts:86— packages/rspack/src/Stats.ts:86 · packages/rspack/src/Stats.ts:133 — 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.
Duplicated block (25 lines × 2 locations) packages/create-rspack/template-react-js/src/App.jsx:5— packages/create-rspack/template-react-js/src/App.jsx:5 · packages/create-rspack/template-react-ts/src/App.tsx: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.
Duplicated block (24 lines × 2 locations) packages/rspack/src/config/defaults.ts:947— packages/rspack/src/config/defaults.ts:947 · packages/rspack/src/config/defaults.ts:974 — 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 with local edits (21 matched lines × 2 locations) · ×1
Duplicated block with local edits (21 matched lines × 2 locations) packages/rspack/src/logging/createConsoleLogger.ts:41— packages/rspack/src/logging/createConsoleLogger.ts:41 · packages/rspack/src/stats/DefaultStatsPresetPlugin.ts:259 — the two spans are one implementation copied and then locally edited — 95 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 with local edits (20 matched lines × 2 locations) · ×1
Duplicated block with local edits (20 matched lines × 2 locations) packages/rspack/src/Compiler.ts:587— packages/rspack/src/Compiler.ts:587 · packages/rspack/src/Watching.ts:341 — the two spans are one implementation copied and then locally edited — 117 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.
Duplicated block (20 lines × 2 locations) packages/rspack/src/taps/normalModuleFactory.ts:13— packages/rspack/src/taps/normalModuleFactory.ts:13 · packages/rspack/src/taps/normalModuleFactory.ts:73 — both copies are in the same file, so extract the 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 locations) packages/rspack/src/config/target.ts:258— packages/rspack/src/config/target.ts:258 · packages/rspack/src/config/target.ts:333 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication· Duplicated block with local edits (17 matched lines × 2 locations) · ×1
Duplicated block with local edits (17 matched lines × 2 locations) packages/rspack/src/sharing/IndependentSharedPlugin.ts:170— packages/rspack/src/sharing/IndependentSharedPlugin.ts:170 · packages/rspack/src/sharing/SharePlugin.ts:73 — the two spans are one implementation copied and then locally edited — 66 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.
Complex function getGraphemeBreakProperty (cyclomatic 2120, cognitive 1507) tests/rspack-test/normalCases/parsing/evaluate-binary/deep.js:267— getGraphemeBreakProperty has cyclomatic complexity 2120 and cognitive complexity 1507; 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 process (cyclomatic 90, cognitive 101) · ×1
Complex function process (cyclomatic 90, cognitive 101) packages/rspack/src/rspackOptionsApply.ts:88— process has cyclomatic complexity 90 and cognitive complexity 101; 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.
Complex function _createToolbarTable (cyclomatic 82, cognitive 142) tests/rspack-test/configCases/inner-graph/issue-11678/module.js:436— _createToolbarTable has cyclomatic complexity 82 and cognitive complexity 142; 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.
Complex function (anonymous) (cyclomatic 51, cognitive 69) packages/rspack/src/logging/createConsoleLogger.ts:85— (anonymous) has cyclomatic complexity 51 and cognitive complexity 69; 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.
Complex function _ (cyclomatic 45, cognitive 104) packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:673— _ has cyclomatic complexity 45 and cognitive complexity 104; 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.
Complex function shouldBreak (cyclomatic 43, cognitive 42) tests/rspack-test/normalCases/parsing/evaluate-binary/deep.js:80— shouldBreak has cyclomatic complexity 43 and cognitive complexity 42; 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.
Complex function runLoaders (cyclomatic 41, cognitive 72) packages/rspack/src/loader-runner/index.ts:249— runLoaders has cyclomatic complexity 41 and cognitive complexity 72; 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.
Complex function (anonymous) (cyclomatic 39, cognitive 50) crates/node_binding/scripts/build.mjs:39— (anonymous) has cyclomatic complexity 39 and cognitive complexity 50; 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.
Complex function _showFormButtons (cyclomatic 39, cognitive 49) tests/rspack-test/configCases/inner-graph/issue-11678/module.js:2703— _showFormButtons has cyclomatic complexity 39 and cognitive complexity 49; 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.
Complex function (anonymous) (cyclomatic 37, cognitive 42) packages/rspack-cli/src/commands/serve.ts:58— (anonymous) has cyclomatic complexity 37 and cognitive complexity 42; 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.
Complex function (anonymous) (cyclomatic 36, cognitive 35) tests/rspack-test/configCases/chunks/available-modules/rspack.config.ts:25— (anonymous) has cyclomatic complexity 36 and cognitive complexity 35; 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.
Complex function (anonymous) (cyclomatic 34, cognitive 76) packages/rspack/src/util/smartGrouping.ts:73— (anonymous) has cyclomatic complexity 34 and cognitive complexity 76; 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.
Complex function compilation.summary! (cyclomatic 34, cognitive 29) packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts:80— compilation.summary! has cyclomatic complexity 34 and cognitive complexity 29; 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.
R3 · Large Files· packages/rspack/src/config/types.ts · ×1
packages/rspack/src/config/types.ts: 3047 lines of code packages/rspack/src/config/types.ts:1— packages/rspack/src/config/types.ts has 3047 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/rspack/src/stats/DefaultStatsFactoryPlugin.ts · ×1
packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts: 1531 lines of code packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts:1— packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts has 1531 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/rspack/src/config/defaults.ts · ×1
packages/rspack/src/config/defaults.ts: 1345 lines of code packages/rspack/src/config/defaults.ts:1— packages/rspack/src/config/defaults.ts has 1345 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/rspack/src/stats/DefaultStatsPrinterPlugin.ts · ×1
packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts: 1319 lines of code packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts:1— packages/rspack/src/stats/DefaultStatsPrinterPlugin.ts has 1319 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/rspack/src/Compilation.ts · ×1
packages/rspack/src/Compilation.ts: 1249 lines of code packages/rspack/src/Compilation.ts:1— packages/rspack/src/Compilation.ts has 1249 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/rspack/src/loader-runner/index.ts · ×1
packages/rspack/src/loader-runner/index.ts: 1185 lines of code packages/rspack/src/loader-runner/index.ts:1— packages/rspack/src/loader-runner/index.ts has 1185 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/rspack/src/Compiler.ts · ×1
packages/rspack/src/Compiler.ts: 1111 lines of code packages/rspack/src/Compiler.ts:1— packages/rspack/src/Compiler.ts has 1111 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/rspack/src/config/adapter.ts · ×1
packages/rspack/src/config/adapter.ts: 916 lines of code packages/rspack/src/config/adapter.ts:1— packages/rspack/src/config/adapter.ts has 916 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/rspack/src/util/fs.ts · ×1
packages/rspack/src/util/fs.ts: 721 lines of code packages/rspack/src/util/fs.ts:1— packages/rspack/src/util/fs.ts has 721 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/rspack/src/loader-runner/worker.ts · ×1
packages/rspack/src/loader-runner/worker.ts: 710 lines of code packages/rspack/src/loader-runner/worker.ts:1— packages/rspack/src/loader-runner/worker.ts has 710 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/rspack/src/config/normalization.ts · ×1
packages/rspack/src/config/normalization.ts: 700 lines of code packages/rspack/src/config/normalization.ts:1— packages/rspack/src/config/normalization.ts has 700 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/rspack/src/stats/statsFactoryUtils.ts · ×1
packages/rspack/src/stats/statsFactoryUtils.ts: 668 lines of code packages/rspack/src/stats/statsFactoryUtils.ts:1— packages/rspack/src/stats/statsFactoryUtils.ts has 668 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/rspack/src/RuntimeGlobals.ts · ×1
packages/rspack/src/RuntimeGlobals.ts: 627 lines of code packages/rspack/src/RuntimeGlobals.ts:1— packages/rspack/src/RuntimeGlobals.ts has 627 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/rspack/src/config/adapterRuleUse.ts · ×1
packages/rspack/src/config/adapterRuleUse.ts: 622 lines of code packages/rspack/src/config/adapterRuleUse.ts:1— packages/rspack/src/config/adapterRuleUse.ts has 622 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/rspack-test-tools/src/case/cache.ts · ×1
packages/rspack-test-tools/src/case/cache.ts: 617 lines of code packages/rspack-test-tools/src/case/cache.ts:1— packages/rspack-test-tools/src/case/cache.ts has 617 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/rspack-test-tools/src/runner/node/index.ts · ×1
packages/rspack-test-tools/src/runner/node/index.ts: 570 lines of code packages/rspack-test-tools/src/runner/node/index.ts:1— packages/rspack-test-tools/src/runner/node/index.ts has 570 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/rspack/src/MultiCompiler.ts · ×1
packages/rspack/src/MultiCompiler.ts: 568 lines of code packages/rspack/src/MultiCompiler.ts:1— packages/rspack/src/MultiCompiler.ts has 568 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/rspack/src/config/target.ts · ×1
packages/rspack/src/config/target.ts: 538 lines of code packages/rspack/src/config/target.ts:1— packages/rspack/src/config/target.ts has 538 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/rspack/src/Watching.ts · ×1
packages/rspack/src/Watching.ts: 495 lines of code packages/rspack/src/Watching.ts:1— packages/rspack/src/Watching.ts has 495 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/rspack/src/NativeWatchFileSystem.ts · ×1
packages/rspack/src/NativeWatchFileSystem.ts: 494 lines of code packages/rspack/src/NativeWatchFileSystem.ts:1— packages/rspack/src/NativeWatchFileSystem.ts has 494 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/rspack/src/taps/compilation.ts · ×1
packages/rspack/src/taps/compilation.ts: 486 lines of code packages/rspack/src/taps/compilation.ts:1— packages/rspack/src/taps/compilation.ts has 486 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/rspack-test-tools/src/case/watch.ts · ×1
packages/rspack-test-tools/src/case/watch.ts: 485 lines of code packages/rspack-test-tools/src/case/watch.ts:1— packages/rspack-test-tools/src/case/watch.ts has 485 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/rspack/src/util/cleverMerge.ts · ×1
packages/rspack/src/util/cleverMerge.ts: 480 lines of code packages/rspack/src/util/cleverMerge.ts:1— packages/rspack/src/util/cleverMerge.ts has 480 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/rspack/src/sharing/IndependentSharedPlugin.ts · ×1
packages/rspack/src/sharing/IndependentSharedPlugin.ts: 452 lines of code packages/rspack/src/sharing/IndependentSharedPlugin.ts:1— packages/rspack/src/sharing/IndependentSharedPlugin.ts has 452 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/rspack/src/rspackOptionsApply.ts · ×1
packages/rspack/src/rspackOptionsApply.ts: 450 lines of code packages/rspack/src/rspackOptionsApply.ts:1— packages/rspack/src/rspackOptionsApply.ts has 450 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/rspack/src/exports.ts · ×1
packages/rspack/src/exports.ts: 449 lines of code packages/rspack/src/exports.ts:1— packages/rspack/src/exports.ts has 449 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/rspack-test-tools/src/runner/web/index.ts · ×1
packages/rspack-test-tools/src/runner/web/index.ts: 436 lines of code packages/rspack-test-tools/src/runner/web/index.ts:1— packages/rspack-test-tools/src/runner/web/index.ts has 436 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/rspack/src/loader-runner/service.ts · ×1
packages/rspack/src/loader-runner/service.ts: 420 lines of code packages/rspack/src/loader-runner/service.ts:1— packages/rspack/src/loader-runner/service.ts has 420 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/rspack/src/container/ModuleFederationPlugin.ts · ×1
packages/rspack/src/container/ModuleFederationPlugin.ts: 417 lines of code packages/rspack/src/container/ModuleFederationPlugin.ts:1— packages/rspack/src/container/ModuleFederationPlugin.ts has 417 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/rspack-test-tools/src/case/hot-step.ts · ×1
packages/rspack-test-tools/src/case/hot-step.ts: 403 lines of code packages/rspack-test-tools/src/case/hot-step.ts:1— packages/rspack-test-tools/src/case/hot-step.ts has 403 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/rspack/src/stats/StatsFactory.ts · ×1
packages/rspack/src/stats/StatsFactory.ts: 401 lines of code packages/rspack/src/stats/StatsFactory.ts:1— packages/rspack/src/stats/StatsFactory.ts has 401 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Benchmark script nothing runs (~97 LoC) website/theme/components/Landingpage/Benchmark/index.tsx— This script imports the product ('../../../i18n'), so it is an authored benchmark, not measurement input — but nothing invokes it: no package.json script, no CI workflow or build recipe, no REDACTED, no other file under website/theme/components/Landingpage/Benchmark/, and no in-repo reference to its name at all. It runs only if someone remembers to type `node website/theme/components/Landingpage/Benchmark/index.tsx`, and it silently rots against the API it measures. Wire it into a script or workflow the way its wired siblings are, or delete it.
Weak hash algorithm crates/rspack_hash/src/lib.rs:215— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
X2 · Cancellation propagation· Async function without AbortSignal · ×1
Async function without AbortSignal: defaultHttpClientForBrowser packages/rspack/src/builtin-plugin/HttpUriPlugin.ts:129— `defaultHttpClientForBrowser` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Orphaned file crates/rspack/src/builder/browserslist_target.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/rspack/src/builder/devtool.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/rspack_storage/src/filesystem/db/bucket/mod.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/rspack_core/src/compilation/build_module_graph/module_executor/module_tracker.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/rspack_storage/src/filesystem/db/transaction/mod.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/rspack_storage/src/filesystem/scope_fs.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/rspack_cacheable/src/with/as_map.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/rspack_cacheable/src/utils/portable_string.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/rspack_cacheable_macros/src/cacheable_dyn/impl_trait.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/rspack_cacheable/src/dyn/mod.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/rspack_storage/src/filesystem/db/transaction/lock/state.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/rspack_storage/src/filesystem/db/bucket/pack/mod.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/rspack_storage/src/filesystem/db/bucket/meta.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/rspack_cacheable/src/with/as_vec.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/rspack_cacheable/src/with/as_inner.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/rspack_binding_api/src/raw_options/raw_builtins/raw_dll.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/rspack_binding_api/src/virtual_modules/trie_store.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/rspack_napi/src/callback.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/rspack_plugin_mf/src/container/federation_modules_plugin.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/rspack_plugin_dll/src/dll_reference/delegated_plugin.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/rspack_binding_api/src/virtual_modules/fs.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/rspack_plugin_mf/src/manifest/data.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/rspack_napi_macros/src/tagged_union.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/rspack_ids/src/hashed_module_ids_plugin.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 packages/rspack/src/sharing/SharedContainerPlugin.ts: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.
Interpolated log message defeats structured logging crates/rspack_watcher/src/disk_watcher.rs:40— `error!` at line 40 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/rspack_watcher/src/disk_watcher.rs:83— `warn!` at line 83 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/rspack_watcher/src/ignored.rs:157— `error!` at line 157 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/rspack_resolver/src/lib.rs:1071— `debug!` at line 1071 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/rspack_resolver/src/lib.rs:1106— `debug!` at line 1106 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/rspack_plugin_split_chunks/src/plugin/max_size.rs:294— `trace!` at line 294 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/max_size.rs:523— `trace!` at line 523 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/max_size.rs:535— `debug!` at line 535 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/rspack_plugin_split_chunks/src/plugin/max_size.rs:561— `debug!` at line 561 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/rspack_plugin_split_chunks/src/plugin/max_size.rs:573— `warn!` at line 573 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/rspack_plugin_split_chunks/src/plugin/max_size.rs:631— `debug!` at line 631 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/rspack_plugin_split_chunks/src/plugin/min_size.rs:64— `trace!` 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/min_size.rs:235— `debug!` at line 235 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/rspack_plugin_split_chunks/src/plugin/min_size.rs:277— `debug!` at line 277 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/rspack_plugin_split_chunks/src/plugin/mod.rs:59— `debug!` at line 59 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/rspack_plugin_split_chunks/src/plugin/mod.rs:83— `debug!` at line 83 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/rspack_plugin_split_chunks/src/plugin/mod.rs:304— `trace!` at line 304 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:314— `trace!` at line 314 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:330— `trace!` at line 330 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:450— `trace!` at line 450 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:494— `trace!` at line 494 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/mod.rs:518— `trace!` at line 518 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1425— `trace!` at line 1425 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1431— `trace!` at line 1431 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: `trace!(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/rspack_plugin_split_chunks/src/plugin/module_group.rs:1432— `trace!` at line 1432 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: `trace!(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.
P2 · Observability· Console output used as the logging channel · ×35
Console output used as the logging channel packages/rspack/src/NativeWatchFileSystem.ts:321— `packages/rspack/src/NativeWatchFileSystem.ts` reports through `console.*` at line 321 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/checkNodeVersion.ts:15— `packages/rspack/src/checkNodeVersion.ts` reports through `console.*` at line 15 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/util/asyncLib.ts:66— `packages/rspack/src/util/asyncLib.ts` reports through `console.*` at line 66 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/util/asyncLib.ts:67— `packages/rspack/src/util/asyncLib.ts` reports through `console.*` at line 67 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/util/asyncLib.ts:82— `packages/rspack/src/util/asyncLib.ts` reports through `console.*` at line 82 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/util/asyncLib.ts:83— `packages/rspack/src/util/asyncLib.ts` reports through `console.*` at line 83 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/sharing/IndependentSharedPlugin.ts:73— `packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 73 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/sharing/IndependentSharedPlugin.ts:106— `packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 106 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/sharing/IndependentSharedPlugin.ts:322— `packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 322 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/sharing/IndependentSharedPlugin.ts:349— `packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 349 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/sharing/IndependentSharedPlugin.ts:478— `packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 478 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/sharing/IndependentSharedPlugin.ts:490— `packages/rspack/src/sharing/IndependentSharedPlugin.ts` reports through `console.*` at line 490 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:250— `REDACTED` reports through `console.*` at line 250 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:262— `REDACTED` reports through `console.*` at line 262 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:270— `REDACTED` reports through `console.*` at line 270 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:272— `REDACTED` reports through `console.*` at line 272 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:101— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 101 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:103— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 103 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:109— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 109 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:113— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 113 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:117— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 117 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:121— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 121 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:133— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 133 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:144— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 144 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/rspack/src/logging/createConsoleLogger.ts:161— `packages/rspack/src/logging/createConsoleLogger.ts` reports through `console.*` at line 161 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Duplicated predicate packages/rspack/src/loader-runner/index.ts:1091— `(await runSyncOrAsync(fn, loaderContext, args)) || []` appears character-identically in 2 files — packages/rspack/src/loader-runner/index.ts, packages/rspack/src/loader-runner/worker.ts. 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/rspack-cli/src/commands/preview.ts:74— `(error as Error)?.message || String(error)` appears character-identically in 2 files — packages/rspack-cli/src/commands/preview.ts, packages/rspack-cli/src/commands/serve.ts. 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/rspack-cli/src/utils/loadConfig.ts:48— `Boolean(value) && typeof value === 'object' && !Array.isArray(value)` appears character-identically in 2 files — packages/rspack-cli/src/utils/loadConfig.ts, packages/rspack/src/container/ModuleFederationManifestPlugin.ts. 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 website/components/CommunityCompatibleTable.tsx:398— `b.status - a.status || a.name.localeCompare(b.name)` appears character-identically in 2 files — website/components/CommunityCompatibleTable.tsx, website/components/PluginSupportStatusTable.tsx. 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/rspack/src/loader-runner/index.ts:504— `entry.options && typeof entry.options === 'object'` appears character-identically in 2 files — packages/rspack/src/loader-runner/index.ts, packages/rspack/src/loader-runner/worker.ts. 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/rspack/src/builtin-plugin/css-extract/index.ts:97— `hasChunkHash || hasContentHash || hasName || hasId` appears character-identically in 2 files — packages/rspack/src/builtin-plugin/css-extract/index.ts, packages/rspack/src/config/defaults.ts. 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/rspack/src/container/ModuleFederationManifestPlugin.ts:249— `item === key || !isRequiredVersion(item)` appears character-identically in 5 files — packages/rspack/src/container/ModuleFederationManifestPlugin.ts, packages/rspack/src/container/ModuleFederationPlugin.ts, packages/rspack/src/sharing/ConsumeSharedPlugin.ts, packages/rspack/src/sharing/IndependentSharedPlugin.ts. 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/rspack/src/container/ContainerReferencePlugin.ts:58— `item.shareScope || options.shareScope || 'default'` appears character-identically in 2 files — packages/rspack/src/container/ContainerReferencePlugin.ts, packages/rspack/src/container/ModuleFederationPlugin.ts. 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/rspack/src/sharing/ConsumeSharedPlugin.ts:76— `item.shareScope || shareScope || 'default'` appears character-identically in 2 files — packages/rspack/src/sharing/ConsumeSharedPlugin.ts, packages/rspack/src/sharing/ProvideSharedPlugin.ts. 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/rspack/src/loader-runner/index.ts:472— `loaderContext.loaderIndex >= loaderContext.loaders.length - 1 && !loaderContext.resource` appears character-identically in 2 files — packages/rspack/src/loader-runner/index.ts, packages/rspack/src/loader-runner/worker.ts. 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/rspack/src/loader-runner/index.ts:239— `loaderContext.loaders?.length && index < loaderContext.loaders.length && index >= 0 && loaderContext.loaders[index]` appears character-identically in 2 files — packages/rspack/src/loader-runner/index.ts, packages/rspack/src/loader-runner/worker.ts. 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/rspack/src/loader-runner/index.ts:718— `options === null || options === undefined` appears character-identically in 2 files — packages/rspack/src/loader-runner/index.ts, packages/rspack/src/loader-runner/worker.ts. 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/rspack/src/loader-runner/index.ts:705— `options.startsWith('{') && options.endsWith('}')` appears character-identically in 2 files — packages/rspack/src/loader-runner/index.ts, packages/rspack/src/loader-runner/worker.ts. 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/rspack/src/NativeWatchFileSystem.ts:203— `typeof callbackUndelayed !== 'function' && callbackUndelayed` appears character-identically in 2 files — packages/rspack/src/NativeWatchFileSystem.ts, packages/rspack/src/node/NodeWatchFileSystem.ts. 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/rspack/src/config/defaults.ts:703— `typeof library === 'object' && library && !Array.isArray(library)` appears character-identically in 2 files — packages/rspack/src/config/defaults.ts, packages/rspack/src/config/normalization.ts. 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/rspack/src/browser/BrowserHttpImportEsmPlugin.ts:248— `url.protocol === 'http:' || url.protocol === 'https:'` appears character-identically in 2 files — packages/rspack/src/browser/BrowserHttpImportEsmPlugin.ts, packages/rspack/src/builtin-plugin/SubresourceIntegrityPlugin.ts. 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/rspack/src/Compilation.ts:503— `value === undefined && typeof prop === 'string'` appears character-identically in 2 files — packages/rspack/src/Compilation.ts, packages/rspack/src/Compiler.ts. 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/rspack_plugin_javascript/src/dependency/context/import_context_dependency.rs:61— `!from_magic_comment && referenced_specifiers.is_empty()` appears character-identically in 4 files — crates/rspack_plugin_javascript/src/dependency/context/import_context_dependency.rs, crates/rspack_plugin_javascript/src/dependency/esm/import_dependency.rs, crates/rspack_plugin_javascript/src/dependency/esm/import_eager_dependency.rs, crates/rspack_plugin_javascript/src/dependency/esm/import_weak_dependency.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/rspack_plugin_lightning_css_minimizer/src/lib.rs:114— `!is_matched || original.get_info().minimized.unwrap_or(false)` appears character-identically in 2 files — crates/rspack_plugin_lightning_css_minimizer/src/lib.rs, crates/rspack_plugin_swc_js_minimizer/src/lib.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/rspack_plugin_rslib/src/url_external.rs:27— `!request.starts_with("./") && !request.starts_with("../")` appears character-identically in 2 files — crates/rspack_plugin_rslib/src/url_external.rs, crates/rspack_plugin_rslib/src/worker_external.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/rspack_plugin_javascript/src/plugin/mod.rs:443— `allow_inline_startup && !chunk_ids.is_empty()` appears character-identically in 2 files — crates/rspack_plugin_javascript/src/plugin/mod.rs, crates/rspack_plugin_javascript/src/plugin/runtime_context.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/rspack_plugin_javascript/src/plugin/mod.rs:761— `allow_inline_startup && !js_entry_modules.is_empty()` appears character-identically in 2 files — crates/rspack_plugin_javascript/src/plugin/mod.rs, crates/rspack_plugin_javascript/src/plugin/runtime_context.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/rspack_plugin_javascript/src/plugin/mod.rs:302— `allow_inline_startup && intercept_module_execution` appears character-identically in 2 files — crates/rspack_plugin_javascript/src/plugin/mod.rs, crates/rspack_plugin_javascript/src/plugin/runtime_context.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/rspack_plugin_javascript/src/plugin/mod.rs:294— `allow_inline_startup && module_factories` appears character-identically in 2 files — crates/rspack_plugin_javascript/src/plugin/mod.rs, crates/rspack_plugin_javascript/src/plugin/runtime_context.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/rspack_plugin_javascript/src/plugin/mod.rs:599— `entry_runtime_requirements && entry_runtime_requirements.contains(RuntimeGlobals::EXPORTS)` appears character-identically in 2 files — crates/rspack_plugin_javascript/src/plugin/mod.rs, crates/rspack_plugin_javascript/src/plugin/runtime_context.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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 12 significant file(s) lose their only recent owner: crates/rspack_sources/src/source_map_source.rs, crates/rspack_plugin_rsc/src/server_plugin.rs, crates/rspack_binding_api/src/file_system_dependency_strings.rs, crates/rspack_plugin_rsc/src/reference_manifest.rs, crates/rspack_binding_api/src/compiler_scoped_tsfn.rs, crates/rspack_binding_api/src/plugins/rsc.rs, crates/rspack_plugin_rsc/src/coordinator.rs, crates/rspack_binding_api/src/js_helpers.rs (+4 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 6 significant file(s) lose their only recent owner: crates/rspack_plugin_javascript/src/runtime_context.rs, crates/rspack_plugin_javascript/src/parser_plugin/side_effects_analysis.rs, crates/rspack_resolver/src/package_json/simd.rs, crates/rspack_core/src/exports/export_info_setter.rs, crates/rspack_core/src/exports/exports_info_setter.rs, crates/rspack_core/src/reserved_names.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 4 significant file(s) lose their only recent owner: crates/rspack_core/src/module_graph/rollback/overlay_map.rs, crates/rspack_core/src/compilation/pass.rs, crates/rspack_core/src/compilation/run_passes.rs, crates/rspack_core/src/module_graph/internal.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 3 significant file(s) lose their only recent owner: crates/rspack_watcher/src/paths.rs, crates/rspack_resolver/src/tsconfig.rs, crates/rspack_resolver/src/context.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 3 significant file(s) lose their only recent owner: crates/rspack_storage/src/filesystem/db/bucket/mod.rs, crates/rspack_cacheable/src/with/custom.rs, crates/rspack_parallel/src/iterator_consumer/try_future.rs. Pair on, review, or document these before any departure.
R7 · Dead Code· Unused module-local declaration 'React' · ×4
Unused module-local declaration 'React' tests/rspack-test/diagnosticsCases/factorize/mismatched-module-type/app.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'React' tests/rspack-test/diagnosticsCases/factorize/mismatched-module-type/app.jsx:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'React' tests/rspack-test/diagnosticsCases/factorize/mismatched-module-type/app.ts:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'React' tests/rspack-test/diagnosticsCases/factorize/mismatched-module-type/app.tsx:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'fileURLToPath' · ×3
Unused module-local declaration 'fileURLToPath' tests/rspack-test/configCases/module/node-globals/cjs/file.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'fileURLToPath' tests/rspack-test/configCases/output-module/node-globals/cjs/file.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'fileURLToPath' tests/rspack-test/configCases/output-module/node-shims-in-concatenated-module/file.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'TOP_OF_FILE' · ×3
Unused module-local declaration 'TOP_OF_FILE' tests/rspack-test/configCases/rstest/mock/doMock.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'TOP_OF_FILE' tests/rspack-test/configCases/rstest/mock/mockFactory.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'TOP_OF_FILE' tests/rspack-test/configCases/rstest/mock/mockRequireFactory.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'local' · ×3
Unused module-local declaration 'local' tests/rspack-test/esmOutputCases/deconflict/deconflit-local/foo.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'local' tests/rspack-test/esmOutputCases/deconflict/other-chunk-local/foo.js:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'local' tests/rspack-test/esmOutputCases/deconflict/other-chunk-local/other.js:3— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Silent fallback default in catch tests/rspack-test/configCases/resolve/pnp-enable/.pnp.cjs:4243— `patchFs` swallows every exception into `return false` — 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 tests/rspack-test/configCases/rstest/mock/globals-false/importActual.js:15— `getGlobalActual` swallows every exception into `return {}` — 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 tests/rspack-test/diagnosticsCases/config/pnp-disable/.pnp.cjs:4243— `patchFs` swallows every exception into `return false` — 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.
R7 · Dead Code· Unused module-local declaration 'test' · ×2
Unused module-local declaration 'test' tests/rspack-test/builtinCases/samples/concatenate-modules/index.js:8— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'test' tests/rspack-test/configCases/plugins/minify-disabled-on-empty-array/index.js:6— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'component' · ×2
Unused module-local declaration 'component' tests/rspack-test/configCases/builtin-swc-loader/preact-refresh/index.jsx:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'component' tests/rspack-test/configCases/builtin-swc-loader/react-refresh/index.jsx:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'App' · ×2
Unused module-local declaration 'App' tests/rspack-test/configCases/builtin-swc-loader/react-compiler-panic-threshold/index.jsx:3— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'App' tests/rspack-test/configCases/builtin-swc-loader/react-compiler-paren-target/index.tsx:3— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Fat interface: LoaderContext (21 required operations) packages/rspack/src/config/adapterRuleUse.ts:147— `LoaderContext` declares 21 required operations: `async`, `cacheable`, `getOptions`, `resolve`, `getResolve`, `getLogger`, `emitError`, `emitWarning`, `emitFile`, `addDependency`, `dependency`, `addContextDependency`, `addMissingDependency`, `clearDependencies`, `getDependencies`, `getContextDependencies`, `getMissingDependencies`, `addBuildDependency`, `importModule`, `importModule`, `__internal__setParseMeta`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. Those 21 declarations carry 20 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 20 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
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 (35 single-owned of 846 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; 846 of the 1545 production source files in this repository met that bar). They are anonymized user #6 (2 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)), anonymized user #10 (1 file(s)), anonymized user #11 (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/rspack_macros/src/string_enum.rs, crates/css-module-lexer/src/css_syntax.rs, crates/rspack_plugin_circular_dependencies/src/circular_dependency_rspack_plugin.rs, packages/rspack/src/browser/BrowserHttpImportEsmPlugin.ts, packages/rspack/src/builtin-plugin/EsmLibraryPlugin.ts, crates/rspack_plugin_rslib/src/url_external.rs, packages/create-rspack/src/index.ts.
Documentation: no build, run or usage example README.md:1— the repository holds project manifests and neither `README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
No ADRs found — 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/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 4 of 111 project(s) overshoot their size bounds, lowering Project Cohesion to 9.3/10. The most over is `crates/rspack_core` (63456 LoC, 760 module-visible types across 67 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
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 53 of 846 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (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; 846 of the 1545 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: crates/rspack/src/builder/browserslist_target.rs, crates/rspack/src/builder/devtool.rs, crates/rspack_storage/src/filesystem/db/bucket/mod.rs, crates/rspack_core/src/compilation/build_module_graph/module_executor/module_tracker.rs, crates/rspack_storage/src/filesystem/db/transaction/mod.rs, crates/rspack_storage/src/filesystem/scope_fs.rs, crates/rspack_cacheable/src/with/as_map.rs, crates/rspack_cacheable/src/utils/portable_string.rs (and 45 more). 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.
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.
Logging is not universal — Only 42/45 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/rspack_allocative_driver`, `packages/create-rspack`, `xtask`.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code· Unused export 'BrowserHttpImportEsmPlugin' · ×1
Unused export 'BrowserHttpImportEsmPlugin' packages/rspack/src/browser/BrowserHttpImportEsmPlugin.ts:45— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/rspack/src/browser/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/rspack/src/browser/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'BrowserRequirePlugin' · ×1
Unused export 'BrowserRequirePlugin' packages/rspack/src/browser/BrowserRequirePlugin.ts:42— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/rspack/src/browser/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/rspack/src/browser/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused module-local declaration 'MyApp' · ×1
Unused module-local declaration 'MyApp' tests/rspack-test/configCases/builtin-swc-loader/react-compiler/index.jsx:1— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'setTimeout' · ×1
Unused module-local declaration 'setTimeout' tests/rspack-test/configCases/concatenate-modules/issue-13022/a.js:2— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'X' · ×1
Unused module-local declaration 'X' tests/rspack-test/configCases/concatenate-modules/rename-10168/C.js:3— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'Y' · ×1
Unused module-local declaration 'Y' tests/rspack-test/configCases/concatenate-modules/rename-10168/C.js:4— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'fileName_1' · ×1
Unused module-local declaration 'fileName_1' tests/rspack-test/configCases/inner-graph/issue-12669/module.js:2— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'cls2' · ×1
Unused module-local declaration 'cls2' tests/rspack-test/configCases/inner-graph/issue-17565/module.js:15— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'cls4' · ×1
Unused module-local declaration 'cls4' tests/rspack-test/configCases/inner-graph/issue-17565/module.js:26— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'cls6' · ×1
Unused module-local declaration 'cls6' tests/rspack-test/configCases/inner-graph/issue-17565/module.js:39— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'cls8' · ×1
Unused module-local declaration 'cls8' tests/rspack-test/configCases/inner-graph/issue-17565/module.js:52— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'i' · ×1
Unused module-local declaration 'i' tests/rspack-test/configCases/library/issue-18932/index.js:5— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration '__dirname' · ×1
Unused module-local declaration '__dirname' tests/rspack-test/configCases/node/filename-and-dirname/index.js:7— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration '__filename' · ×1
Unused module-local declaration '__filename' tests/rspack-test/configCases/node/filename-and-dirname/index.js:8— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'neverCalled' · ×1
Unused module-local declaration 'neverCalled' tests/rspack-test/hotCases/lazy-compilation/unrelated/index.js:3— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'withC' · ×1
Unused module-local declaration 'withC' tests/rspack-test/normalCases/inner-graph/circular/module.js:30— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'Unused' · ×1
Unused module-local declaration 'Unused' tests/rspack-test/normalCases/inner-graph/class-dynamic-props/unused1.js:3— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
No security response headers detected website/docs/public/_headers:1— None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `_headers` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
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 — 1/69 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.
Null assertions (`!`) reduce the strict null checking score — ~6.8 `!` null assertions per 1k TypeScript source lines — 328 assertion(s) across the 48019 source line(s) of the 314 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/rspack/src/loader-runner/index.ts (39), packages/rspack/src/FileSystem.ts (38), packages/rspack/src/taps/compilation.ts (32). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Outdated: arc-swap — `arc-swap` is locked at 1.9.2 but 1.9.3 is the current stable release on crates.io, and it already satisfies the `"1.9.2"` requirement declared in crates/rspack_allocative/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arc-swap` and commit the updated REDACTED.
Outdated: hstr — `hstr` is locked at 4.0.2 but 4.0.3 is the current stable release on crates.io, and it already satisfies the `"4.0.2"` requirement declared in crates/rspack_allocative/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p hstr` and commit the updated REDACTED.
Outdated: indoc — `indoc` is locked at 2.0.7 but 2.0.8 is the current stable release on crates.io, and it already satisfies the `"2.0.7"` requirement declared in crates/rspack_core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p indoc` and commit the updated REDACTED.
Outdated: inventory — `inventory` is locked at 0.3.17 but 0.3.25 is the current stable release on crates.io, and it already satisfies the `"0.3.17"` requirement declared in crates/rspack_cacheable/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p inventory` and commit the updated REDACTED.
Outdated: json-escape-simd — `json-escape-simd` is locked at 3.1.2 but 3.1.3 is the current stable release on crates.io, and it already satisfies the `"3.1.2"` requirement declared in crates/rspack_util/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p json-escape-simd` and commit the updated REDACTED.
Outdated: mimalloc — `mimalloc` is locked at 0.1.48 but 0.1.52 is the current stable release on crates.io, and it already satisfies the `"0.1.48"` requirement declared in crates/rspack_allocator/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p mimalloc` and commit the updated REDACTED.
Outdated: napi — `napi` is locked at 3.10.5 but 3.15.0 is the current stable release on crates.io, and it already satisfies the `"3.10.5"` requirement declared in crates/rspack_allocative/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi` and commit the updated REDACTED.
Outdated: napi-build — `napi-build` is locked at 2.3.2 but 2.6.0 is the current stable release on crates.io, and it already satisfies the `"2.3.2"` requirement declared in crates/rspack_binding_build/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi-build` and commit the updated REDACTED.
Outdated: napi-derive — `napi-derive` is locked at 3.5.10 but 3.6.13 is the current stable release on crates.io, and it already satisfies the `"3.5.10"` requirement declared in crates/node_binding/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi-derive` and commit the updated REDACTED.
Outdated: notify — `notify` is locked at 8.2.0 but 8.2.1 is the current stable release on crates.io, and it already satisfies the `"8.2.0"` requirement declared in crates/rspack_watcher/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p notify` and commit the updated REDACTED.
Outdated: owo-colors — `owo-colors` is locked at 4.1.0 but 4.4.0 is the current stable release on crates.io, and it already satisfies the `"4.0.0"` requirement declared in crates/rspack_error/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: pnp — `pnp` is locked at 0.12.11 but 0.12.12 is the current stable release on crates.io, and it already satisfies the `"0.12.11"` requirement declared in crates/rspack_allocative/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p pnp` and commit the updated REDACTED.
Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0.151"` requirement declared in xtask/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
Outdated: smallvec — `smallvec` is locked at 1.15.2 but 1.16.4 is the current stable release on crates.io, and it already satisfies the `"1.15.2"` requirement declared in crates/css-module-lexer/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p smallvec` and commit the updated REDACTED.
Outdated: smol_str — `smol_str` is locked at 0.3.6 but 0.3.7 is the current stable release on crates.io, and it already satisfies the `"0.3.6"` requirement declared in crates/rspack_allocative/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p smol_str` and commit the updated REDACTED.
Outdated: swc_ecma_minifier — `swc_ecma_minifier` is locked at 63.0.2 but 63.0.4 is the current stable release on crates.io, and it already satisfies the `"63.0.2"` requirement declared in crates/rspack_allocative/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p swc_ecma_minifier` and commit the updated REDACTED.
Outdated: textwrap — `textwrap` is locked at 0.16.1 but 0.16.4 is the current stable release on crates.io, and it already satisfies the `"0.16.1"` requirement declared in crates/rspack_error/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p textwrap` and commit the updated REDACTED.
Outdated: tokio — `tokio` is locked at 1.53.2 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1.53.2"` requirement declared in crates/rspack_allocative/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
Outdated: triomphe — `triomphe` is locked at 0.1.16 but 0.1.17 is the current stable release on crates.io, and it already satisfies the `"0.1.16"` requirement declared in crates/rspack_allocative/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p triomphe` and commit the updated REDACTED.
Outdated: unicase — `unicase` is locked at 2.9.0 but 2.10.0 is the current stable release on crates.io, and it already satisfies the `"2.9.0"` requirement declared in crates/rspack_util/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p unicase` and commit the updated REDACTED.
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.
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 24 file(s) — `crates/node_binding/napi-binding.d.ts`, `crates/rspack_plugin_esm_library/src/link.rs`, `packages/create-rspack/template-react-ts/rspack.config.ts`, `packages/create-rspack/template-vanilla-ts/rspack.config.ts`, `packages/create-rspack/template-vue-ts/rspack.config.ts`, … (+19 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
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.
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.
Run 01a17b29-acef-7b58-b35d-7afbafdbe7a4 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 109 · Warnings: 1969 · Recommendations: 215 · Info: 20 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 27-10-2026 @ 02:21 UTC.
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.