Public report of voidzero-dev/vite-plus, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 18:37 UTC · Survey ID cd_d77d13ee9176489dabcc72bf9977d87d
voidzero-dev/vite-plus
Measured 14 November 2026, 18:36 UTC, at code version 0dda2bc
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).
CAI scoreAt riskUp 2 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: 145,238 lines of product code in 22 projects, tests not counted · Estimated rebuild effort: about 1.4 person-years · Weakest lens: Code Health, 43
Findings by how serious they are
34 critical918 serious147 minor
14 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 18:36 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
63of 63 dimensions measured by tools.
1068of 1099 findings point to an exact file and line, so you can open each one in the code. The other 31 concern the repository as a whole, such as missing documentation.
63dimensions across 6 lenses, read from 145,238 lines of product code in 22 projects.
voidzero-dev/vite-plus is rated At risk because critical security findings are open, most of them in the packages it uses. It scores 58 out of 100, which the At risk rating leaves unchanged.
Code Health, at 43, is the weakest lens and counts most in the score. The best first steps are writing log messages as searchable templates and splitting the oversized files, each worth about 4 points. Raising Code Health to 70 would lift the score to about 70.
Eighteen known security holes in the packages the code depends on can be used by attackers. Five weaknesses in the code could be used by an attacker, and three automatic updates take new releases before a bad one can be spotted. Updating the vulnerable packages, fixing the weaknesses the scanner points to and setting a waiting period for automatic updates would close these risks. Passing outside input through environment variables would fix the three pipeline steps that put outside input straight into a shell command, and pinning each tool to an exact version would deal with the two pipeline tools referenced by a changeable name. The loop of files that import each other needs breaking.
The product code is 145,238 lines, about €200,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 43 to 70, the lowest score rated Strong, the score would rise from 58 to about 70.
Code composition: what the lines of code are
Product code 76%Tests 24%
New since the last survey: 266 findings
These 266 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
We compare 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: 202 findings
These 202 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one. The first 100 are listed here.
€66,000 to €330,000, for 1,094 to 3,471 hours of work, about 1.4 person-years for 1 to 3 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.8 at a score of 58. 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: 145,238 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: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 4 points · Medium effort · Large Files
3
Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with source.rewriteSource (cyclomatic 218), bin.main (cyclomatic 147).
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 €200,000 to build again, about 1.4 person-years of work. Its weakest lens is Code Health, at 43 (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
Interpolated log message defeats structured logging. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 198,457 lines over the last 90 days, which is about 804,853 lines a year. At that pace, the extra work comes to an estimated 109.8 to 658.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
352 modules, with 272 dependencies between them. 4 loops run through 8 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 312 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.
packages.cli.src.create uses packages.cli.src.types.workspace, so a change to packages.cli.src.types.workspace can break packages.cli.src.create, while a change to packages.cli.src.create can't break packages.cli.src.types.workspace.
Position
Below the diagonal: packages.cli.src.create uses a module listed above it, which is the healthy direction.
packages.cli.src.create.templates uses packages.cli.src.types.workspace, so a change to packages.cli.src.types.workspace can break packages.cli.src.create.templates, while a change to packages.cli.src.create.templates can't break packages.cli.src.types.workspace.
Position
Below the diagonal: packages.cli.src.create.templates uses a module listed above it, which is the healthy direction.
packages.cli.src.migration.migrator.vitest-v5 uses packages.cli.src.migration.vitest-v5.ast, so a change to packages.cli.src.migration.vitest-v5.ast can break packages.cli.src.migration.migrator.vitest-v5, while a change to packages.cli.src.migration.migrator.vitest-v5 can't break packages.cli.src.migration.vitest-v5.ast.
Position
Below the diagonal: packages.cli.src.migration.migrator.vitest-v5 uses a module listed above it, which is the healthy direction.
packages.cli.src.utils uses packages.cli.src.types.workspace, so a change to packages.cli.src.types.workspace can break packages.cli.src.utils, while a change to packages.cli.src.utils can't break packages.cli.src.types.workspace.
Position
Below the diagonal: packages.cli.src.utils uses a module listed above it, which is the healthy direction.
vite_plus_cli.cli.resolver uses vite_plus_cli.cli.types, so a change to vite_plus_cli.cli.types can break vite_plus_cli.cli.resolver, while a change to vite_plus_cli.cli.resolver can't break vite_plus_cli.cli.types.
Position
Below the diagonal: vite_plus_cli.cli.resolver uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.spec uses vp_global_cli.error, so a change to vp_global_cli.error can break vp_global_cli.commands.env.spec, while a change to vp_global_cli.commands.env.spec can't break vp_global_cli.error.
Position
Below the diagonal: vp_global_cli.commands.env.spec uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.spec uses vp_pm_cli.package_manager, so a change to vp_pm_cli.package_manager can break vp_global_cli.commands.env.spec, while a change to vp_global_cli.commands.env.spec can't break vp_pm_cli.package_manager.
Position
Below the diagonal: vp_global_cli.commands.env.spec uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.implode uses vp_global_cli.error, so a change to vp_global_cli.error can break vp_global_cli.commands.implode, while a change to vp_global_cli.commands.implode can't break vp_global_cli.error.
Position
Below the diagonal: vp_global_cli.commands.implode uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.implode uses vp_shared.dirs, so a change to vp_shared.dirs can break vp_global_cli.commands.implode, while a change to vp_global_cli.commands.implode can't break vp_shared.dirs.
Position
Below the diagonal: vp_global_cli.commands.implode uses a module listed above it, which is the healthy direction.
vp_global_cli.shim.dispatch uses vp_global_cli.commands.env.package_metadata, so a change to vp_global_cli.commands.env.package_metadata can break vp_global_cli.shim.dispatch, while a change to vp_global_cli.shim.dispatch can't break vp_global_cli.commands.env.package_metadata.
Position
Below the diagonal: vp_global_cli.shim.dispatch uses a module listed above it, which is the healthy direction.
vp_global_cli.shim.dispatch uses vp_global_cli.error, so a change to vp_global_cli.error can break vp_global_cli.shim.dispatch, while a change to vp_global_cli.shim.dispatch can't break vp_global_cli.error.
Position
Below the diagonal: vp_global_cli.shim.dispatch uses a module listed above it, which is the healthy direction.
vp_installer uses vp_pm_cli.request, so a change to vp_pm_cli.request can break vp_installer, while a change to vp_installer can't break vp_pm_cli.request.
Position
Below the diagonal: vp_installer uses a module listed above it, which is the healthy direction.
vp_js_runtime.providers.node uses vp_js_runtime.provider, so a change to vp_js_runtime.provider can break vp_js_runtime.providers.node, while a change to vp_js_runtime.providers.node can't break vp_js_runtime.provider.
Position
Below the diagonal: vp_js_runtime.providers.node uses a module listed above it, which is the healthy direction.
vp_pm_cli.cli uses vp_pm_cli.package_manager, so a change to vp_pm_cli.package_manager can break vp_pm_cli.cli, while a change to vp_pm_cli.cli can't break vp_pm_cli.package_manager.
Position
Below the diagonal: vp_pm_cli.cli uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.commands.approve_builds uses vp_pm_cli.resolution.command, so a change to vp_pm_cli.resolution.command can break vp_pm_cli.resolution.commands.approve_builds, while a change to vp_pm_cli.resolution.commands.approve_builds can't break vp_pm_cli.resolution.command.
Position
Below the diagonal: vp_pm_cli.resolution.commands.approve_builds uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.commands.approve_builds uses vp_pm_cli.resolution.diagnostics, so a change to vp_pm_cli.resolution.diagnostics can break vp_pm_cli.resolution.commands.approve_builds, while a change to vp_pm_cli.resolution.commands.approve_builds can't break vp_pm_cli.resolution.diagnostics.
Position
Below the diagonal: vp_pm_cli.resolution.commands.approve_builds uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.resolve uses vp_pm_cli.package_manager, so a change to vp_pm_cli.package_manager can break vp_pm_cli.resolution.resolve, while a change to vp_pm_cli.resolution.resolve can't break vp_pm_cli.package_manager.
Position
Below the diagonal: vp_pm_cli.resolution.resolve uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.resolve uses vp_pm_cli.resolution.command, so a change to vp_pm_cli.resolution.command can break vp_pm_cli.resolution.resolve, while a change to vp_pm_cli.resolution.resolve can't break vp_pm_cli.resolution.command.
Position
Below the diagonal: vp_pm_cli.resolution.resolve uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.resolve uses vp_pm_cli.resolution.diagnostics, so a change to vp_pm_cli.resolution.diagnostics can break vp_pm_cli.resolution.resolve, while a change to vp_pm_cli.resolution.resolve can't break vp_pm_cli.resolution.diagnostics.
Position
Below the diagonal: vp_pm_cli.resolution.resolve uses a module listed above it, which is the healthy direction.
30→36 vp_pm_cli.resolution.resolve uses vp_pm_cli.resolution.dialectpart of a loop✕
Connections
1 pair of types, where a type in vp_pm_cli.resolution.resolve uses a type in vp_pm_cli.resolution.dialect.
vp_pm_cli.resolution.resolve uses vp_pm_cli.resolution.dialect, so a change to vp_pm_cli.resolution.dialect can break vp_pm_cli.resolution.resolve, while a change to vp_pm_cli.resolution.resolve can't break vp_pm_cli.resolution.dialect.
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.
packages.cli.src.migration uses packages.cli.src.migration.report, so a change to packages.cli.src.migration.report can break packages.cli.src.migration, while a change to packages.cli.src.migration can't break packages.cli.src.migration.report.
Position
Below the diagonal: packages.cli.src.migration uses a module listed above it, which is the healthy direction.
packages.cli.src.migration uses packages.cli.src.types.workspace, so a change to packages.cli.src.types.workspace can break packages.cli.src.migration, while a change to packages.cli.src.migration can't break packages.cli.src.types.workspace.
Position
Below the diagonal: packages.cli.src.migration uses a module listed above it, which is the healthy direction.
packages.cli.src.migration uses packages.cli.src.migration.migrator.vitest-v5, so a change to packages.cli.src.migration.migrator.vitest-v5 can break packages.cli.src.migration, while a change to packages.cli.src.migration can't break packages.cli.src.migration.migrator.vitest-v5.
Position
Below the diagonal: packages.cli.src.migration uses a module listed above it, which is the healthy direction.
packages.cli.src.migration.migrator uses packages.cli.src.migration.report, so a change to packages.cli.src.migration.report can break packages.cli.src.migration.migrator, while a change to packages.cli.src.migration.migrator can't break packages.cli.src.migration.report.
Position
Below the diagonal: packages.cli.src.migration.migrator uses a module listed above it, which is the healthy direction.
packages.cli.src.migration.migrator uses packages.cli.src.migration.vitest-v5.ast, so a change to packages.cli.src.migration.vitest-v5.ast can break packages.cli.src.migration.migrator, while a change to packages.cli.src.migration.migrator can't break packages.cli.src.migration.vitest-v5.ast.
Position
Below the diagonal: packages.cli.src.migration.migrator uses a module listed above it, which is the healthy direction.
packages.cli.src.migration.migrator uses packages.cli.src.types.workspace, so a change to packages.cli.src.types.workspace can break packages.cli.src.migration.migrator, while a change to packages.cli.src.migration.migrator can't break packages.cli.src.types.workspace.
Position
Below the diagonal: packages.cli.src.migration.migrator uses a module listed above it, which is the healthy direction.
packages.cli.src.migration.migrator uses packages.cli.src.migration.migrator.vitest-v5, so a change to packages.cli.src.migration.migrator.vitest-v5 can break packages.cli.src.migration.migrator, while a change to packages.cli.src.migration.migrator can't break packages.cli.src.migration.migrator.vitest-v5.
Position
Below the diagonal: packages.cli.src.migration.migrator uses a module listed above it, which is the healthy direction.
vp_global_cli.cli uses vp_pm_cli.package_manager, so a change to vp_pm_cli.package_manager can break vp_global_cli.cli, while a change to vp_global_cli.cli can't break vp_pm_cli.package_manager.
Position
Below the diagonal: vp_global_cli.cli uses a module listed above it, which is the healthy direction.
vp_global_cli.cli uses vp_toolchain, so a change to vp_toolchain can break vp_global_cli.cli, while a change to vp_global_cli.cli can't break vp_toolchain.
Position
Below the diagonal: vp_global_cli.cli uses a module listed above it, which is the healthy direction.
vp_global_cli.cli uses vp_pm_cli.cli, so a change to vp_pm_cli.cli can break vp_global_cli.cli, while a change to vp_global_cli.cli can't break vp_pm_cli.cli.
Position
Below the diagonal: vp_global_cli.cli uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.config uses vp_pm_cli.package_manager, so a change to vp_pm_cli.package_manager can break vp_global_cli.commands.env.config, while a change to vp_global_cli.commands.env.config can't break vp_pm_cli.package_manager.
Position
Below the diagonal: vp_global_cli.commands.env.config uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.config uses vp_js_runtime.providers.node, so a change to vp_js_runtime.providers.node can break vp_global_cli.commands.env.config, while a change to vp_global_cli.commands.env.config can't break vp_js_runtime.providers.node.
Position
Below the diagonal: vp_global_cli.commands.env.config uses a module listed above it, which is the healthy direction.
vp_js_runtime.runtime uses vp_js_runtime.provider, so a change to vp_js_runtime.provider can break vp_js_runtime.runtime, while a change to vp_js_runtime.runtime can't break vp_js_runtime.provider.
Position
Below the diagonal: vp_js_runtime.runtime uses a module listed above it, which is the healthy direction.
vp_js_runtime.runtime uses vp_js_runtime.providers.node, so a change to vp_js_runtime.providers.node can break vp_js_runtime.runtime, while a change to vp_js_runtime.runtime can't break vp_js_runtime.providers.node.
Position
Below the diagonal: vp_js_runtime.runtime uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.dialect uses vp_pm_cli.resolution.command, so a change to vp_pm_cli.resolution.command can break vp_pm_cli.resolution.dialect, while a change to vp_pm_cli.resolution.dialect can't break vp_pm_cli.resolution.command.
Position
Below the diagonal: vp_pm_cli.resolution.dialect uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.dialect uses vp_pm_cli.resolution.diagnostics, so a change to vp_pm_cli.resolution.diagnostics can break vp_pm_cli.resolution.dialect, while a change to vp_pm_cli.resolution.dialect can't break vp_pm_cli.resolution.diagnostics.
Position
Below the diagonal: vp_pm_cli.resolution.dialect uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.dialect uses vp_pm_cli.resolution.commands.approve_builds, so a change to vp_pm_cli.resolution.commands.approve_builds can break vp_pm_cli.resolution.dialect, while a change to vp_pm_cli.resolution.dialect can't break vp_pm_cli.resolution.commands.approve_builds.
Position
Below the diagonal: vp_pm_cli.resolution.dialect uses a module listed above it, which is the healthy direction.
vp_pm_cli.resolution.dialect uses vp_pm_cli.resolution.resolve, so a change to vp_pm_cli.resolution.resolve can break vp_pm_cli.resolution.dialect, while a change to vp_pm_cli.resolution.dialect can't break vp_pm_cli.resolution.resolve.
Position
Below the diagonal: vp_pm_cli.resolution.dialect uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env uses vp_global_cli.cli, so a change to vp_global_cli.cli can break vp_global_cli.commands.env, while a change to vp_global_cli.commands.env can't break vp_global_cli.cli.
Position
Below the diagonal: vp_global_cli.commands.env uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env uses vp_global_cli.commands.env.config, so a change to vp_global_cli.commands.env.config can break vp_global_cli.commands.env, while a change to vp_global_cli.commands.env can't break vp_global_cli.commands.env.config.
Position
Below the diagonal: vp_global_cli.commands.env uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.package_manager uses vp_pm_cli.package_manager, so a change to vp_pm_cli.package_manager can break vp_global_cli.commands.env.package_manager, while a change to vp_global_cli.commands.env.package_manager can't break vp_pm_cli.package_manager.
Position
Below the diagonal: vp_global_cli.commands.env.package_manager uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.package_manager uses vp_global_cli.commands.env.spec, so a change to vp_global_cli.commands.env.spec can break vp_global_cli.commands.env.package_manager, while a change to vp_global_cli.commands.env.package_manager can't break vp_global_cli.commands.env.spec.
Position
Below the diagonal: vp_global_cli.commands.env.package_manager uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.package_manager uses vp_global_cli.commands.env.config, so a change to vp_global_cli.commands.env.config can break vp_global_cli.commands.env.package_manager, while a change to vp_global_cli.commands.env.package_manager can't break vp_global_cli.commands.env.config.
Position
Below the diagonal: vp_global_cli.commands.env.package_manager uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.pin uses vp_global_cli.error, so a change to vp_global_cli.error can break vp_global_cli.commands.env.pin, while a change to vp_global_cli.commands.env.pin can't break vp_global_cli.error.
Position
Below the diagonal: vp_global_cli.commands.env.pin uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.pin uses vp_pm_cli.package_manager, so a change to vp_pm_cli.package_manager can break vp_global_cli.commands.env.pin, while a change to vp_global_cli.commands.env.pin can't break vp_pm_cli.package_manager.
Position
Below the diagonal: vp_global_cli.commands.env.pin uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.pin uses vp_global_cli.commands.env.spec, so a change to vp_global_cli.commands.env.spec can break vp_global_cli.commands.env.pin, while a change to vp_global_cli.commands.env.pin can't break vp_global_cli.commands.env.spec.
Position
Below the diagonal: vp_global_cli.commands.env.pin uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.pin uses vp_js_runtime.providers.node, so a change to vp_js_runtime.providers.node can break vp_global_cli.commands.env.pin, while a change to vp_global_cli.commands.env.pin can't break vp_js_runtime.providers.node.
Position
Below the diagonal: vp_global_cli.commands.env.pin uses a module listed above it, which is the healthy direction.
vp_global_cli.commands.env.pin uses vp_global_cli.cli, so a change to vp_global_cli.cli can break vp_global_cli.commands.env.pin, while a change to vp_global_cli.commands.env.pin can't break vp_global_cli.cli.
Position
Below the diagonal: vp_global_cli.commands.env.pin uses a module listed above it, which is the healthy direction.
vp_global_cli.self_setup uses vp_global_cli.commands.env.config, so a change to vp_global_cli.commands.env.config can break vp_global_cli.self_setup, while a change to vp_global_cli.self_setup can't break vp_global_cli.commands.env.config.
Position
Below the diagonal: vp_global_cli.self_setup uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 43% · Weak · gated by D1, D2, R3, X4 ·
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
A03:2025 — Software Supply Chain Failures
31
High / Critical
A05:2025 — Injection
20
High / Critical
A02:2025 — Security Misconfiguration
3
High / Critical
Roadmap
Top priorities: Interpolated log message defeats structured logging; Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; 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 `?`).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with source.rewriteSource (cyclomatic 218), bin.main (cyclomatic 147).
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 18 bodies over 60 down to 60 or less in Cognitive Complexity — start with bin.main (cognitive 271), source.rewriteSource (cognitive 265), bin.main (cognitive 214).
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 34
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 918
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 — 147
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 14
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 63 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 63 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, 1068 of 1099 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 or a scanner, 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.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 1,942 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 19 test source file(s) (.rs, .rb) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for the repository root failed in the analyzer sandbox (Error: ERR_PNPM_PATCH_NOT_FOUND), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (Error: ERR_PNPM_PATCH_NOT_FOUND), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in packages/cli/ was NOT MEASURED: the dependency install for packages/cli/ failed in the analyzer sandbox (Error: ERR_PNPM_PATCH_NOT_FOUND), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in packages/cli/src/__tests__/fixtures/vite-dev-package/ was NOT MEASURED: the dependency install for packages/cli/src/__tests__/fixtures/vite-dev-package/ failed in the analyzer sandbox (Error: ERR_PNPM_PATCH_NOT_FOUND), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in packages/tools/ was NOT MEASURED: the dependency install for packages/tools/ failed in the analyzer sandbox (Error: ERR_PNPM_PATCH_NOT_FOUND), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (packages/prompts/package.json), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `REDACTED`, `.github/scripts/upgrade-deps.ts`, `docs/.vitepress/theme/index.ts`, `ecosystem-ci/clone.ts`, `ecosystem-ci/patch-project.ts`, … (+23 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (the repository): REDACTED has no "dev" script, so `npm run dev` could not start the app. Last output: "npm error Missing script: "dev" / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Rust, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Rust, 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 8 further occurrence(s) are not listed individually; the score already reflects all 48.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 34 further occurrence(s) are not listed individually; the score already reflects all 74.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 145 further occurrence(s) are not listed individually; the score already reflects all 185.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 81 further occurrence(s) are not listed individually; the score already reflects all 121.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
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 checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a 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.
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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
147 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was source.rewriteSource at 218. A further 2 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 vp_cli_snapshots::bin::vpt::main at 31 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/vp_cli_snapshots/src/bin/vpt/main.rs (vp_cli_snapshots::bin::vpt::main at 31). 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.
+ 109 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with source.rewriteSource (cyclomatic 218), bin.main (cyclomatic 147). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 2.7 to about 3.9/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 164 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 18 bodies over 60 down to 60 or less in Cognitive Complexity — start with bin.main (cognitive 271), source.rewriteSource (cognitive 265), bin.main (cognitive 214). — 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 18 together lifts Cognitive Complexity from 2.0 to about 3.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 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.
Resolve the 39 FunctionTooLong finding(s) in God Classes — start with bin.ts (4), vite-plus-bootstrap.ts (3), mod.rs (2). — One of this dimension's main actionable groups (39 warning-level).
Resolve the 25 FileTooLong finding(s) in God Classes — start with bin.ts (2), install.rs (2), import_rewriter.rs. — One of this dimension's main actionable groups (25 warning-level).
Resolve the 1 MethodTooLong finding(s) in God Classes — start with resolver.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
42 duplicated block group(s) detected. 1.4 % of the production lines (1,992 of 145,238) are in a reported copy. A further 46 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .ts (34% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.
+ 45 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with off.rs, dispatch.rs, resolver.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 Edited copy of a member (10 corresponding lines) finding(s) in Code Duplication — start with pack.rs, audit.rs, deprecate.rs. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 5 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with list.rs, package_manager.rs, output.rs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.5 / 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.
21 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 5 module(s) off the main sequence, with abstractness counted on 19 of the 21 (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: @voidzero-dev/vite-plus-core · ×4
Off the main sequence: vp_shared
What to do
Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
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.
Low cohesion: Bun (LCOM4 25) · ×3crates/vp_pm_cli/src/resolution/dialect.rs:25
What to do
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with dialect.rs (3). — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Stronggated by 15 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.
36 skipped (36 with a documented reason), 15 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1942 tests. Measured on the JavaScript/TypeScript suite only — at least 19 test source file(s) (.rs, .rb) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: accepts test config without TS error · ×15packages/cli/src/__tests__/define-config-test-field.spec.ts:6
Mock-dominated test: skips Git-backed hook resolution when hooks are disabled by environmentpackages/cli/src/config/__tests__/bin.spec.ts:29
Resolve the 15 No assertions finding(s) in Test Quality — start with config.spec.ts (7), define-config-test-field.spec.ts (2), oxlint-plugin.spec.ts (2). — One of this dimension's main actionable groups (15 warning-level).
Resolve the 1 Mock-dominated test finding(s) in Test Quality — start with bin.spec.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
12 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: ast-grep-config · ×12
✓ On the Gold path — maintain.
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.
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 749 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 35 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under MIT, 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 REDACTED, 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/cli/src/migration/bin.ts (23×116=2668); packages/cli/src/create/bin.ts (14×185=2590); crates/vp_global_cli/src/self_setup.rs (14×58=812) Repeated repair below the complexity floor: crates/vp_pm_cli/src/package_manager.rs (13 of 23 changes were fixes); packages/cli/binding/src/lib.rs (8 of 11 changes were fixes); crates/vp_pm_cli/src/resolution/commands/add.rs (7 of 9 changes were fixes)
Resolve the 44 Hotspot finding(s) in Churn × Complexity Hotspots — start with bin.ts (3), mod.rs (2), self_setup.rs. — One of this dimension's main actionable groups (44 warning-level).
Resolve the 34 Repeated repair finding(s) in Churn × Complexity Hotspots — start with package_manager.rs (3), lib.rs, add.rs. — One of this dimension's main actionable groups (34 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.2 / 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.
24 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/vp_pm_cli/src/resolution/commands/install.rs. Counted over 309 of the 421 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 · ×2
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.
17 deducted task-comment markers across 145238 LoC (0.0/KLoC) → score 10.0. 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 13 TodoComment finding(s) in Explicit Debt — start with template.ts (3), group.ts, stream.ts. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with bin.ts (2), catalog.ts, shim.rs. — One of this dimension's main actionable groups (4 warning-level).
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.
2 of 2 documentation facets pass in full. 92 document(s) read across 7 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality9.9 / 10Exemplary✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
1 of 48 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
ADR has no Consequences sectionrfcs/windows-installer.md:1detected by adr-integrity
✓ On the Gold path — maintain.
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
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.
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).
20 finding(s): 0 critical, 14 high, 4 medium, 2 low. semgrep hit a parse error in 43 file(s) — `REDACTED` (line 38, line 171), `.github/scripts/test-install-bootstrap.sh` (line 157), `.github/scripts/update-node-release-keys.sh`, `.github/scripts/upgrade-deps.ts` (line 23), `crates/vp_global_cli/src/commands/implode.rs` (line 738, line 751), … (+38 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 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
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 17 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (14), REDACTED (3). — One of this dimension's main actionable groups (17 issue-level).
Resolve the 7 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (7 warning-level).
Resolve the 1 Critical CVE 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 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 309 of the 421 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.
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 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).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
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.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 5 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.
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
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 repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
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.
`# FIXME: skip format for now, will re-enable after prettier migration support` invokes prettier in the mode that REWRITES the files it reformats and exits 0 whatever it changed. The rewrite happens inside the runner's throwaway checkout and is then discarded, so the step passes on a badly-formatted change exactly as it passes on a clean one — it enforces nothing, and no other step in this file reads the result. `--check` is the flag that turns the same invocation into a gate: it leaves the files alone and exits non-zero when anything would have been reformatted. — .github/workflows/reusable-ecosystem-ci.yml:183
What to do
Add `--check` to the prettier step in `.github/workflows/reusable-ecosystem-ci.yml` so a change that is not formatted fails CI, instead of being silently reformatted into a checkout that is thrown away — or, if reformatting the branch is the intent, commit the result back so the fix reaches the repository.
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's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability6.1 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 10/14 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/vp_cli_snapshots`, `crates/vp_installer`, `crates/vp_trampoline`, `packages/cli/templates/generator`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
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 each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`fs.existsSync` in `resolveProjectSetup` 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/cli/src/create/bin.ts:781
`fs.existsSync` in `main` 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/cli/src/create/bin.ts:1186
`fs.existsSync` in `installAndMigrate` 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/cli/src/create/bin.ts:1214
`fs.writeFileSync` in `installAndMigrate` 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/cli/src/create/bin.ts:1215
`fs.existsSync` in `extractTarballTo` 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/cli/src/create/org-tarball.ts:244
`fs.existsSync` in `ensureOrgPackageExtracted` 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/cli/src/create/org-tarball.ts:306
`fs.lstatSync` in `checkProjectDirExists` 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/cli/src/create/prompts.ts:128
`fs.chmodSync` in `executeGeneratorScaffold` 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/cli/src/create/templates/generator.ts:42
`fs.existsSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:60, packages/cli/src/create/templates/monorepo.ts:70, packages/cli/src/create/templates/monorepo.ts:81, …
`fs.unlinkSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:61, packages/cli/src/create/templates/monorepo.ts:71, packages/cli/src/create/templates/monorepo.ts:82, …
`fs.rmSync` in `applyToolInitConfigToViteConfig` 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/cli/src/init-config.ts:213, packages/cli/src/init-config.ts:243, packages/cli/src/init-config.ts:245, …
`fs.writeFileSync` in `applyToolInitConfigToViteConfig` 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) — packages/cli/src/init-config.ts:235, packages/cli/src/init-config.ts:242, packages/cli/src/init-config.ts:272
`fs.existsSync` in `migrateEslintToOxlint` 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/cli/src/migration/migrator/eslint.ts:297
`fs.writeFileSync` in `migratePrettierToOxfmt` 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/cli/src/migration/migrator/prettier.ts:123
`fs.unlinkSync` in `migratePrettierToOxfmt` 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/cli/src/migration/migrator/prettier.ts:145
`fs.existsSync` in `migratePrettierToOxfmt` 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/cli/src/migration/migrator/prettier.ts:173
`fs.existsSync` in `migrateTsupToTsdown` 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/cli/src/migration/migrator/tsup.ts:549
`fs.existsSync` in `collectToolchainVersionChanges` 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/cli/src/migration/migrator/vite-plus-bootstrap.ts:1371
`existsSync` in `vite` 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/cli/src/resolve-vite.ts:44
`fs.lstatSync` in `classifyExistingAgentTarget` 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/cli/src/utils/agent.ts:340
`fs.existsSync` in `detectAgentConflicts` 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/cli/src/utils/agent.ts:375, packages/cli/src/utils/agent.ts:396
`fs.existsSync` in `writeAgentInstructions` 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/cli/src/utils/agent.ts:435, packages/cli/src/utils/agent.ts:458
`fs.existsSync` in `writeCopilotSetupWorkflow` 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/cli/src/utils/agent.ts:553
`fs.existsSync` in `getExistingPathKind` 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/cli/src/utils/agent.ts:657
`fs.existsSync` in `writeEditorConfig` 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/cli/src/utils/editor.ts:403
`fs.existsSync` in `detectWorkspace` 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/cli/src/utils/workspace.ts:70, packages/cli/src/utils/workspace.ts:75
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 Safety9.9 / 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 — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
packages/cli/src/migration/migrator/prettier.ts:184 · packages/cli/src/migration/migrator/tsup.ts:569 — the two spans are one implementation copied and then locally edited — 509 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/cli/src/migration/migrator/prettier.ts:184
packages/cli/src/migration/migrator/catalog.ts:1254 · packages/cli/src/migration/migrator/orchestrators.ts:163 — the two spans are one implementation copied and then locally edited — 290 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/cli/src/migration/migrator/catalog.ts:1254
packages/cli/src/migration/detector.ts:166 · packages/cli/src/migration/detector.ts: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. — packages/cli/src/migration/detector.ts:166
packages/prompts/src/group-multi-select.ts:126 · packages/prompts/src/multi-select.ts:112 — the two spans are one implementation copied and then locally edited — 262 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/prompts/src/group-multi-select.ts:126
packages/prompts/src/autocomplete.ts:171 · packages/prompts/src/autocomplete.ts:392 — the two spans are one implementation copied and then locally edited — 205 tokens are still identical, in the same order in both spans, 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/prompts/src/autocomplete.ts:171
packages/prompts/src/confirm.ts:16 · packages/prompts/src/text.ts:15 — the two spans are one implementation copied and then locally edited — 265 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/prompts/src/confirm.ts:16
packages/cli/src/migration/migrator/package-json.ts:246 · packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:364 — 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/cli/src/migration/migrator/package-json.ts:246
packages/cli/src/migration/migrator/eslint.ts:94 · packages/cli/src/migration/migrator/prettier.ts:23 — 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/cli/src/migration/migrator/eslint.ts:94
packages/cli/src/migration/migrator/oxnode.ts:170 · packages/cli/src/migration/migrator/ts-node.ts:189 — 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/cli/src/migration/migrator/oxnode.ts:170
packages/cli/src/migration/bin.ts:757 · packages/cli/src/migration/bin.ts:1116 — both copies are in the same file, so extract the 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/cli/src/migration/bin.ts:757
packages/cli/src/create/bin.ts:801 · packages/cli/src/migration/bin.ts:760 · packages/cli/src/migration/bin.ts:1121 — 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/cli/src/create/bin.ts:801
REDACTED:163 · REDACTED:817 — the two spans are one implementation copied and then locally edited — 93 tokens are still identical, in the same order in both spans, 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. — REDACTED:163
packages/cli/src/migration/migrator/eslint.ts:480 · packages/cli/src/migration/migrator/prettier.ts:255 — 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/cli/src/migration/migrator/eslint.ts:480
packages/cli/src/utils/agent.ts:371 · packages/cli/src/utils/agent.ts:431 — the two spans are one implementation copied and then locally edited — 92 tokens are still identical, in the same order in both spans, 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/cli/src/utils/agent.ts:371
packages/cli/src/create/templates/monorepo.ts:103 · packages/cli/src/create/templates/monorepo.ts:138 — 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/cli/src/create/templates/monorepo.ts:103
packages/cli/src/utils/editor.ts:180 · packages/cli/src/utils/editor.ts:234 — the two spans are one implementation copied and then locally edited — 90 tokens are still identical, in the same order in both spans, 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/cli/src/utils/editor.ts:180
packages/cli/src/migration/migrator/orchestrators.ts:631 · packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:1173 — 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/cli/src/migration/migrator/orchestrators.ts:631
packages/prompts/src/common.ts:114 · packages/prompts/src/common.ts:132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/prompts/src/common.ts:114
packages/cli/src/migration/migrator/source-scan.ts:214 · packages/cli/src/migration/migrator/source-scan.ts:281 — the two spans are one implementation copied and then locally edited — 113 tokens are still identical, in the same order in both spans, 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/cli/src/migration/migrator/source-scan.ts:214
packages/cli/src/init-config.ts:236 · packages/cli/src/init-config.ts:265 — the two spans are one implementation copied and then locally edited — 81 tokens are still identical, in the same order in both spans, 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/cli/src/init-config.ts:236
packages/tools/src/registry-cache.ts:139 · packages/tools/src/registry-cache.ts:168 — 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/tools/src/registry-cache.ts:139
packages/cli/build.ts:1309 · packages/cli/build.ts:1343 — both copies are in the same file, so extract the 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/cli/build.ts:1309
packages/cli/src/migration/migrator/tsconfig.ts:13 · packages/cli/src/migration/migrator/tsconfig.ts:38 — the two spans are one implementation copied and then locally edited — 64 tokens are still identical, in the same order in both spans, 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/cli/src/migration/migrator/tsconfig.ts:13
packages/cli/src/migration/migrator/tsup.ts:435 · packages/cli/src/migration/migrator/tsup.ts:449 — 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/cli/src/migration/migrator/tsup.ts:435
packages/prompts/src/select-key.ts:56 · packages/prompts/src/select.ts:135 — the 2 copies are spread across 2 files, 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/prompts/src/select-key.ts:56
ecosystem-ci/patch-project.ts:168 · ecosystem-ci/patch-project.ts:197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — ecosystem-ci/patch-project.ts:168
packages/cli/build.ts:1401 · packages/core/build.ts:794 — 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/cli/build.ts:1401
packages/cli/src/define-config.ts:959 · packages/cli/src/define-config.ts:991 — the two spans are one implementation copied and then locally edited — 58 tokens are still identical, in the same order in both spans, 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/cli/src/define-config.ts:959
packages/core/build-support/find-create-require.ts:102 · packages/core/build-support/find-create-require.ts:144 — both copies are in the same file, so extract the 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/core/build-support/find-create-require.ts:102
packages/cli/src/create/templates/builtin.ts:41 · packages/cli/src/create/templates/builtin.ts:70 — both copies are in the same file, so extract the 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/cli/src/create/templates/builtin.ts:41
packages/cli/src/migration/vitest-v5/config.ts:550 · packages/cli/src/migration/vitest-v5/config.ts:563 — both copies are in the same file, so extract the 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/cli/src/migration/vitest-v5/config.ts:550
packages/cli/src/utils/tsconfig.ts:199 · packages/cli/src/utils/tsconfig.ts:220 — 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/cli/src/utils/tsconfig.ts:199
packages/cli/src/migration/migrator/catalog.ts:739 · packages/cli/src/migration/migrator/catalog.ts:750 · packages/cli/src/migration/migrator/catalog.ts:1374 — all 3 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/cli/src/migration/migrator/catalog.ts:739
packages/cli/src/migration/migrator/eslint.ts:351 · packages/cli/src/migration/migrator/prettier.ts:191 · packages/cli/src/migration/migrator/prettier.ts:208 — 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/cli/src/migration/migrator/eslint.ts:351
packages/cli/src/migration/setup-plan.ts:104 · packages/cli/src/migration/setup-plan.ts:153 — 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/cli/src/migration/setup-plan.ts:104
packages/cli/src/script-hooks.ts:70 · packages/cli/src/script-hooks.ts:94 — the two spans are one implementation copied and then locally edited — 60 tokens are still identical, in the same order in both spans, 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/cli/src/script-hooks.ts:70
REDACTED:252 · REDACTED:334 — 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. — REDACTED:252
packages/cli/src/migration/bin.ts:590 · packages/cli/src/migration/bin.ts:600 · packages/cli/src/migration/bin.ts:625 — all 3 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/cli/src/migration/bin.ts:590
packages/cli/src/migration/migrator/package-json.ts:95 · packages/cli/src/migration/migrator/vitest-ecosystem.ts:735 — the two spans are one implementation copied and then locally edited — 71 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/cli/src/migration/migrator/package-json.ts:95
packages/cli/src/migration/migrator/prettier.ts:69 · packages/cli/src/utils/git.ts:26 — the two spans are one implementation copied and then locally edited — 55 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/cli/src/migration/migrator/prettier.ts:69
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.
ecosystem-ci/patch-project.ts:6 reaches into another package with a relative path (../packages/cli/src/utils/constants.ts) — import the package by name instead. — ecosystem-ci/patch-project.ts:6
ecosystem-ci/patch-project.ts:10 reaches into another package with a relative path (../packages/core/package.json) — import the package by name instead. — ecosystem-ci/patch-project.ts:10
packages/cli/build.ts:33 reaches into another package with a relative path (../core/package.json) — import the package by name instead. — packages/cli/build.ts:33
packages/cli/src/create/bin.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/bin.ts:5
packages/cli/src/create/org-picker.ts:3 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/org-picker.ts:3
packages/cli/src/create/org-resolve.ts:1 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/org-resolve.ts:1
packages/cli/src/create/prompts.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/prompts.ts:4
packages/cli/src/create/register-template.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/register-template.ts:6
packages/cli/src/create/templates/builtin.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/templates/builtin.ts:4
packages/cli/src/create/templates/generator.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/templates/generator.ts:4
packages/cli/src/create/templates/monorepo.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/templates/monorepo.ts:5
packages/cli/src/create/templates/remote.ts:1 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/create/templates/remote.ts:1
packages/cli/src/migration/bin.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/bin.ts:5
packages/cli/src/migration/migrator/eslint.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/eslint.ts:6
packages/cli/src/migration/migrator/git-hooks.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/git-hooks.ts:4
packages/cli/src/migration/migrator/oxnode.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/oxnode.ts:6
packages/cli/src/migration/migrator/prettier.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/prettier.ts:5
packages/cli/src/migration/migrator/setup.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/setup.ts:4
packages/cli/src/migration/migrator/shared.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/shared.ts:4
packages/cli/src/migration/migrator/ts-node.ts:7 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/ts-node.ts:7
packages/cli/src/migration/migrator/tsconfig.ts:1 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/tsconfig.ts:1
packages/cli/src/migration/migrator/tsup.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/tsup.ts:5
packages/cli/src/migration/migrator/tsx.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/migrator/tsx.ts:6
REDACTED:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — REDACTED:5
packages/cli/src/migration/setup-plan.ts:3 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/migration/setup-plan.ts:3
packages/cli/src/utils/agent.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/utils/agent.ts:6
packages/cli/src/utils/approve-builds.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/utils/approve-builds.ts:4
packages/cli/src/utils/constants.ts:3 reaches into another package with a relative path (../../../core/package.json) — import the package by name instead. — packages/cli/src/utils/constants.ts:3
packages/cli/src/utils/editor.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/utils/editor.ts:6
packages/cli/src/utils/git.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/utils/git.ts:4
packages/cli/src/utils/prompts.ts:1 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/utils/prompts.ts:1
packages/cli/src/utils/spinner.ts:1 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/utils/spinner.ts:1
packages/cli/src/utils/tsconfig.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/cli/src/utils/tsconfig.ts:5
packages/core/build.ts:21 reaches into another package with a relative path (../cli/package.json) — import the package by name instead. — packages/core/build.ts:21
packages/core/build.ts:22 reaches into another package with a relative path (../tools/src/patch-vite-config.ts) — import the package by name instead. — packages/core/build.ts:22
packages/tools/src/__tests__/sync-remote-deps.spec.ts:10 reaches past another workspace package's public entry into its internals with a relative path (../../../cli/src/utils/constants.ts) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/tools/src/__tests__/sync-remote-deps.spec.ts:10
packages/tools/src/core-version.ts:287 reaches into another package with a relative path (../../core/package.json) — import the package by name instead. — packages/tools/src/core-version.ts:287
packages/tools/src/core-version.ts:381 reaches into another package with a relative path (../../cli/package.json) — import the package by name instead. — packages/tools/src/core-version.ts:381
What to do
Fix the listed violations: move the shared test helper into a source directory production code may depend on (29 rows); import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (9 rows).
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.
main has cyclomatic complexity 158 and cognitive complexity 246; 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/cli/src/create/bin.ts:311
CallExpression has cyclomatic complexity 131 and cognitive complexity 174; 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/cli/src/migration/vitest-v5/source.ts:698
main has cyclomatic complexity 114 and cognitive complexity 210; 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/cli/src/migration/bin.ts:1046
walk has cyclomatic complexity 102 and cognitive complexity 137; 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/cli/src/migration/vitest-v5/scopes.ts:392
prepareTsNodeRun has cyclomatic complexity 86 and cognitive complexity 132; 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/cli/src/migration/migrator/ts-node-config.ts:197
rewritePackageJson has cyclomatic complexity 81 and cognitive complexity 112; 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/cli/src/migration/migrator/package-json.ts:39
testOptions has cyclomatic complexity 55 and cognitive complexity 83; 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/cli/src/migration/vitest-v5/config.ts:321
(anonymous) has cyclomatic complexity 46 and cognitive complexity 41; 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/cli/src/migration/vitest-v5/scopes.ts:692
globalRestorationOrigin has cyclomatic complexity 40 and cognitive complexity 40; 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/cli/src/migration/vitest-v5/source.ts:119
lockedVitestVersion has cyclomatic complexity 38 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/cli/src/migration/vitest-v5/lockfile.ts:79
detectVitePlusBootstrapPending has cyclomatic complexity 38 and cognitive complexity 44; 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/cli/src/migration/migrator/vite-plus-bootstrap.ts:617
mergePnpmWorkspaces has cyclomatic complexity 35 and cognitive complexity 55; 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. — REDACTED:596
scanOptions has cyclomatic complexity 34 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. — packages/cli/src/migration/migrator/script-runner.ts:775
showMigrationSummary has cyclomatic complexity 34 and cognitive complexity 43; 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/cli/src/migration/bin.ts:506
ensureVitePlusBootstrap has cyclomatic complexity 33 and cognitive complexity 38; 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/cli/src/migration/migrator/vite-plus-bootstrap.ts:945
opt has cyclomatic complexity 33 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/prompts/src/group-multi-select.ts:54
rewriteSegment has cyclomatic complexity 32 and cognitive complexity 38; 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/cli/src/migration/migrator/script-runner.ts:223
migrateBenchmarkOutput has cyclomatic complexity 32 and cognitive complexity 37; 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/cli/src/migration/vitest-v5/commands.ts:37
overrideMap has cyclomatic complexity 31 and cognitive complexity 47; 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/cli/src/migration/vitest-v5/webdriverio.ts:298
scanAndRewriteFile has cyclomatic complexity 31 and cognitive complexity 41; 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/cli/src/migration/migrator/vitest-v5.ts:528
generateLicenseFile has cyclomatic complexity 30 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/generate-license.ts:66
(anonymous) has cyclomatic complexity 30 and cognitive complexity 48; 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/cli/src/migration/migrator/catalog.ts:329
resolveStorybookScope has cyclomatic complexity 29 and cognitive complexity 34; 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/cli/src/migration/vitest-v5/storybook.ts:121
migrateWebdriverioDependencies has cyclomatic complexity 28 and cognitive complexity 63; 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/cli/src/migration/vitest-v5/webdriverio.ts:63
environmentFileUse has cyclomatic complexity 28 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. — packages/cli/src/migration/migrator/script-runner.ts:1195
reconcileVitePlusBootstrapPackage has cyclomatic complexity 28 and cognitive complexity 47; 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/cli/src/migration/migrator/vite-plus-bootstrap.ts:304
detectConfigs has cyclomatic complexity 28 and cognitive complexity 40; 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/cli/src/migration/detector.ts:163
(anonymous) has cyclomatic complexity 28 and cognitive complexity 39; 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. — REDACTED:607
configPath has cyclomatic complexity 28 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 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/cli/src/migration/vitest-v5/storybook.ts:52
mergeSemverVersions has cyclomatic complexity 27 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. — REDACTED:463
writeAgentInstructions has cyclomatic complexity 26 and cognitive complexity 61; 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/cli/src/utils/agent.ts:414
sanitizeMigratedOxlintConfig has cyclomatic complexity 26 and cognitive complexity 60; 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/cli/src/migration/migrator/eslint.ts:855
syncTestPackageExports has cyclomatic complexity 26 and cognitive complexity 52; 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/cli/build.ts:344
createConditionalShim has cyclomatic complexity 26 and cognitive complexity 44; 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/cli/build.ts:1280
(anonymous) has cyclomatic complexity 26 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/cli/src/migration/migrator/orchestrators.ts:152
ImportDeclaration has cyclomatic complexity 26 and cognitive complexity 36; 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/cli/src/migration/vitest-v5/source.ts:596
executeMigrationPlan has cyclomatic complexity 26 and cognitive complexity 32; 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/cli/src/migration/bin.ts:741
isAssertionBindingHandled has cyclomatic complexity 26 and cognitive complexity 24; 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/cli/src/migration/vitest-v5/source.ts:397
writeEditorConfig has cyclomatic complexity 25 and cognitive complexity 63; 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/cli/src/utils/editor.ts:368
render has cyclomatic complexity 25 and cognitive complexity 45; 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/prompts/src/autocomplete.ts:126
Do you agree with this assessment?
R3 · Large Files2.1 / 10Critical✓ 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/cli/src/migration/bin.ts has 1654 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/cli/src/migration/bin.ts:1
packages/cli/src/migration/migrator/catalog.ts has 1458 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/cli/src/migration/migrator/catalog.ts:1
packages/cli/src/migration/migrator/vite-plus-bootstrap.ts has 1378 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/cli/src/migration/migrator/vite-plus-bootstrap.ts:1
packages/cli/src/migration/migrator/script-runner.ts has 1353 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/cli/src/migration/migrator/script-runner.ts:1
packages/cli/src/create/bin.ts has 1339 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/cli/src/create/bin.ts:1
packages/cli/build.ts has 1287 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/cli/build.ts:1
packages/cli/src/migration/vitest-v5/source.ts has 1189 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/cli/src/migration/vitest-v5/source.ts:1
packages/cli/src/help.ts has 1146 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/cli/src/help.ts:1
packages/cli/src/define-config.ts has 1080 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/cli/src/define-config.ts:1
packages/cli/src/migration/migrator/eslint.ts has 1063 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/cli/src/migration/migrator/eslint.ts:1
packages/cli/src/migration/migrator/vitest-v5.ts has 1024 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/cli/src/migration/migrator/vitest-v5.ts:1
REDACTED has 948 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 902 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/cli/src/migration/migrator/vitest-ecosystem.ts has 778 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/cli/src/migration/migrator/vitest-ecosystem.ts:1
REDACTED has 773 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/cli/src/migration/vitest-v5/scopes.ts has 769 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/cli/src/migration/vitest-v5/scopes.ts:1
packages/core/build.ts has 742 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/core/build.ts:1
packages/cli/src/config/hooks.ts has 739 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/cli/src/config/hooks.ts:1
packages/cli/src/migration/migrator/tsup.ts has 657 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/cli/src/migration/migrator/tsup.ts:1
packages/cli/src/migration/migrator/orchestrators.ts has 650 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/cli/src/migration/migrator/orchestrators.ts:1
packages/cli/src/migration/vitest-v5/config.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/cli/src/migration/vitest-v5/config.ts:1
packages/cli/src/utils/agent.ts has 608 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/cli/src/utils/agent.ts:1
packages/cli/src/utils/approve-builds.ts has 606 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/cli/src/utils/approve-builds.ts:1
packages/cli/src/utils/editor.ts has 602 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/cli/src/utils/editor.ts:1
packages/cli/src/migration/vitest-v5/ast.ts has 547 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/cli/src/migration/vitest-v5/ast.ts:1
packages/cli/src/vpx-script.ts has 504 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/cli/src/vpx-script.ts:1
packages/cli/src/migration/migrator/git-hooks.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/cli/src/migration/migrator/git-hooks.ts:1
packages/cli/src/migration/migrator/source-scan.ts has 478 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/cli/src/migration/migrator/source-scan.ts:1
packages/cli/src/oxlint-plugin.ts has 463 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/cli/src/oxlint-plugin.ts:1
packages/cli/src/migration/migrator/oxlint-config.ts has 456 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/cli/src/migration/migrator/oxlint-config.ts:1
scripts/generate-license.ts has 456 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — scripts/generate-license.ts:1
packages/cli/src/migration/migrator/package-json.ts has 443 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/cli/src/migration/migrator/package-json.ts:1
packages/cli/src/sync-versions/plan.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/cli/src/sync-versions/plan.ts:1
packages/cli/src/migration/migrator/ts-node-config.ts has 433 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/cli/src/migration/migrator/ts-node-config.ts:1
packages/cli/src/migration/migrator/yarn.ts has 428 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/cli/src/migration/migrator/yarn.ts:1
packages/cli/src/migration/migrator/shared.ts has 419 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/cli/src/migration/migrator/shared.ts:1
packages/tools/src/install-global-cli.ts has 411 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/tools/src/install-global-cli.ts:1
packages/prompts/src/autocomplete.ts has 409 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/prompts/src/autocomplete.ts:1
packages/cli/src/migration/migrator/tsx.ts has 408 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/cli/src/migration/migrator/tsx.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.8 / 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.
crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/custom-app.ts:1 imports './milestone', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/custom-app.ts:1
crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/root-no-index.ts:1 imports './milestone', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/root-no-index.ts:1
crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_user_agent/local-only.mjs:7 imports './bin/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_user_agent/local-only.mjs:7
crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_vpx_script/watch/later/main.ts:1 imports './later.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_vpx_script/watch/later/main.ts:1
crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/verify-in-source.mjs:6 imports './src/add.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/verify-in-source.mjs:6
crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/new_vite_monorepo/degit-fixture/cli.mjs:12 imports './template/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/new_vite_monorepo/degit-fixture/cli.mjs:12
packages/tools/src/__tests__/local-npm-registry.spec.ts:61 imports '../../../../crates/vp_cli_snapshots/tests/cli_snapshots/registry', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — packages/tools/src/__tests__/local-npm-registry.spec.ts:61
packages/tools/src/__tests__/record-snapshot-registry.spec.ts:24 imports '../../../../crates/vp_cli_snapshots/tests/cli_snapshots/registry', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — packages/tools/src/__tests__/record-snapshot-registry.spec.ts:24
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. (×21) — packages/cli/build.ts:1, packages/core/build.ts:1, ecosystem-ci/patch-project.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
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 REDACTED 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: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
This repository declares test tooling, and the ✓ above records that declaration — but crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/custom-app.ts and 7 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/custom-app.ts:1
Do you agree with this assessment?
R7 · Dead Code9.7 / 10Exemplary✓ 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.
247 file(s) (~83261 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: packages/cli/src/script-preload.ts imports '../../../oxc-node/packages/core/signal-ack.mjs', 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. — packages/cli
1 file(s) (~7 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/cli/templates/monorepo
11 file(s) (~2185 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: packages/core/build.ts imports '../../vite/packages/vite/rolldown.config.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. — packages/core
Unreachable from the 285 application, 289 tooling and 939 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (285 application, 289 tooling, 939 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×3) — ecosystem-ci/patch-project.ts, ecosystem-ci/verify-install.ts, ecosystem-ci/verify-videojs-v10.ts
no import path from any entry point (285 application, 289 tooling, 939 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (ecosystem-ci/patch-project.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — ecosystem-ci/webdriverio.ts, ecosystem-ci/npmx.ts
Nothing ultimately consumes this binding: its only referrer is the re-export in packages/cli/src/migration/migrator.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/cli/src/migration/migrator.ts in the same commit, or the barrel will import a name that no longer exists. — packages/cli/src/migration/migrator/core-finalization.ts:67
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.
Declared in the root REDACTED 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.
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/cli/src/migration/migrator.ts → packages/cli/src/migration/migrator/catalog.ts → packages/cli/src/migration/migrator.ts (one verified cycle inside a mutually-dependent group of 19 files) — packages/cli/src/migration/migrator.ts:14
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
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 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 2/4 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) 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.
`npmLastWeekDownloads` 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 })`. — docs/.vitepress/theme/data/fetch-trusted-stack-stats.ts:60
`fetchGithubStargazers` 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 })`. — docs/.vitepress/theme/data/fetch-trusted-stack-stats.ts:81
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.
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.
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 `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`debug!` at line 261 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`. — packages/cli/binding/src/lib.rs:261
`error!` at line 266 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`. — packages/cli/binding/src/lib.rs:266
`debug!` at line 94 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`. — packages/cli/binding/src/utils.rs:94
`debug!` at line 171 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`. — packages/cli/binding/src/cli/handler.rs:171
`debug!` at line 180 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`. — packages/cli/binding/src/cli/handler.rs:180
`error!` at line 200 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`. — packages/cli/binding/src/cli/handler.rs:200
`error!` at line 67 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`. — packages/cli/binding/src/cli/resolver.rs:67
`debug!` at line 213 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/vp_shared/src/http.rs:213
`warn!` at line 279 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/vp_setup/src/install.rs:279
`debug!` at line 404 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/vp_setup/src/install.rs:404
`debug!` at line 609 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/vp_setup/src/install.rs:609
`debug!` at line 655 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/vp_setup/src/install.rs:655
`debug!` at line 704 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/vp_setup/src/install.rs:704
`debug!` at line 729 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/vp_setup/src/install.rs:729
`warn!` at line 765 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/vp_setup/src/install.rs:765
`warn!` at line 781 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/vp_setup/src/install.rs:781
`debug!` at line 863 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/vp_setup/src/install.rs:863
`debug!` at line 866 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/vp_setup/src/install.rs:866
`warn!` at line 870 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/vp_setup/src/install.rs:870
`debug!` at line 908 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/vp_setup/src/install.rs:908
`warn!` at line 910 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/vp_setup/src/install.rs:910
`debug!` at line 934 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/vp_setup/src/install.rs:934
`warn!` at line 983 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/vp_setup/src/install.rs:983
`debug!` at line 132 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/vp_setup/src/registry.rs:132
`debug!` at line 158 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/vp_setup/src/registry.rs:158
`debug!` at line 85 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/vp_pm_cli/src/lifecycle_env.rs:85
`debug!` at line 296 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/vp_pm_cli/src/package_manager.rs:296
`warn!` at line 1327 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/vp_pm_cli/src/package_manager.rs:1327
`debug!` at line 1567 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/vp_pm_cli/src/package_manager.rs:1567
`debug!` at line 1799 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/vp_pm_cli/src/package_manager.rs:1799
`debug!` at line 1803 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/vp_pm_cli/src/package_manager.rs:1803
`debug!` at line 1812 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/vp_pm_cli/src/package_manager.rs:1812
`debug!` at line 1816 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/vp_pm_cli/src/package_manager.rs:1816
`debug!` at line 2025 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/vp_pm_cli/src/package_manager.rs:2025
`debug!` at line 2028 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/vp_pm_cli/src/package_manager.rs:2028
`debug!` at line 2233 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/vp_pm_cli/src/package_manager.rs:2233
`debug!` at line 2236 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/vp_pm_cli/src/package_manager.rs:2236
`error!` at line 2269 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/vp_pm_cli/src/package_manager.rs:2269
`debug!` at line 176 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/vp_pm_cli/src/request.rs:176
`debug!` at line 253 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/vp_pm_cli/src/request.rs:253
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.
13/49 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.
~0.7 `!` null assertions per 1k TypeScript source lines — 38 assertion(s) across the 51722 source line(s) of the 208 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/cli/src/migration/vitest-v5/scopes.ts (6), packages/cli/src/migration/migrator/script-runner.ts (4), packages/cli/src/migration/vitest-v5/benchmarks.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
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?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 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.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
X10 Duplicated predicate — 20 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 7 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 — 62 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Ruby imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — AX6 reached only 35% of this repository's production lines — rust (95,980 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (the repository): REDACTED has no "dev" script, so `npm run dev` could not start the app. Last output: "npm error Missing script: "dev" / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 3 candidate(s) found and not reported.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — None of 10 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
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) — 28 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (18 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
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Ruby, Rust source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — No web surface: 247 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X12 Unreachable branch — X12 reached only 35% of this repository's production lines — rust (95,980 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — X13 reached only 35% of this repository's production lines — rust (95,980 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 35% of this repository's production lines — rust (95,980 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — X17 reached only 35% of this repository's production lines — rust (95,980 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — X19 reached only 35% of this repository's production lines — rust (95,980 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — X3 reached only 35% of this repository's production lines — rust (95,980 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
vp_global_cli::commands::global::install::install (cognitive 130) crates/vp_global_cli/src/commands/global/install.rs:130— vp_global_cli::commands::global::install::install has cognitive complexity 130 (threshold 15). Drivers by points: if/else 40 (92 pts), match/switch 11 (22 pts), loops 8 (15 pts), boolean chains 1 (nesting depth added 70). 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.
vp_global_cli::self_setup::run (cognitive 88) crates/vp_global_cli/src/self_setup.rs:193— vp_global_cli::self_setup::run has cognitive complexity 88 (threshold 15). Drivers by points: if/else 49 (64 pts), boolean chains 18, match/switch 2 (6 pts) (nesting depth added 19). 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.
vp_global_cli::run (cognitive 69) crates/vp_global_cli/src/main.rs:360— vp_global_cli::run has cognitive complexity 69 (threshold 15). Drivers by points: if/else 29 (50 pts), match/switch 6 (10 pts), boolean chains 7, 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.
vp_global_cli::commands::env::use::execute (cognitive 68) crates/vp_global_cli/src/commands/env/use.rs:96— vp_global_cli::commands::env::use::execute has cognitive complexity 68 (threshold 15). Drivers by points: if/else 31 (42 pts), loops 6 (16 pts), boolean chains 6, 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.
vp_global_cli::cli::managed_update (cognitive 65) crates/vp_global_cli/src/cli.rs:862— vp_global_cli::cli::managed_update has cognitive complexity 65 (threshold 15). Drivers by points: if/else 26 (55 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
vp_global_cli::shim::dispatch::check_npm_global_install_result (cognitive 58) crates/vp_global_cli/src/shim/dispatch.rs:217— vp_global_cli::shim::dispatch::check_npm_global_install_result has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (47 pts), boolean chains 5, loops 3 (5 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.
vp_global_cli::commands::env::doctor::collect_dev_engines_findings (cognitive 50) crates/vp_global_cli/src/commands/env/doctor.rs:1054— vp_global_cli::commands::env::doctor::collect_dev_engines_findings has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 8, loops 4 (7 pts), match/switch 2 (3 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.
vp_global_cli::commands::env::setup::print_path_instructions (cognitive 41) crates/vp_global_cli/src/commands/env/setup.rs:1560— vp_global_cli::commands::env::setup::print_path_instructions has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (26 pts), match/switch 4 (10 pts), boolean chains 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::commands::vpx::execute_vpx (cognitive 39) crates/vp_global_cli/src/commands/vpx.rs:77— vp_global_cli::commands::vpx::execute_vpx has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 6 (11 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::commands::upgrade::execute (cognitive 38) crates/vp_global_cli/src/commands/upgrade/mod.rs:38— vp_global_cli::commands::upgrade::execute has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::shim::dispatch::remove_npm_global_uninstall_links (cognitive 34) crates/vp_global_cli/src/shim/dispatch.rs:522— vp_global_cli::shim::dispatch::remove_npm_global_uninstall_links has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 4 (9 pts), loops 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.
vp_global_cli::self_setup::shell::configure (cognitive 33) crates/vp_global_cli/src/self_setup/shell.rs:15— vp_global_cli::self_setup::shell::configure has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 4 (9 pts), boolean chains 4, 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.
vp_global_cli::shim::dispatch::dispatch (cognitive 31) crates/vp_global_cli/src/shim/dispatch.rs:860— vp_global_cli::shim::dispatch::dispatch has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (23 pts), match/switch 4 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::command_picker::render_picker (cognitive 30) crates/vp_global_cli/src/command_picker.rs:282— vp_global_cli::command_picker::render_picker has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (29 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.
vp_global_cli::command_picker::run_picker (cognitive 29) crates/vp_global_cli/src/command_picker.rs:144— vp_global_cli::command_picker::run_picker has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 4 (9 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::commands::env::list_remote::execute (cognitive 29) crates/vp_global_cli/src/commands/env/list_remote.rs:54— vp_global_cli::commands::env::list_remote::execute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 3 (7 pts), match/switch 2 (4 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
vp_global_cli::commands::env::current::resolve_package_manager_info (cognitive 27) crates/vp_global_cli/src/commands/env/current.rs:166— vp_global_cli::commands::env::current::resolve_package_manager_info has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::commands::global::install::stale_installation_dirs (cognitive 27) crates/vp_global_cli/src/commands/global/install.rs:982— vp_global_cli::commands::global::install::stale_installation_dirs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::commands::env::pin::pin_package_manager (cognitive 26) crates/vp_global_cli/src/commands/env/pin.rs:806— vp_global_cli::commands::env::pin::pin_package_manager has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::help::strip_ansi (cognitive 26) crates/vp_global_cli/src/help.rs:142— vp_global_cli::help::strip_ansi has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (9 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_global_cli::self_setup::maybe_run (cognitive 25) crates/vp_global_cli/src/self_setup.rs:21— vp_global_cli::self_setup::maybe_run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 7 (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.
vp_global_cli::commands::env::default::show_default (cognitive 24) crates/vp_global_cli/src/commands/env/default.rs:78— vp_global_cli::commands::env::default::show_default has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (8 pts), loops 1 (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.
vp_global_cli::commands::env::exec::execute_with_version (cognitive 24) crates/vp_global_cli/src/commands/env/exec.rs:142— vp_global_cli::commands::env::exec::execute_with_version has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
vp_global_cli::commands::env::list::execute (cognitive 24) crates/vp_global_cli/src/commands/env/list.rs:48— vp_global_cli::commands::env::list::execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (4 pts), boolean chains 2, match/switch 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.
vp_global_cli::commands::global::outdated::get_outdated_packages (cognitive 24) crates/vp_global_cli/src/commands/global/outdated.rs:116— vp_global_cli::commands::global::outdated::get_outdated_packages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Hotspot: packages/cli/src/migration/bin.ts packages/cli/src/migration/bin.ts:1046— packages/cli/src/migration/bin.ts changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in bin.main at line 1046. 9 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/migration/bin.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: packages/cli/src/create/bin.ts packages/cli/src/create/bin.ts:311— packages/cli/src/create/bin.ts changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 185 in bin.main at line 311. 7 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/create/bin.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/vp_global_cli/src/self_setup.rs crates/vp_global_cli/src/self_setup.rs:193— crates/vp_global_cli/src/self_setup.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in vp_global_cli::self_setup::run at line 193. 5 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/self_setup.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/vp_global_cli/src/commands/global/install.rs crates/vp_global_cli/src/commands/global/install.rs:130— crates/vp_global_cli/src/commands/global/install.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in vp_global_cli::commands::global::install::install at line 130. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/global/install.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/vp_global_cli/src/commands/env/setup.rs crates/vp_global_cli/src/commands/env/setup.rs:1560— crates/vp_global_cli/src/commands/env/setup.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in vp_global_cli::commands::env::setup::print_path_instructions at line 1560. 15 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/env/setup.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/vp_global_cli/src/main.rs crates/vp_global_cli/src/main.rs:360— crates/vp_global_cli/src/main.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in vp_global_cli::run at line 360. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/main.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/cli/src/migration/migrator/orchestrators.ts packages/cli/src/migration/migrator/orchestrators.ts:76— packages/cli/src/migration/migrator/orchestrators.ts changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in orchestrators.rewriteStandaloneProject at line 76. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/migration/migrator/orchestrators.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/vp_global_cli/src/commands/env/doctor.rs crates/vp_global_cli/src/commands/env/doctor.rs:1054— crates/vp_global_cli/src/commands/env/doctor.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in vp_global_cli::commands::env::doctor::collect_dev_engines_findings at line 1054. 6 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/env/doctor.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/cli/binding/src/check/mod.rs packages/cli/binding/src/check/mod.rs:21— packages/cli/binding/src/check/mod.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in vite_plus_cli::check::execute_check at line 21. 1 of those changes was a fix/bug commit, 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/binding/src/check/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/vp_global_cli/src/shim/dispatch.rs crates/vp_global_cli/src/shim/dispatch.rs:217— crates/vp_global_cli/src/shim/dispatch.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in vp_global_cli::shim::dispatch::check_npm_global_install_result at line 217. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/shim/dispatch.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/vp_migration/src/import_rewriter.rs crates/vp_migration/src/import_rewriter.rs:1786— crates/vp_migration/src/import_rewriter.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in vp_migration::import_rewriter::rewrite_reference_types at line 1786. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_migration/src/import_rewriter.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/vp_global_cli/src/commands/upgrade/mod.rs crates/vp_global_cli/src/commands/upgrade/mod.rs:38— crates/vp_global_cli/src/commands/upgrade/mod.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in vp_global_cli::commands::upgrade::execute at line 38. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/upgrade/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: REDACTED REDACTED:596— REDACTED changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in sync-remote-deps.mergePnpmWorkspaces at line 596. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- REDACTED`: 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/cli/src/migration/migrator/vite-plus-bootstrap.ts packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:945— packages/cli/src/migration/migrator/vite-plus-bootstrap.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in vite-plus-bootstrap.ensureVitePlusBootstrap at line 945. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/migration/migrator/vite-plus-bootstrap.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: packages/cli/src/migration/migrator/package-json.ts packages/cli/src/migration/migrator/package-json.ts:39— packages/cli/src/migration/migrator/package-json.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in package-json.rewritePackageJson at line 39. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/migration/migrator/package-json.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: packages/core/build.ts packages/core/build.ts:107— packages/core/build.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in build.buildVite at line 107. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/core/build.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/vp_global_cli/src/commands/env/use.rs crates/vp_global_cli/src/commands/env/use.rs:96— crates/vp_global_cli/src/commands/env/use.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in vp_global_cli::commands::env::use::execute at line 96. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/env/use.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/vp_migration/src/vite_config.rs crates/vp_migration/src/vite_config.rs:447— crates/vp_migration/src/vite_config.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in vp_migration::vite_config::rewrite_pack_dts_generators at line 447. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_migration/src/vite_config.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/cli/src/migration/migrator/catalog.ts packages/cli/src/migration/migrator/catalog.ts:312— packages/cli/src/migration/migrator/catalog.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in catalog.rewritePnpmWorkspaceYaml at line 312. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/migration/migrator/catalog.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: packages/cli/src/migration/migrator/eslint.ts packages/cli/src/migration/migrator/eslint.ts:855— packages/cli/src/migration/migrator/eslint.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in eslint.sanitizeMigratedOxlintConfig at line 855. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/migration/migrator/eslint.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/vp_global_cli/src/commands/env/pin.rs crates/vp_global_cli/src/commands/env/pin.rs:806— crates/vp_global_cli/src/commands/env/pin.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in vp_global_cli::commands::env::pin::pin_package_manager at line 806. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/env/pin.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/vp_global_cli/src/commands/vpx.rs crates/vp_global_cli/src/commands/vpx.rs:77— crates/vp_global_cli/src/commands/vpx.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in vp_global_cli::commands::vpx::execute_vpx at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/vpx.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/vp_pm_cli/src/cli.rs crates/vp_pm_cli/src/cli.rs:385— crates/vp_pm_cli/src/cli.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in PmCommand::is_quiet_or_machine_readable at line 385. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/cli.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: REDACTED REDACTED:607— REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in local-npm-registry.server at line 607. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- REDACTED`: 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/vp_global_cli/src/commands/implode.rs crates/vp_global_cli/src/commands/implode.rs:69— crates/vp_global_cli/src/commands/implode.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in vp_global_cli::commands::implode::execute 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/implode.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.
Sync-over-async blocking packages/cli/src/create/bin.ts:781— `fs.existsSync` in `resolveProjectSetup` 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/cli/src/create/bin.ts:1186— `fs.existsSync` in `main` 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/cli/src/create/bin.ts:1214— `fs.existsSync` in `installAndMigrate` 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/cli/src/create/bin.ts:1215— `fs.writeFileSync` in `installAndMigrate` 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/cli/src/create/org-tarball.ts:244— `fs.existsSync` in `extractTarballTo` 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/cli/src/create/org-tarball.ts:306— `fs.existsSync` in `ensureOrgPackageExtracted` 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/cli/src/create/prompts.ts:128— `fs.lstatSync` in `checkProjectDirExists` 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/cli/src/create/templates/generator.ts:42— `fs.chmodSync` in `executeGeneratorScaffold` 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/cli/src/create/templates/monorepo.ts:60— `fs.existsSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:61— `fs.unlinkSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:70— `fs.existsSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:71— `fs.unlinkSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:81— `fs.existsSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:82— `fs.unlinkSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:85— `fs.existsSync` in `executeMonorepoTemplate` 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/cli/src/create/templates/monorepo.ts:86— `fs.unlinkSync` in `executeMonorepoTemplate` 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/cli/src/init-config.ts:213— `fs.rmSync` in `applyToolInitConfigToViteConfig` 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/cli/src/init-config.ts:235— `fs.writeFileSync` in `applyToolInitConfigToViteConfig` 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/cli/src/init-config.ts:242— `fs.writeFileSync` in `applyToolInitConfigToViteConfig` 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/cli/src/init-config.ts:243— `fs.rmSync` in `applyToolInitConfigToViteConfig` 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/cli/src/init-config.ts:245— `fs.rmSync` in `applyToolInitConfigToViteConfig` 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/cli/src/init-config.ts:272— `fs.writeFileSync` in `applyToolInitConfigToViteConfig` 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/cli/src/init-config.ts:273— `fs.rmSync` in `applyToolInitConfigToViteConfig` 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/cli/src/migration/migrator/eslint.ts:297— `fs.existsSync` in `migrateEslintToOxlint` 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/cli/src/migration/migrator/prettier.ts:123— `fs.writeFileSync` in `migratePrettierToOxfmt` 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.
FunctionTooLong: bin.main packages/cli/src/create/bin.ts:311— FunctionTooLong — main runs 731 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 631 over it, 7.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: source.rewriteSource packages/cli/src/migration/vitest-v5/source.ts:536— FunctionTooLong — rewriteSource runs 492 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 392 over it, 4.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: bin.main packages/cli/src/migration/bin.ts:1046— FunctionTooLong — main runs 467 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 367 over it, 4.67× 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: scopes.resolveVitestV5TestModes packages/cli/src/migration/vitest-v5/scopes.ts:364— FunctionTooLong — resolveVitestV5TestModes runs 328 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 228 over it, 3.28× 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: config.migrateConfig packages/cli/src/migration/vitest-v5/config.ts:273— FunctionTooLong — migrateConfig runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: vp_global_cli::commands::global::install::install crates/vp_global_cli/src/commands/global/install.rs:130— FunctionTooLong — vp_global_cli::commands::global::install::install runs 254 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 154 over it, 2.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: vite-plus-bootstrap.ensureVitePlusBootstrap packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:945— FunctionTooLong — ensureVitePlusBootstrap runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.44× 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: bin.executeMigrationPlan packages/cli/src/migration/bin.ts:741— FunctionTooLong — executeMigrationPlan runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× 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: vp_global_cli::self_setup::run crates/vp_global_cli/src/self_setup.rs:193— FunctionTooLong — vp_global_cli::self_setup::run runs 200 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 100 over it, 2.00× 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: vite_plus_cli::check::execute_check packages/cli/binding/src/check/mod.rs:21— FunctionTooLong — vite_plus_cli::check::execute_check runs 197 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 97 over it, 1.97× 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: vite_plus_cli::exec::workspace::execute_exec_workspace packages/cli/binding/src/exec/workspace.rs:17— FunctionTooLong — vite_plus_cli::exec::workspace::execute_exec_workspace runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: spinner.spinner packages/prompts/src/spinner.ts:111— FunctionTooLong — spinner runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: benchmarks.migrateBenchmarks packages/cli/src/migration/vitest-v5/benchmarks.ts:19— FunctionTooLong — migrateBenchmarks runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.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: orchestrators.rewriteStandaloneProject packages/cli/src/migration/migrator/orchestrators.ts:76— FunctionTooLong — rewriteStandaloneProject runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ts-node-config.prepareTsNodeRun packages/cli/src/migration/migrator/ts-node-config.ts:197— FunctionTooLong — prepareTsNodeRun runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: group-multi-select.groupMultiselect packages/prompts/src/group-multi-select.ts:35— FunctionTooLong — groupMultiselect runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: vp_migration::import_rewriter::rewrite_reference_types crates/vp_migration/src/import_rewriter.rs:1786— FunctionTooLong — vp_migration::import_rewriter::rewrite_reference_types runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: vp_global_cli::run crates/vp_global_cli/src/main.rs:360— FunctionTooLong — vp_global_cli::run runs 153 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 53 over it, 1.53× 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: build.buildVite packages/core/build.ts:107— FunctionTooLong — buildVite runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: vp_global_cli::commands::env::use::execute crates/vp_global_cli/src/commands/env/use.rs:96— FunctionTooLong — vp_global_cli::commands::env::use::execute runs 142 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 42 over it, 1.42× 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: task-log.taskLog packages/prompts/src/task-log.ts:52— FunctionTooLong — taskLog runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.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: vite-plus-bootstrap.detectVitePlusBootstrapPending packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:617— FunctionTooLong — detectVitePlusBootstrapPending runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.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.
FunctionTooLong: orchestrators.rewriteMonorepo packages/cli/src/migration/migrator/orchestrators.ts:365— FunctionTooLong — rewriteMonorepo runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× 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: vp_global_cli::commands::env::current::resolve_package_manager_info crates/vp_global_cli/src/commands/env/current.rs:166— FunctionTooLong — vp_global_cli::commands::env::current::resolve_package_manager_info runs 125 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 25 over it, 1.25× 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: vp_global_cli::command_picker::render_picker crates/vp_global_cli/src/command_picker.rs:282— FunctionTooLong — vp_global_cli::command_picker::render_picker runs 124 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 24 over it, 1.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.
Boundary violation [package:relative-cross-package] ecosystem-ci/patch-project.ts:6— ecosystem-ci/patch-project.ts:6 reaches into another package with a relative path (../packages/cli/src/utils/constants.ts) — import the package by name instead.
Boundary violation [package:relative-cross-package] ecosystem-ci/patch-project.ts:10— ecosystem-ci/patch-project.ts:10 reaches into another package with a relative path (../packages/core/package.json) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/cli/build.ts:33— packages/cli/build.ts:33 reaches into another package with a relative path (../core/package.json) — import the package by name instead.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/bin.ts:5— packages/cli/src/create/bin.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/org-picker.ts:3— packages/cli/src/create/org-picker.ts:3 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/org-resolve.ts:1— packages/cli/src/create/org-resolve.ts:1 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/prompts.ts:4— packages/cli/src/create/prompts.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/register-template.ts:6— packages/cli/src/create/register-template.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/templates/builtin.ts:4— packages/cli/src/create/templates/builtin.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/templates/generator.ts:4— packages/cli/src/create/templates/generator.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/templates/monorepo.ts:5— packages/cli/src/create/templates/monorepo.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/create/templates/remote.ts:1— packages/cli/src/create/templates/remote.ts:1 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/bin.ts:5— packages/cli/src/migration/bin.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/eslint.ts:6— packages/cli/src/migration/migrator/eslint.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/git-hooks.ts:4— packages/cli/src/migration/migrator/git-hooks.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/oxnode.ts:6— packages/cli/src/migration/migrator/oxnode.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/prettier.ts:5— packages/cli/src/migration/migrator/prettier.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/setup.ts:4— packages/cli/src/migration/migrator/setup.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/shared.ts:4— packages/cli/src/migration/migrator/shared.ts:4 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/ts-node.ts:7— packages/cli/src/migration/migrator/ts-node.ts:7 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/tsconfig.ts:1— packages/cli/src/migration/migrator/tsconfig.ts:1 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/tsup.ts:5— packages/cli/src/migration/migrator/tsup.ts:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/migrator/tsx.ts:6— packages/cli/src/migration/migrator/tsx.ts:6 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] REDACTED:5— REDACTED:5 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] packages/cli/src/migration/setup-plan.ts:3— packages/cli/src/migration/setup-plan.ts:3 imports packages/prompts/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Repeated repair: crates/vp_pm_cli/src/package_manager.rs crates/vp_pm_cli/src/package_manager.rs:568— crates/vp_pm_cli/src/package_manager.rs changed 23 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is vp_pm_cli::package_manager::get_package_manager_type_and_version at line 568), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): verify and content-key managed package-manager installs (#3400)”; “fix(pm): require a dist-tag version to be valid semver (#3395)”; “fix(pm): prevent concurrent installs from exposing unfinished shims (#3248)”; “fix(pm): verify Bun request pins on fresh installs (#3134)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/package_manager.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/cli/binding/src/lib.rs packages/cli/binding/src/lib.rs:173— packages/cli/binding/src/lib.rs changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is vite_plus_cli::format_error_message at line 173), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(http): send a User-Agent header on all requests (#3425)”; “fix(cli): set package-manager lifecycle env for vp run (#2895)”; “fix(pm): default to pnpm when no package manager is detected (#2750)”; “fix(cli): resolve lowercase Windows shims in case-sensitive directories (#2727)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/binding/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/vp_pm_cli/src/resolution/commands/add.rs crates/vp_pm_cli/src/resolution/commands/add.rs:167— crates/vp_pm_cli/src/resolution/commands/add.rs changed 9 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is Pnpm::resolve at line 167), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): reject unsupported flags for managed global commands (#3285)”; “fix(pm): make dependency filters compatible with npm 6 (#3251)”; “fix(pm): enforce package manager option compatibility (#3122)”; “fix(pm): fail on unsupported package manager options (#2775)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/resolution/commands/add.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/vp_pm_cli/src/resolution/commands/update.rs crates/vp_pm_cli/src/resolution/commands/update.rs:117— crates/vp_pm_cli/src/resolution/commands/update.rs changed 8 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is Yarn::resolve at line 117), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): reject unsupported flags for managed global commands (#3285)”; “fix(pm): make dependency filters compatible with npm 6 (#3251)”; “fix(pm): enforce package manager option compatibility (#3122)”; “fix(pm): fail on unsupported package manager options (#2775)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/resolution/commands/update.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/vp_pm_cli/src/resolution/commands/install.rs crates/vp_pm_cli/src/resolution/commands/install.rs:240— crates/vp_pm_cli/src/resolution/commands/install.rs changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is Npm::resolve at line 240), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): reject unsupported flags for managed global commands (#3285)”; “fix(pm): make dependency filters compatible with npm 6 (#3251)”; “fix(pm): enforce package manager option compatibility (#3122)”; “fix(pm): fail on unsupported package manager options (#2775)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/resolution/commands/install.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/cli/src/bin.ts packages/cli/src/bin.ts:56— packages/cli/src/bin.ts changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is bin.getErrorMessage at line 56), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): restore blocking stdin after loading a dynamic config (#3361)”; “fix(cli): set package-manager lifecycle env for vp run (#2895)”; “fix(cli): reuse the current Node runtime for built-in tools (#2673)”; “fix(cli): recover from stale Vitest aliases (#2605)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/bin.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/vp_js_runtime/src/download.rs crates/vp_js_runtime/src/download.rs:38— crates/vp_js_runtime/src/download.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is vp_js_runtime::download::download_file at line 38), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(upgrade): serialize installation changes and keep existing version directories (#3412)”; “fix: prevent cold runtime downloads from timing out snapshots (#3024)”; “fix(install): show progress and shell activation instructions (#2744)”; “fix(cli): prevent download progress from overwriting terminal output (#2741)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_js_runtime/src/download.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/vp_pm_cli/src/resolution/commands/remove.rs crates/vp_pm_cli/src/resolution/commands/remove.rs:103— crates/vp_pm_cli/src/resolution/commands/remove.rs changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is Yarn::resolve at line 103), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): reject unsupported flags for managed global commands (#3285)”; “fix(pm): enforce package manager option compatibility (#3122)”; “fix(pm): fail on unsupported package manager options (#2775)”; “fix(pm): respect filters for recursive removal on Yarn Berry (#2712)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/resolution/commands/remove.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/vp_pm_cli/src/resolution/resolve.rs crates/vp_pm_cli/src/resolution/resolve.rs:38— crates/vp_pm_cli/src/resolution/resolve.rs changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is vp_pm_cli::resolution::resolve::resolve_for_manager at line 38), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): fail on unsupported package manager options (#2775)”; “fix(env): track injected tools across nested shim calls (#2631)”; “fix(pm): disable Yarn update notifications (#2651)”; “fix(pm): disable npm update notifications (#2650)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/resolution/resolve.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/vp_pm_cli/src/resolution/commands/dlx.rs crates/vp_pm_cli/src/resolution/commands/dlx.rs:45— crates/vp_pm_cli/src/resolution/commands/dlx.rs changed 5 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 Npm::resolve at line 45), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): skip unavailable commands and reject unsupported options (#3286)”; “fix(dlx): let npm infer executables from package metadata (#3229)”; “fix(pm): fail on unsupported package manager options (#2775)”; “fix(pm): default to pnpm when no package manager is detected (#2750)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/resolution/commands/dlx.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/vp_pm_cli/src/resolution/commands/outdated.rs crates/vp_pm_cli/src/resolution/commands/outdated.rs:133— crates/vp_pm_cli/src/resolution/commands/outdated.rs changed 5 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 6 (its worst body is Npm::resolve_outdated at line 133), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): reject unsupported flags for managed global commands (#3285)”; “fix(pm): make dependency filters compatible with npm 6 (#3251)”; “fix(cli): check npm workspaces for recursive outdated (#3240)”; “fix(pm): enforce package manager option compatibility (#3122)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/resolution/commands/outdated.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: .github/scripts/upgrade-deps-utils.ts .github/scripts/upgrade-deps-utils.ts:101— .github/scripts/upgrade-deps-utils.ts changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is (anonymous) at line 101), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “chore(deps): automate pnpm installer pins and fix validation (#3407)”; “revert(deps): stop bumping vite-task in the upstream dependency upgrade (#3324)”; “fix(install): share the Node 24 pin with development and CI (#3269)”; “fix(deps): synchronize bundled tool dependencies (#2921)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- .github/scripts/upgrade-deps-utils.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/vp_global_cli/src/upgrade_check.rs crates/vp_global_cli/src/upgrade_check.rs:231— crates/vp_global_cli/src/upgrade_check.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is vp_global_cli::upgrade_check::run_background_check at line 231), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(deps): migrate node-semver crate to js-semver (#2835)”; “fix(cli): handle Homebrew installs during first-run setup (#2729)”; “fix(cli): honor NO_COLOR in Rust output (#2716)”; “fix(cli): run upgrade checks in a separate process (#2380)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/upgrade_check.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/cli/binding/src/cli/resolver.rs packages/cli/binding/src/cli/resolver.rs:72— packages/cli/binding/src/cli/resolver.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is SubcommandResolver::resolve at line 72), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): set package-manager lifecycle env for vp run (#2895)”; “fix(cli): use native config discovery for lint and fmt (#2807)”; “fix(cli): reuse the current Node runtime for built-in tools (#2673)”; “fix(cli): share Vite runtime through the core alias (#2617)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/binding/src/cli/resolver.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/vp_pm_cli/src/dispatch.rs crates/vp_pm_cli/src/dispatch.rs:58— crates/vp_pm_cli/src/dispatch.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is vp_pm_cli::dispatch::dispatch_with_manager at line 58), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(create): align package manager versions and pnpm workspace config (#3197)”; “fix(pm): support authenticated private registries (#2624)”; “fix(pm): default to pnpm when no package manager is detected (#2750)”; “fix(pm): avoid implicit project writes (#2399)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/dispatch.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/vp_global_cli/src/commands/global/mod.rs crates/vp_global_cli/src/commands/global/mod.rs:83— crates/vp_global_cli/src/commands/global/mod.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is vp_global_cli::commands::global::latest_package_versions at line 83), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(progress): block keyboard input while a Rust spinner is visible (#3373)”; “fix(global): prevent concurrent installs from deleting active packages (#3185)”; “fix(deps): migrate node-semver crate to js-semver (#2835)”; “fix(env): track injected tools across nested shim calls (#2631)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/global/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: packages/cli/binding/src/cli/help.rs packages/cli/binding/src/cli/help.rs:87— packages/cli/binding/src/cli/help.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is vite_plus_cli::cli::help::should_prepend_vitest_run at line 87), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): forward Vitest doctor and complete subcommands (#2879)”; “fix(cli): honor NO_COLOR in Rust output (#2716)”; “fix(cli): improve workspace app target classification (#2530)”; “fix(cli): guide local users to global-only commands (#2522)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/binding/src/cli/help.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/vp_global_cli/src/commands/env/package_manager.rs crates/vp_global_cli/src/commands/env/package_manager.rs:18— crates/vp_global_cli/src/commands/env/package_manager.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is vp_global_cli::commands::env::package_manager::resolve_shim_for at line 18), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(create): align package manager versions and pnpm workspace config (#3197)”; “fix(pm): support authenticated private registries (#2624)”; “fix(cli): default unpinned npm to Node's bundled version (#2742)”; “fix(env): isolate direct shims from package manager selection (#2658)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/env/package_manager.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/vp_pm_cli/src/resolution/commands/list.rs crates/vp_pm_cli/src/resolution/commands/list.rs:97— crates/vp_pm_cli/src/resolution/commands/list.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is Npm::resolve_list at line 97), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): reject unsupported flags for managed global commands (#3285)”; “fix(pm): make dependency filters compatible with npm 6 (#3251)”; “fix(pm): enforce package manager option compatibility (#3122)”; “fix(pm): fail on unsupported package manager options (#2775)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_pm_cli/src/resolution/commands/list.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/cli/src/migration/migrator/core-finalization.ts packages/cli/src/migration/migrator/core-finalization.ts:145— packages/cli/src/migration/migrator/core-finalization.ts changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is core-finalization.finalizeCoreMigrationForExistingVitePlus at line 145), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(migrate): remove unused oxlint plugin dependencies on upgrades (#2751)”; “revert(migrate): stop merging Oxc configs in existing projects (#2696)”; “fix(migrate): finish leftover Oxc config migration (#2654)”; “fix(migrate): integrate leftover tsdown config (#2646)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/migration/migrator/core-finalization.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: packages/cli/binding/src/package_manager.rs packages/cli/binding/src/package_manager.rs:79— packages/cli/binding/src/package_manager.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 vite_plus_cli::package_manager::download_package_manager at line 79), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(create): align package manager versions and pnpm workspace config (#3197)”; “fix(cli): resolve npm registry and auth via shared Rust config loader (#3124)”; “fix(cli): use the Rust workspace lookup for the monorepo root (#3101)”; “fix(pm): support authenticated private registries (#2624)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/binding/src/package_manager.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/cli/src/pack-bin.ts packages/cli/src/pack-bin.ts:140— packages/cli/src/pack-bin.ts 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 9 (its worst body is pack-bin.cli.command("[...files]","Bundle files").option("--config-loader <loader>","Config loader to use: auto, native, tsx, unr at line 140), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): reload pack config on Windows in watch mode (#2826)”; “fix(cli): share Vite runtime through the core alias (#2617)”; “fix(cli): make `pack --no-config` skip Vite config loading (#2486)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/pack-bin.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/vp_shared/src/dirs.rs crates/vp_shared/src/dirs.rs:199— crates/vp_shared/src/dirs.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is vp_shared::dirs::shim_pointer_data at line 199), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(env): track injected tools across nested shim calls (#2631)”; “fix(trampoline): reject unversioned shim pointers (#2526)”; “fix(installer): enforce Windows setup requirements (#2505)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_shared/src/dirs.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/cli/src/utils/prompts.ts packages/cli/src/utils/prompts.ts:101— packages/cli/src/utils/prompts.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 12 (its worst body is prompts.runViteInstall at line 101), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(create): align package manager versions and pnpm workspace config (#3197)”; “fix(create): run child commands without a global vp (#3181)”; “fix(pm): support authenticated private registries (#2624)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- packages/cli/src/utils/prompts.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/vp_global_cli/src/commands/env/lifecycle.rs crates/vp_global_cli/src/commands/env/lifecycle.rs:26— crates/vp_global_cli/src/commands/env/lifecycle.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 10 (its worst body is vp_global_cli::commands::env::lifecycle::install at line 26), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(pm): verify and content-key managed package-manager installs (#3400)”; “fix(pm): support authenticated private registries (#2624)”; “fix(deps): migrate node-semver crate to js-semver (#2835)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 23:21:37 +08:00' --until='2026-11-14 23:21:37 +08:00' --full-history --no-merges -- crates/vp_global_cli/src/commands/env/lifecycle.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.
FileTooLong: src/import_rewriter.rs crates/vp_migration/src/import_rewriter.rs— FileTooLong — 1987 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 1487 over it, 3.97× 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/package_manager.rs crates/vp_pm_cli/src/package_manager.rs— FileTooLong — 1392 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 68 free functions. The bar is 500 significant lines; this is 892 over it, 2.78× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: migration/bin.ts packages/cli/src/migration/bin.ts— FileTooLong — 1220 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 720 over it, 2.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: env/setup.rs crates/vp_global_cli/src/commands/env/setup.rs— FileTooLong — 1112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 612 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: migrator/script-runner.ts packages/cli/src/migration/migrator/script-runner.ts— FileTooLong — 1002 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 502 over it, 2.00× 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: create/bin.ts packages/cli/src/create/bin.ts— FileTooLong — 981 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: main (311-1419). The bar is 500 significant lines; this is 481 over it, 1.96× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: migrator/vite-plus-bootstrap.ts packages/cli/src/migration/migrator/vite-plus-bootstrap.ts— FileTooLong — 925 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 425 over it, 1.85× 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: migrator/catalog.ts packages/cli/src/migration/migrator/catalog.ts— FileTooLong — 904 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 404 over it, 1.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: vitest-v5/source.ts packages/cli/src/migration/vitest-v5/source.ts— FileTooLong — 896 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 396 over it, 1.79× 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: shim/dispatch.rs crates/vp_global_cli/src/shim/dispatch.rs— FileTooLong — 873 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 43 free functions. The bar is 500 significant lines; this is 373 over it, 1.75× 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: global/install.rs crates/vp_global_cli/src/commands/global/install.rs— FileTooLong — 863 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 363 over it, 1.73× 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: env/doctor.rs crates/vp_global_cli/src/commands/env/doctor.rs— FileTooLong — 852 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 352 over it, 1.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cli/build.ts packages/cli/build.ts— FileTooLong — 835 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 335 over it, 1.67× 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: migrator/vitest-v5.ts packages/cli/src/migration/migrator/vitest-v5.ts— FileTooLong — 744 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 244 over it, 1.49× 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: env/pin.rs crates/vp_global_cli/src/commands/env/pin.rs— FileTooLong — 720 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 220 over it, 1.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/help.ts packages/cli/src/help.ts— FileTooLong — 682 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: commandHelpDocs (6-1131). The bar is 500 significant lines; this is 182 over it, 1.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: commands/implode.rs crates/vp_global_cli/src/commands/implode.rs— FileTooLong — 670 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 170 over it, 1.34× 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: migrator/eslint.ts packages/cli/src/migration/migrator/eslint.ts— FileTooLong — 656 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 156 over it, 1.31× 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: REDACTED REDACTED— FileTooLong — 655 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 155 over it, 1.31× 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: REDACTED REDACTED— FileTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 139 over it, 1.28× 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/vite_config.rs crates/vp_migration/src/vite_config.rs— FileTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 119 over it, 1.24× 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: vitest-v5/scopes.ts packages/cli/src/migration/vitest-v5/scopes.ts— FileTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 92 over it, 1.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/install.rs crates/vp_setup/src/install.rs— FileTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 70 over it, 1.14× 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/define-config.ts packages/cli/src/define-config.ts— FileTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 10 over it, 1.02× 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: config/hooks.ts packages/cli/src/config/hooks.ts— FileTooLong — 501 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1 over it, 1.00× 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.
vp_global_cli::self_setup::run (cyclomatic 58) crates/vp_global_cli/src/self_setup.rs:193— vp_global_cli::self_setup::run has cyclomatic complexity 58 (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.
vp_global_cli::commands::global::install::install (cyclomatic 57) crates/vp_global_cli/src/commands/global/install.rs:130— vp_global_cli::commands::global::install::install 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.
vp_global_cli::commands::env::use::execute (cyclomatic 41) crates/vp_global_cli/src/commands/env/use.rs:96— vp_global_cli::commands::env::use::execute 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.
vp_global_cli::run (cyclomatic 40) crates/vp_global_cli/src/main.rs:360— vp_global_cli::run has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
vp_global_cli::commands::env::doctor::collect_dev_engines_findings (cyclomatic 33) crates/vp_global_cli/src/commands/env/doctor.rs:1054— vp_global_cli::commands::env::doctor::collect_dev_engines_findings has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
vp_global_cli::cli::run_command_with_options (cyclomatic 31) crates/vp_global_cli/src/cli.rs:1112— vp_global_cli::cli::run_command_with_options 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.
vp_global_cli::cli::managed_update (cyclomatic 29) crates/vp_global_cli/src/cli.rs:862— vp_global_cli::cli::managed_update 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.
vp_global_cli::shim::dispatch::check_npm_global_install_result (cyclomatic 29) crates/vp_global_cli/src/shim/dispatch.rs:217— vp_global_cli::shim::dispatch::check_npm_global_install_result 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.
vp_global_cli::commands::env::setup::print_path_instructions (cyclomatic 28) crates/vp_global_cli/src/commands/env/setup.rs:1560— vp_global_cli::commands::env::setup::print_path_instructions 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.
vp_global_cli::commands::vpx::execute_vpx (cyclomatic 28) crates/vp_global_cli/src/commands/vpx.rs:77— vp_global_cli::commands::vpx::execute_vpx 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.
vp_global_cli::commands::upgrade::execute (cyclomatic 26) crates/vp_global_cli/src/commands/upgrade/mod.rs:38— vp_global_cli::commands::upgrade::execute 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.
vp_global_cli::self_setup::shell::configure (cyclomatic 23) crates/vp_global_cli/src/self_setup/shell.rs:15— vp_global_cli::self_setup::shell::configure 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.
vp_global_cli::commands::env::execute (cyclomatic 22) crates/vp_global_cli/src/commands/env/mod.rs:71— vp_global_cli::commands::env::execute has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
vp_global_cli::shim::dispatch::dispatch (cyclomatic 22) crates/vp_global_cli/src/shim/dispatch.rs:860— vp_global_cli::shim::dispatch::dispatch 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.
vp_global_cli::self_setup::maybe_run (cyclomatic 20) crates/vp_global_cli/src/self_setup.rs:21— vp_global_cli::self_setup::maybe_run has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
vp_global_cli::commands::env::pin::pin_package_manager (cyclomatic 18) crates/vp_global_cli/src/commands/env/pin.rs:806— vp_global_cli::commands::env::pin::pin_package_manager 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.
vp_global_cli::commands::env::list_remote::execute (cyclomatic 17) crates/vp_global_cli/src/commands/env/list_remote.rs:54— vp_global_cli::commands::env::list_remote::execute 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.
vp_global_cli::commands::env::setup::has_configured_profile (cyclomatic 17) crates/vp_global_cli/src/commands/env/setup.rs:1497— vp_global_cli::commands::env::setup::has_configured_profile 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.
vp_global_cli::commands::env::exec::execute_with_version (cyclomatic 16) crates/vp_global_cli/src/commands/env/exec.rs:142— vp_global_cli::commands::env::exec::execute_with_version 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.
vp_global_cli::commands::env::list::execute (cyclomatic 16) crates/vp_global_cli/src/commands/env/list.rs:48— vp_global_cli::commands::env::list::execute 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.
vp_global_cli::commands::env::pin::unpin_package_manager (cyclomatic 16) crates/vp_global_cli/src/commands/env/pin.rs:966— vp_global_cli::commands::env::pin::unpin_package_manager 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.
vp_global_cli::commands::global::install::stale_installation_dirs (cyclomatic 16) crates/vp_global_cli/src/commands/global/install.rs:982— vp_global_cli::commands::global::install::stale_installation_dirs 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.
vp_global_cli::commands::implode::execute (cyclomatic 16) crates/vp_global_cli/src/commands/implode.rs:69— vp_global_cli::commands::implode::execute 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.
R4 · Test Coverage· No test reaches this file · ×21
No test reaches this file packages/cli/build.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/core/build.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 ecosystem-ci/patch-project.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/cli/src/vpx-bin.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/core/build-support/find-create-require.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 ecosystem-ci/webdriverio.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/core/build-support/rewrite-module-specifiers.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/cli/src/pack-bin.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/cli/src/script-preload.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 ecosystem-ci/clone.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/tools/src/record-snapshot-registry.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 ecosystem-ci/verify-install.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/tools/src/check-rolldown-compat.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 packages/core/build-support/build-cjs-deps.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 ecosystem-ci/verify-videojs-v10.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/cli/src/script-watch.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/core/build-support/rewrite-imports.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 ecosystem-ci/npmx.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/tools/src/bin.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.
vp_migration::import_rewriter::rewrite_reference_types (cognitive 103) crates/vp_migration/src/import_rewriter.rs:1786— vp_migration::import_rewriter::rewrite_reference_types has cognitive complexity 103 (threshold 15). Drivers by points: if/else 37 (82 pts), boolean chains 11, match/switch 3 (7 pts), loops 3 (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.
vp_migration::vite_config::rewrite_pack_dts_generators (cognitive 59) crates/vp_migration/src/vite_config.rs:447— vp_migration::vite_config::rewrite_pack_dts_generators has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 13, loops 4 (6 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.
vp_migration::pack_config::rewrite_options (cognitive 45) crates/vp_migration/src/pack_config.rs:489— vp_migration::pack_config::rewrite_options has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 6, loops 3, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::script_rewrite::strip_flags_from_suffix (cognitive 44) crates/vp_migration/src/script_rewrite.rs:497— vp_migration::script_rewrite::strip_flags_from_suffix has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 3 (5 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.
vp_migration::pack_config::constant_initializer (cognitive 35) crates/vp_migration/src/pack_config.rs:419— vp_migration::pack_config::constant_initializer has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 3 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::vite_config::upsert_json_config_content (cognitive 35) crates/vp_migration/src/vite_config.rs:161— vp_migration::vite_config::upsert_json_config_content has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 3, match/switch 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::import_merge::merge_group (cognitive 30) crates/vp_migration/src/import_merge.rs:89— vp_migration::import_merge::merge_group has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (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.
vp_migration::package::transform_scripts_json (cognitive 29) crates/vp_migration/src/package.rs:44— vp_migration::package::transform_scripts_json has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 17). 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.
vp_migration::vite_config::ensure_lazy_plugins_import (cognitive 26) crates/vp_migration/src/vite_config.rs:750— vp_migration::vite_config::ensure_lazy_plugins_import has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::pack_config::move_option (cognitive 24) crates/vp_migration/src/pack_config.rs:588— vp_migration::pack_config::move_option has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2, match/switch 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.
vp_migration::shell_command::parse_literal_commands (cognitive 24) crates/vp_migration/src/shell_command.rs:23— vp_migration::shell_command::parse_literal_commands has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::vite_config::wrap_lazy_plugins_content (cognitive 24) crates/vp_migration/src/vite_config.rs:375— vp_migration::vite_config::wrap_lazy_plugins_content has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::import_rewriter::rewrite_imports_in_directory_with_options (cognitive 22) crates/vp_migration/src/import_rewriter.rs:2284— vp_migration::import_rewriter::rewrite_imports_in_directory_with_options has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::import_rewriter::rewrite_import_content_full (cognitive 20) crates/vp_migration/src/import_rewriter.rs:2472— vp_migration::import_rewriter::rewrite_import_content_full has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 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.
vp_migration::import_merge::merge_duplicate_imports (cognitive 19) crates/vp_migration/src/import_merge.rs:12— vp_migration::import_merge::merge_duplicate_imports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, 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.
vp_migration::vite_config::strip_import_comments (cognitive 18) crates/vp_migration/src/vite_config.rs:823— vp_migration::vite_config::strip_import_comments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (7 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.
vp_migration::script_rewrite::collapse_newlines (cognitive 17) crates/vp_migration/src/script_rewrite.rs:581— vp_migration::script_rewrite::collapse_newlines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::task_cache::move_fields_under_cache (cognitive 17) crates/vp_migration/src/task_cache.rs:169— vp_migration::task_cache::move_fields_under_cache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_migration::task_cache::merge_into_object (cognitive 16) crates/vp_migration/src/task_cache.rs:238— vp_migration::task_cache::merge_into_object has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
No assertions: accepts test config without TS error packages/cli/src/__tests__/define-config-test-field.spec.ts:6— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts test config alongside other vite-plus fields packages/cli/src/__tests__/define-config-test-field.spec.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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: refreshes independent exceptions when the manifest changes packages/cli/src/__tests__/oxlint-plugin.spec.ts:225— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not inherit exceptions across nested package boundaries packages/cli/src/__tests__/oxlint-plugin.spec.ts:242— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: initializes NODE_ENV before evaluation when $name packages/cli/src/__tests__/resolve-config-from-file.spec.ts:295— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: resolves through the built %s entry packages/cli/src/__tests__/resolve-config-from-file.spec.ts:374— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not fall back to the project when the CLI dependency is missing packages/cli/src/__tests__/resolve-core.spec.ts:157— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts string commands packages/cli/src/__tests__/staged/config.spec.ts:6— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts arrays of string commands packages/cli/src/__tests__/staged/config.spec.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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts sync generate task functions packages/cli/src/__tests__/staged/config.spec.ts:18— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts async generate task functions packages/cli/src/__tests__/staged/config.spec.ts:24— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts mixed arrays of strings and functions packages/cli/src/__tests__/staged/config.spec.ts:30— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts task function objects packages/cli/src/__tests__/staged/config.spec.ts:41— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts a top-level generate task function packages/cli/src/__tests__/staged/config.spec.ts:52— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: annotations and custom artifacts crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_node_apis/runtime.test.js: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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
TodoComment packages/prompts/src/group.ts:44— // TODO: Switch to callback within core to avoid isCancel Fn — 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/prompts/src/stream.ts:10— // TODO (43081j): this currently doesn't support custom `output` writable — 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/core/build-support/find-create-require.ts:18— // TODO, analysis the optional peerDependencies in the dependencies tree to exclude them in the 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.
TodoComment packages/cli/templates/generator/src/template.ts:15— // TODO: Add more options as needed — 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/cli/templates/generator/src/template.ts:28— // TODO: Add more REDACTED fields — 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/cli/templates/generator/src/template.ts:55— // TODO: Add more files — 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/cli/src/resolve-doc.ts:35— // TODO: provide envs inference API — 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/cli/src/resolve-fmt.ts:42— // TODO: provide envs inference API — 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/cli/src/resolve-lint.ts:49— // TODO: provide envs inference API — 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/cli/src/utils/tsconfig.ts:144— // TODO: move back to devDependencies once the bundle refactoring lands — 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/cli/src/create/command.ts:111— // TODO: will use `vp dlx` instead, see https://github.com/voidzero-dev/vite-task/issues/27
TodoComment packages/cli/src/create/templates/remote.ts:41— // TODO: prompt for project name if not provided for degit — 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/cli/binding/src/cli/resolver.rs:290— /// TODO: The hardcoded `!dist/**` exclusion is a temporary workaround. It will be replaced — 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.
vp_migration::import_rewriter::rewrite_reference_types (cyclomatic 53) crates/vp_migration/src/import_rewriter.rs:1786— vp_migration::import_rewriter::rewrite_reference_types has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
vp_migration::vite_config::rewrite_pack_dts_generators (cyclomatic 35) crates/vp_migration/src/vite_config.rs:447— vp_migration::vite_config::rewrite_pack_dts_generators 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.
vp_migration::pack_config::rewrite_options (cyclomatic 28) crates/vp_migration/src/pack_config.rs:489— vp_migration::pack_config::rewrite_options 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.
vp_migration::vite_config::upsert_json_config_content (cyclomatic 18) crates/vp_migration/src/vite_config.rs:161— vp_migration::vite_config::upsert_json_config_content 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.
vp_migration::import_merge::merge_group (cyclomatic 17) crates/vp_migration/src/import_merge.rs:89— vp_migration::import_merge::merge_group 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.
vp_migration::pack_config::move_option (cyclomatic 17) crates/vp_migration/src/pack_config.rs:588— vp_migration::pack_config::move_option 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.
vp_migration::script_rewrite::strip_flags_from_suffix (cyclomatic 17) crates/vp_migration/src/script_rewrite.rs:497— vp_migration::script_rewrite::strip_flags_from_suffix 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.
vp_migration::shell_command::parse_literal_commands (cyclomatic 16) crates/vp_migration/src/shell_command.rs:23— vp_migration::shell_command::parse_literal_commands 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.
R4 · Test Coverage· This test file cannot be loaded · ×8
This test file cannot be loaded crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/custom-app.ts:1— crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/custom-app.ts:1 imports './milestone', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/root-no-index.ts:1— crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/root-no-index.ts:1 imports './milestone', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_user_agent/local-only.mjs:7— crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_user_agent/local-only.mjs:7 imports './bin/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_vpx_script/watch/later/main.ts:1— crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_vpx_script/watch/later/main.ts:1 imports './later.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/verify-in-source.mjs:6— crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/verify-in-source.mjs:6 imports './src/add.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/new_vite_monorepo/degit-fixture/cli.mjs:12— crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/new_vite_monorepo/degit-fixture/cli.mjs:12 imports './template/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded packages/tools/src/__tests__/local-npm-registry.spec.ts:61— packages/tools/src/__tests__/local-npm-registry.spec.ts:61 imports '../../../../crates/vp_cli_snapshots/tests/cli_snapshots/registry', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded packages/tools/src/__tests__/record-snapshot-registry.spec.ts:24— packages/tools/src/__tests__/record-snapshot-registry.spec.ts:24 imports '../../../../crates/vp_cli_snapshots/tests/cli_snapshots/registry', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
Duplicated block (11 lines × 2) crates/vp_global_cli/src/commands/env/off.rs:25— crates/vp_global_cli/src/commands/env/off.rs:25-35 | crates/vp_global_cli/src/commands/env/on.rs:24-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/commands/env/off.rs:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/vp_global_cli/src/shim/dispatch.rs:252— crates/vp_global_cli/src/shim/dispatch.rs:252-262 | crates/vp_global_cli/src/shim/dispatch.rs:650-660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/shim/dispatch.rs:252` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `node_dir` to `&AbsolutePathBuf` in one and `&AbsolutePath` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) packages/cli/binding/src/cli/resolver.rs:118— packages/cli/binding/src/cli/resolver.rs:118-128 | packages/cli/binding/src/cli/resolver.rs:142-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. Read the line range as the matched WINDOW rather than a finished unit: at `packages/cli/binding/src/cli/resolver.rs:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/cli/binding/src/cli/resolver.rs:140` calls `chain`, `once`, `from` and `packages/cli/binding/src/cli/resolver.rs:116` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) crates/vp_global_cli/src/cli.rs:567— crates/vp_global_cli/src/cli.rs:567-577 | packages/cli/binding/src/cli/help.rs:64-74 — 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/vp_pm_cli/src/package_manager.rs:1932— crates/vp_pm_cli/src/package_manager.rs:1932-1942 | crates/vp_pm_cli/src/package_manager.rs:2143-2153 — both copies are in the same file, so extract the 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/vp_pm_cli/src/resolution/commands/dedupe.rs:39— crates/vp_pm_cli/src/resolution/commands/dedupe.rs:39-49 | crates/vp_pm_cli/src/resolution/commands/dedupe.rs:56-66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_pm_cli/src/resolution/commands/dedupe.rs:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) crates/vp_pm_cli/src/resolution/commands/pack.rs:55— crates/vp_pm_cli/src/resolution/commands/pack.rs:55-64 | crates/vp_pm_cli/src/resolution/commands/pack.rs:84-96 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/vp_pm_cli/src/resolution/commands/audit.rs:34— crates/vp_pm_cli/src/resolution/commands/audit.rs:34-48 | crates/vp_pm_cli/src/resolution/commands/audit.rs:52-61 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/vp_pm_cli/src/resolution/commands/deprecate.rs:35— crates/vp_pm_cli/src/resolution/commands/deprecate.rs:35-44 | crates/vp_pm_cli/src/resolution/commands/search.rs:37-46 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/vp_pm_cli/src/resolution/commands/stage.rs:353— crates/vp_pm_cli/src/resolution/commands/stage.rs:353-362 | crates/vp_pm_cli/src/resolution/commands/stage.rs:364-373 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/vp_global_cli/src/cli.rs:579— crates/vp_global_cli/src/cli.rs:579-588 | packages/cli/binding/src/cli/help.rs:76-85 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (8 lines × 2) crates/vp_global_cli/src/commands/env/list.rs:55— crates/vp_global_cli/src/commands/env/list.rs:55-62 | crates/vp_global_cli/src/commands/env/list_remote.rs:96-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/commands/env/list.rs:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/vp_pm_cli/src/package_manager.rs:601— crates/vp_pm_cli/src/package_manager.rs:601-608 | crates/vp_pm_cli/src/package_manager.rs:636-643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_pm_cli/src/package_manager.rs:601` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) crates/vp_shared/src/output.rs:98— crates/vp_shared/src/output.rs:98-105 | crates/vp_shared/src/output.rs:113-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_shared/src/output.rs:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/vp_pm_cli/src/shim.rs:43— crates/vp_pm_cli/src/shim.rs:43-50 | crates/vp_pm_cli/src/shim.rs:130-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 (8 lines × 2) packages/cli/binding/src/js_command_args/commands/create.rs:205— packages/cli/binding/src/js_command_args/commands/create.rs:205-212 | packages/cli/binding/src/js_command_args/commands/migrate.rs:134-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. Read the line range as the matched WINDOW rather than a finished unit: at `packages/cli/binding/src/js_command_args/commands/create.rs:205` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/vp_pm_cli/src/resolution/commands/remove.rs:62— crates/vp_pm_cli/src/resolution/commands/remove.rs:62-68 | crates/vp_pm_cli/src/resolution/commands/remove.rs:87-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_pm_cli/src/resolution/commands/remove.rs:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/vp_global_cli/src/commands/env/bin_config.rs:148— crates/vp_global_cli/src/commands/env/bin_config.rs:148-154 | crates/vp_global_cli/src/commands/env/package_metadata.rs:160-166 — 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/vp_pm_cli/src/resolution/commands/pack.rs:76— crates/vp_pm_cli/src/resolution/commands/pack.rs:76-82 | crates/vp_pm_cli/src/resolution/commands/pack.rs:90-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_pm_cli/src/resolution/commands/pack.rs:76` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/vp_global_cli/src/main.rs:104— crates/vp_global_cli/src/main.rs:104-110 | crates/vp_global_cli/src/main.rs:139-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/main.rs:104` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/vp_global_cli/src/main.rs:148` calls `push`, `to_string` and `crates/vp_global_cli/src/main.rs:113` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) packages/cli/binding/src/cli/resolver.rs:226— packages/cli/binding/src/cli/resolver.rs:226-232 | packages/cli/binding/src/cli/resolver.rs:244-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/cli/binding/src/cli/resolver.rs:226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/vp_global_cli/src/commands/global/install.rs:991— crates/vp_global_cli/src/commands/global/install.rs:991-996 | crates/vp_global_cli/src/commands/global/install.rs:1019-1024 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/commands/global/install.rs:991` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/vp_global_cli/src/commands/env/config.rs:321— crates/vp_global_cli/src/commands/env/config.rs:321-326 | crates/vp_global_cli/src/commands/global/install.rs:935-940 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/commands/env/config.rs:321` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/vp_shared/src/output.rs:26— crates/vp_shared/src/output.rs:26-31 | crates/vp_shared/src/output.rs:36-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_shared/src/output.rs:26` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/vp_global_cli/src/commands/env/doctor.rs:693— crates/vp_global_cli/src/commands/env/doctor.rs:693-698 | crates/vp_global_cli/src/commands/env/doctor.rs:700-705 — both copies are in the same file, so extract the 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/vp_toolchain/src/lib.rs:288— crates/vp_toolchain/src/lib.rs:288-293 | crates/vp_toolchain/src/lib.rs:307-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_toolchain/src/lib.rs:288` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
FixmeComment packages/cli/src/migration/migrator/catalog.ts:1270— // FIXME: yarn don't support catalog on resolutions — 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 packages/cli/src/create/bin.ts:1284— // FIXME: ignore itself as dependency — 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 packages/cli/src/create/bin.ts:1297— // FIXME: should use `vp add` command instead — 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/vp_pm_cli/src/shim.rs:218— // FIXME — 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×4
Edited copy of a member (9 corresponding lines) crates/vp_global_cli/src/commands/env/bin_config.rs:120— crates/vp_global_cli/src/commands/env/bin_config.rs:120-129 | crates/vp_global_cli/src/commands/env/package_metadata.rs:136-144 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/vp_pm_cli/src/resolution/commands/view.rs:39— crates/vp_pm_cli/src/resolution/commands/view.rs:39-51 | crates/vp_pm_cli/src/resolution/commands/view.rs:60-68 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/vp_pm_cli/src/resolution/commands/login.rs:46— crates/vp_pm_cli/src/resolution/commands/login.rs:46-54 | crates/vp_pm_cli/src/resolution/commands/logout.rs:46-54 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/vp_pm_cli/src/resolution/commands/audit.rs:97— crates/vp_pm_cli/src/resolution/commands/audit.rs:97-105 | crates/vp_pm_cli/src/resolution/commands/pack.rs:100-108 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Off the main sequence: @voidzero-dev/vite-plus-core — @voidzero-dev/vite-plus-core: 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: vp_static_config — vp_static_config: 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: vp_toolchain — vp_toolchain: 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: vp_error — vp_error: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×3
Edited copy of a member (14 corresponding lines) crates/vp_js_runtime/src/providers/node.rs:464— crates/vp_js_runtime/src/providers/node.rs:464-477 | crates/vp_js_runtime/src/providers/node.rs:487-502 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/vp_pm_cli/src/resolution/commands/dlx.rs:28— crates/vp_pm_cli/src/resolution/commands/dlx.rs:28-41 | crates/vp_pm_cli/src/resolution/commands/dlx.rs:122-136 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/vp_pm_cli/src/resolution/commands/dedupe.rs:36— crates/vp_pm_cli/src/resolution/commands/dedupe.rs:36-49 | crates/vp_pm_cli/src/resolution/commands/dedupe.rs:53-66 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) crates/vp_migration/src/vite_config.rs:629— crates/vp_migration/src/vite_config.rs:629-642 | crates/vp_migration/src/vite_config.rs:673-684 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/vp_pm_cli/src/resolution/commands/patch_commit.rs:19— crates/vp_pm_cli/src/resolution/commands/patch_commit.rs:19-30 | crates/vp_pm_cli/src/resolution/commands/patch_commit.rs:34-45 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/vp_global_cli/src/commands/mod.rs:37— crates/vp_global_cli/src/commands/mod.rs:37-49 | crates/vp_global_cli/src/commands/mod.rs:62-73 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) crates/vp_js_runtime/src/download.rs:268— crates/vp_js_runtime/src/download.rs:268-276 | crates/vp_js_runtime/src/download.rs:337-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_js_runtime/src/download.rs:268` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/vp_migration/src/vite_config.rs:226— crates/vp_migration/src/vite_config.rs:226-234 | crates/vp_migration/src/vite_config.rs:422-430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/vp_migration/src/vite_config.rs:431` calls `ensure_lazy_plugins_import` and `crates/vp_migration/src/vite_config.rs:236` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) crates/vp_pm_cli/src/resolution/commands/login.rs:64— crates/vp_pm_cli/src/resolution/commands/login.rs:64-72 | crates/vp_pm_cli/src/resolution/commands/logout.rs:64-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `args` to `&LoginArgs` in one and `&LogoutArgs` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Low cohesion: Bun (LCOM4 25) crates/vp_pm_cli/src/resolution/dialect.rs:25— Bun's methods fall into 25 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 25 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: Pnpm (LCOM4 17) crates/vp_pm_cli/src/resolution/dialect.rs:15— Pnpm's methods fall into 17 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 17 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: Npm (LCOM4 9) crates/vp_pm_cli/src/resolution/dialect.rs:10— Npm's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Duplicated block (14 lines × 2 locations) packages/cli/build.ts:1309— packages/cli/build.ts:1309 · packages/cli/build.ts:1343 — both copies are in the same file, so extract the 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 locations) packages/cli/src/migration/migrator/tsup.ts:435— packages/cli/src/migration/migrator/tsup.ts:435 · packages/cli/src/migration/migrator/tsup.ts:449 — 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 (14 lines × 2 locations) packages/prompts/src/select-key.ts:56— packages/prompts/src/select-key.ts:56 · packages/prompts/src/select.ts:135 — the 2 copies are spread across 2 files, 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 (13 lines × 2 locations) ecosystem-ci/patch-project.ts:168— ecosystem-ci/patch-project.ts:168 · ecosystem-ci/patch-project.ts:197 — both copies are in the same file, so extract the 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 locations) packages/cli/build.ts:1401— packages/cli/build.ts:1401 · packages/core/build.ts:794 — 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 (13 lines × 2 locations) packages/core/build-support/find-create-require.ts:102— packages/core/build-support/find-create-require.ts:102 · packages/core/build-support/find-create-require.ts:144 — both copies are in the same file, so extract the 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 locations) packages/cli/src/create/templates/builtin.ts:41— packages/cli/src/create/templates/builtin.ts:41 · packages/cli/src/create/templates/builtin.ts:70 — both copies are in the same file, so extract the 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 locations) packages/cli/src/migration/vitest-v5/config.ts:550— packages/cli/src/migration/vitest-v5/config.ts:550 · packages/cli/src/migration/vitest-v5/config.ts:563 — both copies are in the same file, so extract the 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 locations) packages/cli/src/utils/tsconfig.ts:199— packages/cli/src/utils/tsconfig.ts:199 · packages/cli/src/utils/tsconfig.ts:220 — 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.
vite_plus_cli::check::execute_check (cyclomatic 63) packages/cli/binding/src/check/mod.rs:21— vite_plus_cli::check::execute_check has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
vite_plus_cli::exec::workspace::execute_exec_workspace (cyclomatic 33) packages/cli/binding/src/exec/workspace.rs:17— vite_plus_cli::exec::workspace::execute_exec_workspace has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webdriverio.migrateWebdriverioDependencies::overrideMap (cyclomatic 30) packages/cli/src/migration/vitest-v5/webdriverio.ts:298— webdriverio.migrateWebdriverioDependencies::overrideMap 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. This shape REPEATS in the file: 2 other methods here (webdriverio.migrateWebdriverioDependencies, webdriverio.migrateWebdriverioDependencies::update) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
webdriverio.migrateWebdriverioDependencies::update (cyclomatic 17) packages/cli/src/migration/vitest-v5/webdriverio.ts:140— webdriverio.migrateWebdriverioDependencies::update 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 shape REPEATS in the file: 2 other methods here (webdriverio.migrateWebdriverioDependencies, webdriverio.migrateWebdriverioDependencies::overrideMap) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
vp_shared::header::query_terminal_colors (cyclomatic 21) crates/vp_shared/src/header.rs:297— vp_shared::header::query_terminal_colors 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.
vp_shared::header::is_osc_query_unsupported (cyclomatic 16) crates/vp_shared/src/header.rs:190— vp_shared::header::is_osc_query_unsupported has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
vp_static_config::count_returns_in_stmt (cyclomatic 17) crates/vp_static_config/src/lib.rs:375— vp_static_config::count_returns_in_stmt 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.
vp_static_config::expr_to_json (cyclomatic 17) crates/vp_static_config/src/lib.rs:482— vp_static_config::expr_to_json 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.
vite_plus_cli::check::execute_check (cognitive 105) packages/cli/binding/src/check/mod.rs:21— vite_plus_cli::check::execute_check has cognitive complexity 105 (threshold 15). Drivers by points: if/else 38 (77 pts), boolean chains 22, match/switch 3 (6 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.
vite_plus_cli::exec::workspace::execute_exec_workspace (cognitive 66) packages/cli/binding/src/exec/workspace.rs:17— vite_plus_cli::exec::workspace::execute_exec_workspace has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (49 pts), loops 5 (9 pts), match/switch 4 (6 pts), boolean chains 2 (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.
webdriverio.migrateWebdriverioDependencies::overrideMap (cognitive 47) packages/cli/src/migration/vitest-v5/webdriverio.ts:298— webdriverio.migrateWebdriverioDependencies::overrideMap has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 5 (16 pts), boolean chains 8, loops 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. This shape REPEATS in the file: 2 other methods here (webdriverio.migrateWebdriverioDependencies, webdriverio.migrateWebdriverioDependencies::update) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
webdriverio.migrateWebdriverioDependencies::update (cognitive 22) packages/cli/src/migration/vitest-v5/webdriverio.ts:140— webdriverio.migrateWebdriverioDependencies::update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3, ternaries 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. This shape REPEATS in the file: 2 other methods here (webdriverio.migrateWebdriverioDependencies, webdriverio.migrateWebdriverioDependencies::overrideMap) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
vp_toolchain::filter_manifest (cognitive 34) crates/vp_toolchain/src/lib.rs:262— vp_toolchain::filter_manifest has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 7 (14 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.
vp_toolchain::validate_manifest (cognitive 26) crates/vp_toolchain/src/lib.rs:140— vp_toolchain::validate_manifest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, loops 3 (4 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.
vp_cli_help::visible_length (cognitive 27) crates/vp_cli_help/src/lib.rs:181— vp_cli_help::visible_length has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (9 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_cli_help::render_help_doc_with_width (cognitive 17) crates/vp_cli_help/src/lib.rs:344— vp_cli_help::render_help_doc_with_width has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 2, match/switch 1 (2 pts) (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.
vp_installer::legacy::install (cognitive 24) crates/vp_installer/src/legacy.rs:11— vp_installer::legacy::install has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 1 (2 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.
vp_installer::do_install (cognitive 20) crates/vp_installer/src/main.rs:125— vp_installer::do_install has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
vp_js_runtime::runtime::resolve_node_version (cognitive 24) crates/vp_js_runtime/src/runtime.rs:368— vp_js_runtime::runtime::resolve_node_version has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_js_runtime::download::download_file (cognitive 23) crates/vp_js_runtime/src/download.rs:38— vp_js_runtime::download::download_file has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vp_static_config::extract_config_from_expr (cognitive 24) crates/vp_static_config/src/lib.rs:205— vp_static_config::extract_config_from_expr has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 2 (3 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
vp_static_config::expr_to_json (cognitive 19) crates/vp_static_config/src/lib.rs:482— vp_static_config::expr_to_json has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×2
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×2
Edited copy of a member (34 corresponding lines) crates/vp_global_cli/src/commands/env/off.rs:15— crates/vp_global_cli/src/commands/env/off.rs:15-48 | crates/vp_global_cli/src/commands/env/on.rs:14-47 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) crates/vp_cli_help/src/lib.rs:181— crates/vp_cli_help/src/lib.rs:181-214 | crates/vp_global_cli/src/help.rs:142-178 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) crates/vp_pm_cli/src/resolution/commands/list.rs:71— crates/vp_pm_cli/src/resolution/commands/list.rs:71-93 | crates/vp_pm_cli/src/resolution/commands/outdated.rs:108-129 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) crates/vp_pm_cli/src/package_manager.rs:1857— crates/vp_pm_cli/src/package_manager.rs:1857-1878 | crates/vp_pm_cli/src/package_manager.rs:2034-2055 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) crates/vp_pm_cli/src/resolution/commands/update.rs:76— crates/vp_pm_cli/src/resolution/commands/update.rs:76-92 | crates/vp_pm_cli/src/resolution/commands/why.rs:86-104 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/vp_global_cli/src/commands/vpx.rs:421— crates/vp_global_cli/src/commands/vpx.rs:421-437 | crates/vp_pm_cli/src/resolution/commands/dlx.rs:151-167 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×2
Edited copy of a member (8 corresponding lines) crates/vp_global_cli/src/commands/env/current.rs:49— crates/vp_global_cli/src/commands/env/current.rs:49-60 | crates/vp_global_cli/src/commands/version.rs:130-137 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/vp_migration/src/vite_config.rs:664— crates/vp_migration/src/vite_config.rs:664-671 | crates/vp_migration/src/vite_config.rs:691-699 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) crates/vp_pm_cli/src/package_manager.rs:1104— crates/vp_pm_cli/src/package_manager.rs:1104-1111 | crates/vp_setup/src/lockfile.rs:40-46 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/vp_pm_cli/src/resolution/commands/ping.rs:25— crates/vp_pm_cli/src/resolution/commands/ping.rs:25-31 | crates/vp_pm_cli/src/resolution/commands/whoami.rs:61-68 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) crates/vp_command/src/lib.rs:112— crates/vp_command/src/lib.rs:112-124 | crates/vp_command/src/lib.rs:163-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_command/src/lib.rs:112` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/vp_setup/src/install.rs:777— crates/vp_setup/src/install.rs:777-789 | crates/vp_setup/src/install.rs:979-991 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_setup/src/install.rs:777` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/vp_pm_cli/src/package_manager.rs:2006— crates/vp_pm_cli/src/package_manager.rs:2006-2017 | crates/vp_pm_cli/src/package_manager.rs:2214-2225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_pm_cli/src/package_manager.rs:2006` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/vp_pm_cli/src/resolution/commands/add.rs:285— crates/vp_pm_cli/src/resolution/commands/add.rs:285-296 | crates/vp_pm_cli/src/resolution/commands/add.rs:322-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.
Duplicated block (10 lines × 2) crates/vp_global_cli/src/commands/vpx.rs:156— crates/vp_global_cli/src/commands/vpx.rs:156-165 | crates/vp_global_cli/src/commands/vpx.rs:194-203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/commands/vpx.rs:156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/vp_cli_snapshots/src/bin/vpt/exit_code.rs:7— crates/vp_cli_snapshots/src/bin/vpt/exit_code.rs:7-16 | crates/vp_shared/src/process.rs:5-14 — 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.
R10 · Code Duplication· Duplicated block with local edits (34 matched lines × 2 locations) · ×2
Duplicated block with local edits (34 matched lines × 2 locations) packages/prompts/src/autocomplete.ts:171— packages/prompts/src/autocomplete.ts:171 · packages/prompts/src/autocomplete.ts:392 — the two spans are one implementation copied and then locally edited — 205 tokens are still identical, in the same order in both spans, 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 with local edits (34 matched lines × 2 locations) packages/prompts/src/confirm.ts:16— packages/prompts/src/confirm.ts:16 · packages/prompts/src/text.ts:15 — the two spans are one implementation copied and then locally edited — 265 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 (17 lines × 2 locations) packages/cli/src/migration/migrator/orchestrators.ts:631— packages/cli/src/migration/migrator/orchestrators.ts:631 · packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:1173 — 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 (17 lines × 2 locations) packages/prompts/src/common.ts:114— packages/prompts/src/common.ts:114 · packages/prompts/src/common.ts:132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 3 locations) packages/cli/src/migration/migrator/catalog.ts:739— packages/cli/src/migration/migrator/catalog.ts:739 · packages/cli/src/migration/migrator/catalog.ts:750 · packages/cli/src/migration/migrator/catalog.ts:1374 — all 3 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 (11 lines × 3 locations) packages/cli/src/migration/migrator/eslint.ts:351— packages/cli/src/migration/migrator/eslint.ts:351 · packages/cli/src/migration/migrator/prettier.ts:191 · packages/cli/src/migration/migrator/prettier.ts:208 — 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 (11 lines × 2 locations) packages/cli/src/migration/setup-plan.ts:104— packages/cli/src/migration/setup-plan.ts:104 · packages/cli/src/migration/setup-plan.ts:153 — 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 (11 lines × 2 locations) REDACTED:252— REDACTED:252 · REDACTED:334 — 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 (10 matched lines × 2 locations) · ×2
Duplicated block with local edits (10 matched lines × 2 locations) packages/cli/src/migration/migrator/package-json.ts:95— packages/cli/src/migration/migrator/package-json.ts:95 · packages/cli/src/migration/migrator/vitest-ecosystem.ts:735 — the two spans are one implementation copied and then locally edited — 71 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 with local edits (10 matched lines × 2 locations) packages/cli/src/migration/migrator/prettier.ts:69— packages/cli/src/migration/migrator/prettier.ts:69 · packages/cli/src/utils/git.ts:26 — the two spans are one implementation copied and then locally edited — 55 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.
X2 · Cancellation propagation· Async function without AbortSignal · ×2
Async function without AbortSignal: npmLastWeekDownloads docs/.vitepress/theme/data/fetch-trusted-stack-stats.ts:60— `npmLastWeekDownloads` 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 })`.
Async function without AbortSignal: fetchGithubStargazers docs/.vitepress/theme/data/fetch-trusted-stack-stats.ts:81— `fetchGithubStargazers` 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 })`.
source.rewriteSource (cyclomatic 218) packages/cli/src/migration/vitest-v5/source.ts:536— source.rewriteSource has cyclomatic complexity 218 (threshold 15). Of this number, 198 points are the body's own statements and 20 belong to 8 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.
bin.main (cyclomatic 147) packages/cli/src/create/bin.ts:311— bin.main has cyclomatic complexity 147 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (bin.main::resolveProjectSetup) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
bin.main (cyclomatic 116) packages/cli/src/migration/bin.ts:1046— bin.main has cyclomatic complexity 116 (threshold 15). Of this number, 109 points are the body's own statements and 7 belong to 4 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.
scopes.resolveVitestV5TestModes::walk (cyclomatic 93) packages/cli/src/migration/vitest-v5/scopes.ts:392— scopes.resolveVitestV5TestModes::walk has cyclomatic complexity 93 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ts-node-config.prepareTsNodeRun (cyclomatic 82) packages/cli/src/migration/migrator/ts-node-config.ts:197— ts-node-config.prepareTsNodeRun 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.
package-json.rewritePackageJson (cyclomatic 78) packages/cli/src/migration/migrator/package-json.ts:39— package-json.rewritePackageJson has cyclomatic complexity 78 (threshold 15). Of this number, 76 points are the body's own statements and 2 belong to 2 function literals 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.
vite-plus-bootstrap.ensureVitePlusBootstrap (cyclomatic 56) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:945— vite-plus-bootstrap.ensureVitePlusBootstrap has cyclomatic complexity 56 (threshold 15). Of this number, 32 points are the body's own statements and 24 belong to 2 function literals 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.
config.migrateConfig::testOptions (cyclomatic 54) packages/cli/src/migration/vitest-v5/config.ts:321— config.migrateConfig::testOptions 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. This shape REPEATS in the file: one other method here (config.migrateConfig) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
benchmark-config.migrateBenchmarkConfig (cyclomatic 42) packages/cli/src/migration/vitest-v5/benchmark-config.ts:24— benchmark-config.migrateBenchmarkConfig 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.
lockfile.lockedVitestVersion (cyclomatic 42) packages/cli/src/migration/vitest-v5/lockfile.ts:79— lockfile.lockedVitestVersion has cyclomatic complexity 42 (threshold 15). Of this number, 37 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.
benchmarks.migrateBenchmarks (cyclomatic 40) packages/cli/src/migration/vitest-v5/benchmarks.ts:19— benchmarks.migrateBenchmarks 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. This shape REPEATS in the file: one other method here (benchmarks.migrateBenchmarks::directCall) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
source.globalRestorationOrigin (cyclomatic 40) packages/cli/src/migration/vitest-v5/source.ts:119— source.globalRestorationOrigin 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.
vitest-v5.scanAndRewriteFile (cyclomatic 38) packages/cli/src/migration/migrator/vitest-v5.ts:528— vitest-v5.scanAndRewriteFile 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.
orchestrators.rewriteStandaloneProject (cyclomatic 38) packages/cli/src/migration/migrator/orchestrators.ts:76— orchestrators.rewriteStandaloneProject has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 14 of the 38 points are its own statements and the rest belongs to one function literal inside it that branches (line 152). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
config.migrateConfig (cyclomatic 37) packages/cli/src/migration/vitest-v5/config.ts:273— config.migrateConfig 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. This shape REPEATS in the file: one other method here (config.migrateConfig::testOptions) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
vite-plus-bootstrap.detectVitePlusBootstrapPending (cyclomatic 36) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:617— vite-plus-bootstrap.detectVitePlusBootstrapPending has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sync-remote-deps.mergePnpmWorkspaces (cyclomatic 34) REDACTED:596— sync-remote-deps.mergePnpmWorkspaces 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.
script-runner.scanOptions (cyclomatic 33) packages/cli/src/migration/migrator/script-runner.ts:775— script-runner.scanOptions has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bin.showMigrationSummary (cyclomatic 33) packages/cli/src/migration/bin.ts:506— bin.showMigrationSummary has cyclomatic complexity 33 (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.
build.buildVite (cyclomatic 33) packages/core/build.ts:107— build.buildVite has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 7 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 108, 113, 235). 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.
storybook.resolveStorybookScope (cyclomatic 32) packages/cli/src/migration/vitest-v5/storybook.ts:121— storybook.resolveStorybookScope has cyclomatic complexity 32 (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.
oxlint-config.prepareOxlintConfigModules (cyclomatic 32) packages/cli/src/migration/migrator/oxlint-config.ts:336— oxlint-config.prepareOxlintConfigModules has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 belong to 4 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.
bin.executeMigrationPlan (cyclomatic 32) packages/cli/src/migration/bin.ts:741— bin.executeMigrationPlan has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 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.
autocomplete.autocompleteMultiselect (cyclomatic 32) packages/prompts/src/autocomplete.ts:288— autocomplete.autocompleteMultiselect has cyclomatic complexity 32 (threshold 15). Of this number, 20 points are the body's own statements and 12 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.
multi-select.multiselect (cyclomatic 32) packages/prompts/src/multi-select.ts:40— multi-select.multiselect has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 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.
script-runner.rewriteSegment (cyclomatic 31) packages/cli/src/migration/migrator/script-runner.ts:223— script-runner.rewriteSegment has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs 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.
commands.migrateBenchmarkOutput (cyclomatic 31) packages/cli/src/migration/vitest-v5/commands.ts:37— commands.migrateBenchmarkOutput has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
group-multi-select.groupMultiselect::opt (cyclomatic 31) packages/prompts/src/group-multi-select.ts:54— group-multi-select.groupMultiselect::opt 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. This shape REPEATS in the file: one other method here (group-multi-select.groupMultiselect) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
autocomplete.autocomplete (cyclomatic 30) packages/prompts/src/autocomplete.ts:109— autocomplete.autocomplete has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to one function literal 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.
config-object.resolveConfigObject (cyclomatic 29) packages/cli/src/migration/vitest-v5/config-object.ts:32— config-object.resolveConfigObject has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to one function literal 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.
benchmarks.migrateBenchmarks::directCall (cyclomatic 29) packages/cli/src/migration/vitest-v5/benchmarks.ts:71— benchmarks.migrateBenchmarks::directCall has cyclomatic complexity 29 (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. This shape REPEATS in the file: one other method here (benchmarks.migrateBenchmarks) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
detector.detectConfigs (cyclomatic 28) packages/cli/src/migration/detector.ts:163— detector.detectConfigs 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.
script-runner.environmentFileUse (cyclomatic 28) packages/cli/src/migration/migrator/script-runner.ts:1195— script-runner.environmentFileUse 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.
catalog.rewritePnpmWorkspaceYaml (cyclomatic 28) packages/cli/src/migration/migrator/catalog.ts:312— catalog.rewritePnpmWorkspaceYaml has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 329). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
vite-plus-bootstrap.reconcileVitePlusBootstrapPackage (cyclomatic 28) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:304— vite-plus-bootstrap.reconcileVitePlusBootstrapPackage 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.
config.findVitestV5ConfigFiles (cyclomatic 27) packages/cli/src/migration/vitest-v5/config.ts:85— config.findVitestV5ConfigFiles has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (addReference, collectReferences, a function literal at line 92). 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.
storybook.configPath (cyclomatic 27) packages/cli/src/migration/vitest-v5/storybook.ts:52— storybook.configPath 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.
sync-remote-deps.mergeSemverVersions (cyclomatic 27) REDACTED:463— sync-remote-deps.mergeSemverVersions 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.
build.createConditionalShim (cyclomatic 26) packages/cli/build.ts:1280— build.createConditionalShim 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.
source.isAssertionBindingHandled (cyclomatic 26) packages/cli/src/migration/vitest-v5/source.ts:397— source.isAssertionBindingHandled has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
webdriverio.migrateWebdriverioDependencies (cyclomatic 26) packages/cli/src/migration/vitest-v5/webdriverio.ts:63— webdriverio.migrateWebdriverioDependencies 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. This shape REPEATS in the file: 2 other methods here (webdriverio.migrateWebdriverioDependencies::update, webdriverio.migrateWebdriverioDependencies::overrideMap) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
local-npm-registry.server (cyclomatic 26) REDACTED:607— local-npm-registry.server has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal 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.
build.syncTestPackageExports (cyclomatic 25) packages/cli/build.ts:344— build.syncTestPackageExports 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.
eslint.sanitizeMigratedOxlintConfig (cyclomatic 25) packages/cli/src/migration/migrator/eslint.ts:855— eslint.sanitizeMigratedOxlintConfig 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.
SourceEditor.finish (cyclomatic 25) packages/cli/src/migration/vitest-v5/ast.ts:514— SourceEditor.finish has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal 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.
agent.writeAgentInstructions (cyclomatic 25) packages/cli/src/utils/agent.ts:414— agent.writeAgentInstructions 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.
scopes.projectSelected (cyclomatic 24) packages/cli/src/migration/vitest-v5/scopes.ts:255— scopes.projectSelected has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
vitest-v5.lockedSourceVersion (cyclomatic 24) packages/cli/src/migration/migrator/vitest-v5.ts:183— vitest-v5.lockedSourceVersion has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 belong to 2 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.
vitest-v5.planVitestV5Migration (cyclomatic 24) packages/cli/src/migration/migrator/vitest-v5.ts:698— vitest-v5.planVitestV5Migration has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
vite-config.mergeOxlintConfigFile (cyclomatic 24) REDACTED:344— vite-config.mergeOxlintConfigFile has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: 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.
editor.writeEditorConfig (cyclomatic 24) packages/cli/src/utils/editor.ts:368— editor.writeEditorConfig 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.
vitest-v5.sourceVersion (cyclomatic 23) packages/cli/src/migration/migrator/vitest-v5.ts:326— vitest-v5.sourceVersion 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.
catalog.rewriteBunCatalog (cyclomatic 23) packages/cli/src/migration/migrator/catalog.ts:1108— catalog.rewriteBunCatalog has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 1125). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
catalog.rewriteRootWorkspacePackageJson (cyclomatic 23) packages/cli/src/migration/migrator/catalog.ts:1211— catalog.rewriteRootWorkspacePackageJson has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 1251). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
git-hooks.installGitHooks (cyclomatic 23) packages/cli/src/migration/migrator/git-hooks.ts:383— git-hooks.installGitHooks has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function literal 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.
ts-node.incompatibleModuleSource (cyclomatic 22) packages/cli/src/migration/migrator/ts-node.ts:29— ts-node.incompatibleModuleSource has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 3 function literals 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.
ast.sameStaticValue (cyclomatic 22) packages/cli/src/migration/vitest-v5/ast.ts:169— ast.sameStaticValue has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
scopes.findVitestV5ConfigEntries (cyclomatic 22) packages/cli/src/migration/vitest-v5/scopes.ts:94— scopes.findVitestV5ConfigEntries has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal 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.
source-scan.sourceTreeMatches::scanDir (cyclomatic 22) packages/cli/src/migration/migrator/source-scan.ts:214— source-scan.sourceTreeMatches::scanDir 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.
limit-options.limitOptions (cyclomatic 22) packages/prompts/src/limit-options.ts:107— limit-options.limitOptions 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.
script-runner.rewriteNodeLoader (cyclomatic 21) packages/cli/src/migration/migrator/script-runner.ts:575— script-runner.rewriteNodeLoader has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal 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.
commands.migrateVitestV5Command (cyclomatic 21) packages/cli/src/migration/vitest-v5/commands.ts:121— commands.migrateVitestV5Command has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal 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.
password.password (cyclomatic 21) packages/prompts/src/password.ts:23— password.password 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.
sync-remote-deps.createExportTransformer.<returned closure> (cyclomatic 21) REDACTED:230— sync-remote-deps.createExportTransformer.<returned closure> has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 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.
vp_toolchain::validate_manifest (cyclomatic 20) crates/vp_toolchain/src/lib.rs:140— vp_toolchain::validate_manifest 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.
vp_trampoline::win::run (cyclomatic 20) crates/vp_trampoline/src/win.rs:444— vp_trampoline::win::run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tsup.migrateTsupToTsdown (cyclomatic 20) packages/cli/src/migration/migrator/tsup.ts:410— tsup.migrateTsupToTsdown has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal 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.
vite-config.mergeAndRemoveJsonConfig (cyclomatic 20) REDACTED:638— vite-config.mergeAndRemoveJsonConfig 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.
discovery.expandCreateShorthand (cyclomatic 20) packages/cli/src/create/discovery.ts:234— discovery.expandCreateShorthand 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.
RemovalPlan::new (cyclomatic 19) crates/vp_global_cli/src/commands/implode/plan.rs:22— RemovalPlan::new 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.
PmCommand::is_quiet_or_machine_readable (cyclomatic 19) crates/vp_pm_cli/src/cli.rs:385— PmCommand::is_quiet_or_machine_readable has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: PmCommand::resolve_for_manager (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.
eslint.sanitizeInheritedJsPlugins (cyclomatic 19) packages/cli/src/migration/migrator/eslint.ts:774— eslint.sanitizeInheritedJsPlugins has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 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.
vpx-script.detectScript (cyclomatic 19) packages/cli/src/vpx-script.ts:224— vpx-script.detectScript 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.
ts-node-config.readTsNodeOptions (cyclomatic 19) packages/cli/src/migration/migrator/ts-node-config.ts:127— ts-node-config.readTsNodeOptions 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.
vitest-v5.finishVitestV5Migration (cyclomatic 19) packages/cli/src/migration/migrator/vitest-v5.ts:958— vitest-v5.finishVitestV5Migration has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal 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.
git-hooks.preflightGitHooksSetup (cyclomatic 19) packages/cli/src/migration/migrator/git-hooks.ts:303— git-hooks.preflightGitHooksSetup 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.
define-config.vitePlusVitestResolverPlugin (cyclomatic 19) packages/cli/src/define-config.ts:282— define-config.vitePlusVitestResolverPlugin has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals 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.
oxlint-plugin.rewriteVitePlusImportSpecifier (cyclomatic 19) packages/cli/src/oxlint-plugin.ts:80— oxlint-plugin.rewriteVitePlusImportSpecifier 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.
select.select (cyclomatic 19) packages/prompts/src/select.ts:94— select.select has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
text.text (cyclomatic 19) packages/prompts/src/text.ts:23— text.text 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.
vp_installer::legacy::install (cyclomatic 18) crates/vp_installer/src/legacy.rs:11— vp_installer::legacy::install 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.
vpx-script.parseVpxArgs (cyclomatic 18) packages/cli/src/vpx-script.ts:166— vpx-script.parseVpxArgs 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.
tsx.typescriptScriptKeepReason (cyclomatic 18) packages/cli/src/migration/migrator/tsx.ts:192— tsx.typescriptScriptKeepReason 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.
ast.testApiName (cyclomatic 18) packages/cli/src/migration/vitest-v5/ast.ts:266— ast.testApiName has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
vitest-v5.checkNodeRange (cyclomatic 18) packages/cli/src/migration/migrator/vitest-v5.ts:412— vitest-v5.checkNodeRange 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.
bin.main (cyclomatic 18) packages/cli/src/config/bin.ts:17— bin.main 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.
group-multi-select.groupMultiselect (cyclomatic 18) packages/prompts/src/group-multi-select.ts:35— group-multi-select.groupMultiselect 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. This shape REPEATS in the file: one other method here (group-multi-select.groupMultiselect::opt) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
install-global-cli.installGlobalCli (cyclomatic 18) packages/tools/src/install-global-cli.ts:66— install-global-cli.installGlobalCli 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.
build.resolveToolchainNode (cyclomatic 17) packages/cli/build.ts:778— build.resolveToolchainNode 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.
build.createShimForExport (cyclomatic 17) packages/cli/build.ts:1192— build.createShimForExport 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.
detector.detectMigrationWarnings (cyclomatic 17) packages/cli/src/migration/detector.ts:110— detector.detectMigrationWarnings 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.
tsx.jsdocTagUsesTsx (cyclomatic 17) packages/cli/src/migration/migrator/tsx.ts:287— tsx.jsdocTagUsesTsx 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.
script-runner.rewriteRunnerShebang (cyclomatic 17) packages/cli/src/migration/migrator/script-runner.ts:1035— script-runner.rewriteRunnerShebang 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.
script-runner.migrateScriptRunnerToVpx (cyclomatic 17) packages/cli/src/migration/migrator/script-runner.ts:1317— script-runner.migrateScriptRunnerToVpx has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function literals 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.
ast.importedName (cyclomatic 17) packages/cli/src/migration/vitest-v5/ast.ts:207— ast.importedName 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.
source.processApiName (cyclomatic 17) packages/cli/src/migration/vitest-v5/source.ts:254— source.processApiName 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.
vitest-v5.installedSourceVersion (cyclomatic 17) packages/cli/src/migration/migrator/vitest-v5.ts:280— vitest-v5.installedSourceVersion 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.
vitest-v5.migrateNode (cyclomatic 17) packages/cli/src/migration/migrator/vitest-v5.ts:471— vitest-v5.migrateNode has cyclomatic complexity 17 (threshold 15). Of this number, 14 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.
vite-plus-bootstrap.collectToolchainVersionChanges (cyclomatic 17) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:1367— vite-plus-bootstrap.collectToolchainVersionChanges 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, 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.
command.runCommandAndDetectProjectDir (cyclomatic 17) packages/cli/src/create/command.ts:14— command.runCommandAndDetectProjectDir 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.
sync-remote-deps.transformViteExport (cyclomatic 17) REDACTED:309— sync-remote-deps.transformViteExport has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 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.
ts-node-config.readTsNodeEnvironment (cyclomatic 16) packages/cli/src/migration/migrator/ts-node-config.ts:80— ts-node-config.readTsNodeEnvironment 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.
workspace.detectWorkspace (cyclomatic 16) packages/cli/src/utils/workspace.ts:40— workspace.detectWorkspace 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.
catalog.rewriteYamlCatalogAtPath (cyclomatic 16) packages/cli/src/migration/migrator/catalog.ts:978— catalog.rewriteYamlCatalogAtPath 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.
hooks.status (cyclomatic 16) packages/cli/src/config/hooks.ts:748— hooks.status 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.
git-hooks.vpConfigHookCommands (cyclomatic 16) packages/cli/src/migration/migrator/git-hooks.ts:169— git-hooks.vpConfigHookCommands 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.
bin.main::resolveProjectSetup (cyclomatic 16) packages/cli/src/create/bin.ts:744— bin.main::resolveProjectSetup 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. This shape REPEATS in the file: one other method here (bin.main) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
box.box (cyclomatic 16) packages/prompts/src/box.ts:67— box.box 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.
bin.main (cognitive 271) packages/cli/src/create/bin.ts:311— bin.main has cognitive complexity 271 (threshold 15). Drivers by points: if/else 107 (181 pts), boolean chains 44, ternaries 20 (32 pts), loops 3 (8 pts), error handling 3 (6 pts) (nesting depth added 94). Of this number, 231 points are the body's own statements and 40 belong to 11 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.
source.rewriteSource (cognitive 265) packages/cli/src/migration/vitest-v5/source.ts:536— source.rewriteSource has cognitive complexity 265 (threshold 15). Drivers by points: if/else 84 (132 pts), boolean chains 79, ternaries 15 (42 pts), loops 6 (12 pts) (nesting depth added 81). Of this number, 249 points are the body's own statements and 16 belong to 8 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.
bin.main (cognitive 214) packages/cli/src/migration/bin.ts:1046— bin.main has cognitive complexity 214 (threshold 15). Drivers by points: if/else 66 (158 pts), boolean chains 26, ternaries 8 (18 pts), loops 4 (12 pts) (nesting depth added 110). Of this number, 202 points are the body's own statements and 12 belong to 4 function items inside it that branch. 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.
ts-node-config.prepareTsNodeRun (cognitive 127) packages/cli/src/migration/migrator/ts-node-config.ts:197— ts-node-config.prepareTsNodeRun has cognitive complexity 127 (threshold 15). Drivers by points: if/else 46 (89 pts), boolean chains 24, ternaries 4 (7 pts), error handling 2 (6 pts), loops 1 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scopes.resolveVitestV5TestModes::walk (cognitive 121) packages/cli/src/migration/vitest-v5/scopes.ts:392— scopes.resolveVitestV5TestModes::walk has cognitive complexity 121 (threshold 15). Drivers by points: if/else 26 (55 pts), boolean chains 33, ternaries 22 (26 pts), loops 3 (7 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.
package-json.rewritePackageJson (cognitive 103) packages/cli/src/migration/migrator/package-json.ts:39— package-json.rewritePackageJson has cognitive complexity 103 (threshold 15). Drivers by points: if/else 31 (64 pts), boolean chains 23, loops 8 (12 pts), ternaries 3 (4 pts) (nesting depth added 38). Of this number, 102 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.migrateConfig::testOptions (cognitive 83) packages/cli/src/migration/vitest-v5/config.ts:321— config.migrateConfig::testOptions has cognitive complexity 83 (threshold 15). Drivers by points: if/else 31 (57 pts), boolean chains 17, loops 4 (9 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. This shape REPEATS in the file: one other method here (config.migrateConfig) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-runner.scanOptions (cognitive 77) packages/cli/src/migration/migrator/script-runner.ts:775— script-runner.scanOptions has cognitive complexity 77 (threshold 15). Drivers by points: if/else 15 (43 pts), ternaries 6 (24 pts), boolean chains 9, loops 1 (nesting depth added 46). 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.
lockfile.lockedVitestVersion (cognitive 72) packages/cli/src/migration/vitest-v5/lockfile.ts:79— lockfile.lockedVitestVersion has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (41 pts), ternaries 7 (16 pts), boolean chains 8, loops 3 (6 pts), error handling 1 (nesting depth added 34). Of this number, 66 points are the body's own statements and 6 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.
vite-plus-bootstrap.ensureVitePlusBootstrap (cognitive 66) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:945— vite-plus-bootstrap.ensureVitePlusBootstrap has cognitive complexity 66 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 18, ternaries 5 (8 pts), loops 1 (nesting depth added 18). Of this number, 35 points are the body's own statements and 31 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
eslint.sanitizeMigratedOxlintConfig (cognitive 59) packages/cli/src/migration/migrator/eslint.ts:855— eslint.sanitizeMigratedOxlintConfig has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 7 (17 pts), boolean chains 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.
orchestrators.rewriteStandaloneProject (cognitive 57) packages/cli/src/migration/migrator/orchestrators.ts:76— orchestrators.rewriteStandaloneProject has cognitive complexity 57 (threshold 15). Drivers by points: if/else 23 (38 pts), boolean chains 10, ternaries 2 (5 pts), loops 2 (4 pts) (nesting depth added 20). Most of this is not in the body itself: 15 of the 57 points are its own statements and the rest belongs to one function literal inside it that branches (line 152). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
agent.writeAgentInstructions (cognitive 56) packages/cli/src/utils/agent.ts:414— agent.writeAgentInstructions has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (47 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
autocomplete.autocomplete (cognitive 55) packages/prompts/src/autocomplete.ts:109— autocomplete.autocomplete has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 18 (40 pts), if/else 5 (10 pts), boolean chains 4, match/switch 1 (nesting depth added 27). Of this number, 45 points are the body's own statements and 10 belong to one function literal 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.
webdriverio.migrateWebdriverioDependencies (cognitive 52) packages/cli/src/migration/vitest-v5/webdriverio.ts:63— webdriverio.migrateWebdriverioDependencies has cognitive complexity 52 (threshold 15). Drivers by points: if/else 40 (76 pts), ternaries 15 (39 pts), boolean chains 18, loops 5 (9 pts) (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. This shape REPEATS in the file: 2 other methods here (webdriverio.migrateWebdriverioDependencies::update, webdriverio.migrateWebdriverioDependencies::overrideMap) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
build.syncTestPackageExports (cognitive 51) packages/cli/build.ts:344— build.syncTestPackageExports has cognitive complexity 51 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 7 (17 pts), loops 6 (9 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
editor.writeEditorConfig (cognitive 51) packages/cli/src/utils/editor.ts:368— editor.writeEditorConfig has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (34 pts), ternaries 4 (13 pts), boolean chains 3, loops 1 (nesting depth added 28). 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.
script-runner.environmentFileUse (cognitive 50) packages/cli/src/migration/migrator/script-runner.ts:1195— script-runner.environmentFileUse has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 8, error handling 1 (4 pts), ternaries 2 (4 pts), loops 2 (3 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.
config.findVitestV5ConfigFiles (cognitive 49) packages/cli/src/migration/vitest-v5/config.ts:85— config.findVitestV5ConfigFiles has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 5 (9 pts), boolean chains 7, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 21). Of this number, 20 points are the body's own statements and 29 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.
vitest-v5.scanAndRewriteFile (cognitive 49) packages/cli/src/migration/migrator/vitest-v5.ts:528— vitest-v5.scanAndRewriteFile has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 10, ternaries 2 (5 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scopes.findVitestV5ConfigEntries (cognitive 48) packages/cli/src/migration/vitest-v5/scopes.ts:94— scopes.findVitestV5ConfigEntries has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (10 pts), ternaries 2 (10 pts), boolean chains 7 (nesting depth added 26). Of this number, 47 points are the body's own statements and 1 belongs to one function literal 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.
sync-remote-deps.mergePnpmWorkspaces (cognitive 47) REDACTED:596— sync-remote-deps.mergePnpmWorkspaces has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 12, loops 3 (5 pts), ternaries 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.
benchmark-config.migrateBenchmarkConfig (cognitive 46) packages/cli/src/migration/vitest-v5/benchmark-config.ts:24— benchmark-config.migrateBenchmarkConfig has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 15, ternaries 4, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
catalog.rewritePnpmWorkspaceYaml (cognitive 46) packages/cli/src/migration/migrator/catalog.ts:312— catalog.rewritePnpmWorkspaceYaml has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (31 pts), loops 7 (9 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 17). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to one function literal inside it that branches (line 329). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
vite-plus-bootstrap.reconcileVitePlusBootstrapPackage (cognitive 43) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:304— vite-plus-bootstrap.reconcileVitePlusBootstrapPackage has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 6 (8 pts), boolean chains 6 (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.
build.createConditionalShim (cognitive 42) packages/cli/build.ts:1280— build.createConditionalShim has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 3 (10 pts), boolean chains 7 (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.
SourceEditor.finish (cognitive 42) packages/cli/src/migration/vitest-v5/ast.ts:514— SourceEditor.finish has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 8 (19 pts), if/else 4 (9 pts), boolean chains 7, loops 3 (5 pts), error handling 1 (2 pts) (nesting depth added 19). Of this number, 41 points are the body's own statements and 1 belongs to one function literal 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.
bin.showMigrationSummary (cognitive 42) packages/cli/src/migration/bin.ts:506— bin.showMigrationSummary has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (24 pts), ternaries 5 (11 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
sync-remote-deps.mergeSemverVersions (cognitive 42) REDACTED:463— sync-remote-deps.mergeSemverVersions has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (25 pts), ternaries 3 (10 pts), boolean chains 7 (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.
benchmarks.migrateBenchmarks (cognitive 41) packages/cli/src/migration/vitest-v5/benchmarks.ts:19— benchmarks.migrateBenchmarks has cognitive complexity 41 (threshold 15). Drivers by points: if/else 32 (44 pts), boolean chains 25, loops 5 (7 pts), ternaries 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. This shape REPEATS in the file: one other method here (benchmarks.migrateBenchmarks::directCall) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
oxlint-config.prepareOxlintConfigModules (cognitive 41) packages/cli/src/migration/migrator/oxlint-config.ts:336— oxlint-config.prepareOxlintConfigModules has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 5 (8 pts), boolean chains 7, ternaries 4 (7 pts) (nesting depth added 13). Of this number, 28 points are the body's own statements and 13 belong to 4 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.
autocomplete.autocompleteMultiselect (cognitive 41) packages/prompts/src/autocomplete.ts:288— autocomplete.autocompleteMultiselect has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 20 (32 pts), boolean chains 6, if/else 2, match/switch 1 (nesting depth added 12). Of this number, 30 points are the body's own statements and 11 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.
detector.detectConfigs (cognitive 40) packages/cli/src/migration/detector.ts:163— detector.detectConfigs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 9, boolean chains 2, error handling 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.
tsup.migrateTsupToTsdown (cognitive 40) packages/cli/src/migration/migrator/tsup.ts:410— tsup.migrateTsupToTsdown has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 5 (10 pts), ternaries 4 (8 pts) (nesting depth added 19). Of this number, 39 points are the body's own statements and 1 belongs to one function literal 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.
source.globalRestorationOrigin (cognitive 40) packages/cli/src/migration/vitest-v5/source.ts:119— source.globalRestorationOrigin has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 5 (13 pts), boolean chains 11 (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.
config.migrateConfig (cognitive 39) packages/cli/src/migration/vitest-v5/config.ts:273— config.migrateConfig has cognitive complexity 39 (threshold 15). Drivers by points: if/else 55 (90 pts), boolean chains 37, loops 4 (9 pts), ternaries 2 (4 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (config.migrateConfig::testOptions) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
multi-select.multiselect (cognitive 39) packages/prompts/src/multi-select.ts:40— multi-select.multiselect has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 12 (22 pts), if/else 11 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 11). Of this number, 25 points are the body's own statements and 14 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.
bin.executeMigrationPlan (cognitive 38) packages/cli/src/migration/bin.ts:741— bin.executeMigrationPlan has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (29 pts), boolean chains 6, ternaries 3 (nesting depth added 5). Of this number, 32 points are the body's own statements and 6 belong to 3 function items inside it that branch. 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.
script-runner.rewriteSegment (cognitive 37) packages/cli/src/migration/migrator/script-runner.ts:223— script-runner.rewriteSegment has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 6, loops 4 (5 pts), ternaries 2 (3 pts) (nesting depth added 8). Of this number, 36 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
catalog.rewriteRootWorkspacePackageJson (cognitive 37) packages/cli/src/migration/migrator/catalog.ts:1211— catalog.rewriteRootWorkspacePackageJson has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 16). Most of this is not in the body itself: 2 of the 37 points are its own statements and the rest belongs to one function literal inside it that branches (line 1251). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
local-npm-registry.server (cognitive 37) REDACTED:607— local-npm-registry.server has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 6 (12 pts), boolean chains 8, error handling 2 (3 pts) (nesting depth added 12). Of this number, 36 points are the body's own statements and 1 belongs to one function literal 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.
RemovalPlan::new (cognitive 36) crates/vp_global_cli/src/commands/implode/plan.rs:22— RemovalPlan::new has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 3 (7 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vitest-ecosystem.dropRemovePackageOverrideKeys (cognitive 36) packages/cli/src/migration/migrator/vitest-ecosystem.ts:274— vitest-ecosystem.dropRemovePackageOverrideKeys has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (32 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.migrateBenchmarkOutput (cognitive 36) packages/cli/src/migration/vitest-v5/commands.ts:37— commands.migrateBenchmarkOutput has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 8 (9 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
storybook.resolveStorybookScope (cognitive 36) packages/cli/src/migration/vitest-v5/storybook.ts:121— storybook.resolveStorybookScope has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 8, loops 2, error handling 1, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
vite-plus-bootstrap.detectVitePlusBootstrapPending (cognitive 36) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:617— vite-plus-bootstrap.detectVitePlusBootstrapPending has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 12, ternaries 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
install-global-cli.installGlobalCli (cognitive 36) packages/tools/src/install-global-cli.ts:66— install-global-cli.installGlobalCli has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (28 pts), error handling 1 (4 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vitest-v5.finishVitestV5Migration (cognitive 35) packages/cli/src/migration/migrator/vitest-v5.ts:958— vitest-v5.finishVitestV5Migration has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 2 (6 pts), boolean chains 5, loops 3 (5 pts), error handling 1 (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.
group-multi-select.groupMultiselect::opt (cognitive 35) packages/prompts/src/group-multi-select.ts:54— group-multi-select.groupMultiselect::opt has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 13 (22 pts), boolean chains 10, if/else 3 (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. This shape REPEATS in the file: one other method here (group-multi-select.groupMultiselect) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
limit-options.limitOptions (cognitive 34) packages/prompts/src/limit-options.ts:107— limit-options.limitOptions has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 3 (4 pts), boolean chains 2, ternaries 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.
vitest-v5.planVitestV5Migration (cognitive 33) packages/cli/src/migration/migrator/vitest-v5.ts:698— vitest-v5.planVitestV5Migration has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 9, loops 4 (6 pts), ternaries 3 (6 pts) (nesting depth added 12). Of this number, 32 points are the body's own statements and 1 belongs to one function literal 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.
bin.main (cognitive 32) packages/cli/src/config/bin.ts:17— bin.main has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 3 (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.
sync-remote-deps.createExportTransformer.<returned closure> (cognitive 32) REDACTED:230— sync-remote-deps.createExportTransformer.<returned closure> has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (22 pts), ternaries 3 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 12). Of this number, 17 points are the body's own statements and 15 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.
script-runner.migrateScriptRunnerToVpx (cognitive 31) packages/cli/src/migration/migrator/script-runner.ts:1317— script-runner.migrateScriptRunnerToVpx has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (8 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 15). Of this number, 18 points are the body's own statements and 13 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config-object.resolveConfigObject (cognitive 31) packages/cli/src/migration/vitest-v5/config-object.ts:32— config-object.resolveConfigObject has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7, 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.
source-scan.sourceTreeMatches::scanDir (cognitive 31) packages/cli/src/migration/migrator/source-scan.ts:214— source-scan.sourceTreeMatches::scanDir has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 6, error handling 2 (4 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
org-tarball-reader.validateTarRecords (cognitive 31) packages/cli/src/create/org-tarball-reader.ts:23— org-tarball-reader.validateTarRecords has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (4 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.
build.buildVite (cognitive 31) packages/core/build.ts:107— build.buildVite has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 8, loops 2 (nesting depth added 7). Most of this is not in the body itself: 10 of the 31 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 108, 113, 235). 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.
group-multi-select.groupMultiselect (cognitive 30) packages/prompts/src/group-multi-select.ts:35— group-multi-select.groupMultiselect has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 29 (64 pts), boolean chains 15, if/else 7 (9 pts), match/switch 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. This shape REPEATS in the file: one other method here (group-multi-select.groupMultiselect::opt) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
password.password (cognitive 30) packages/prompts/src/password.ts:23— password.password has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 13 (25 pts), boolean chains 2, if/else 1 (2 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
git-hooks.installGitHooks (cognitive 29) packages/cli/src/migration/migrator/git-hooks.ts:383— git-hooks.installGitHooks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 24 points are the body's own statements and 5 belong to one function literal 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.
eslint.sanitizeInheritedJsPlugins (cognitive 28) packages/cli/src/migration/migrator/eslint.ts:774— eslint.sanitizeInheritedJsPlugins has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (8 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 11). Of this number, 18 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.
vpx-script.detectScript (cognitive 28) packages/cli/src/vpx-script.ts:224— vpx-script.detectScript has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
script-runner.rewriteNodeLoader (cognitive 28) packages/cli/src/migration/migrator/script-runner.ts:575— script-runner.rewriteNodeLoader has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 10). Of this number, 27 points are the body's own statements and 1 belongs to one function literal 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.
storybook.configPath (cognitive 28) packages/cli/src/migration/vitest-v5/storybook.ts:52— storybook.configPath has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6, ternaries 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.
vite-config.mergeOxlintConfigFile (cognitive 28) REDACTED:344— vite-config.mergeOxlintConfigFile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, error handling 3, ternaries 2 (3 pts), loops 2 (nesting depth added 3). Of this number, 24 points are the body's own statements and 4 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.
text.text (cognitive 28) packages/prompts/src/text.ts:23— text.text has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 14 (27 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vitest-v5.migrateNode (cognitive 27) packages/cli/src/migration/migrator/vitest-v5.ts:471— vitest-v5.migrateNode has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (7 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 12). Of this number, 23 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.
catalog.rewriteBunCatalog (cognitive 27) packages/cli/src/migration/migrator/catalog.ts:1108— catalog.rewriteBunCatalog has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, loops 3 (5 pts), ternaries 3 (nesting depth added 5). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 1125). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
discovery.expandCreateShorthand (cognitive 27) packages/cli/src/create/discovery.ts:234— discovery.expandCreateShorthand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 6 (12 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.
tsup.restoreSharedTsupUsage (cognitive 26) packages/cli/src/migration/migrator/tsup.ts:269— tsup.restoreSharedTsupUsage has cognitive complexity 26 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (10 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 12). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 307). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
scopes.projectSelected (cognitive 26) packages/cli/src/migration/vitest-v5/scopes.ts:255— scopes.projectSelected has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 4). Of this number, 25 points are the body's own statements and 1 belongs to one function literal 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.
workspace.detectWorkspace (cognitive 26) packages/cli/src/utils/workspace.ts:40— workspace.detectWorkspace has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rewrite-module-specifiers.rewriteModuleSpecifiers (cognitive 26) packages/core/build-support/rewrite-module-specifiers.ts:119— rewrite-module-specifiers.rewriteModuleSpecifiers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 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.
BinRollback::restore (cognitive 25) crates/vp_global_cli/src/commands/global/install.rs:720— BinRollback::restore has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
build.createShimForExport (cognitive 25) packages/cli/build.ts:1192— build.createShimForExport has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 6 (10 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.runCommandAndDetectProjectDir (cognitive 25) packages/cli/src/create/command.ts:14— command.runCommandAndDetectProjectDir has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 2 (3 pts), ternaries 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.
select.select (cognitive 25) packages/prompts/src/select.ts:94— select.select has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 2 (3 pts), match/switch 2 (nesting depth added 11). Of this number, 15 points are the body's own statements and 10 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.
box.box (cognitive 25) packages/prompts/src/box.ts:67— box.box has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (5 pts), ternaries 4 (5 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.
confirm.confirm (cognitive 25) packages/prompts/src/confirm.ts:23— confirm.confirm has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 12 (24 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tsup.deleteTsupConfigFiles (cognitive 24) packages/cli/src/migration/migrator/tsup.ts:567— tsup.deleteTsupConfigFiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3, loops 1 (nesting depth added 11). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
tsx.jsdocTagUsesTsx (cognitive 24) packages/cli/src/migration/migrator/tsx.ts:287— tsx.jsdocTagUsesTsx has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ts-node-config.readTsNodeOptions (cognitive 24) packages/cli/src/migration/migrator/ts-node-config.ts:127— ts-node-config.readTsNodeOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4, error handling 1, 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.
benchmarks.migrateBenchmarks::directCall (cognitive 24) packages/cli/src/migration/vitest-v5/benchmarks.ts:71— benchmarks.migrateBenchmarks::directCall has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, 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. This shape REPEATS in the file: one other method here (benchmarks.migrateBenchmarks) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
source.isAssertionBindingHandled (cognitive 24) packages/cli/src/migration/vitest-v5/source.ts:397— source.isAssertionBindingHandled has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 3, 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.
vitest-v5.lockedSourceVersion (cognitive 24) packages/cli/src/migration/migrator/vitest-v5.ts:183— vitest-v5.lockedSourceVersion has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10, ternaries 5 (7 pts), boolean chains 6, error handling 1 (nesting depth added 2). Of this number, 12 points are the body's own statements and 12 belong to 2 function items inside it that branch. 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.
vite-config.mergeAndRemoveJsonConfig (cognitive 24) REDACTED:638— vite-config.mergeAndRemoveJsonConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (3 pts), error handling 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.
sync-remote-deps.transformViteExport (cognitive 24) REDACTED:309— sync-remote-deps.transformViteExport has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to one function item inside it that branches (transformValue). 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.
sync-remote-deps.mergePackageExports (cognitive 24) REDACTED:361— sync-remote-deps.mergePackageExports has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (8 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.
Npm::resolve (cognitive 23) crates/vp_pm_cli/src/resolution/commands/approve_builds.rs:102— Npm::resolve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 2 (5 pts), boolean chains 1 (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.
vp_shared::header::query_terminal_colors (cognitive 23) crates/vp_shared/src/header.rs:297— vp_shared::header::query_terminal_colors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 5 (6 pts), loops 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
vp_trampoline::win::run (cognitive 23) crates/vp_trampoline/src/win.rs:444— vp_trampoline::win::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (3 pts), boolean chains 2, match/switch 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
build.validateToolchainConfig (cognitive 23) packages/cli/build.ts:735— build.validateToolchainConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (5 pts), boolean chains 3 (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.
ts-node.incompatibleModuleSource (cognitive 23) packages/cli/src/migration/migrator/ts-node.ts:29— ts-node.incompatibleModuleSource has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, loops 1 (nesting depth added 7). Of this number, 22 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
build.brandTsdown (cognitive 23) packages/core/build.ts:559— build.brandTsdown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (6 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.
vendored-vitest.alignVendoredVitestDependencies (cognitive 23) packages/tools/src/vendored-vitest.ts:32— vendored-vitest.alignVendoredVitestDependencies has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 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.
build.resolveUpstreamDtsPath (cognitive 22) packages/cli/build.ts:1129— build.resolveUpstreamDtsPath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, ternaries 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.
tsconfig.fixBaseUrlInTsconfig (cognitive 22) packages/cli/src/utils/tsconfig.ts:78— tsconfig.fixBaseUrlInTsconfig has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
detector.detectMigrationWarnings (cognitive 22) packages/cli/src/migration/detector.ts:110— detector.detectMigrationWarnings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 7, loops 2 (3 pts), error handling 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.
prettier.deletePrettierConfigFiles (cognitive 22) packages/cli/src/migration/migrator/prettier.ts:183— prettier.deletePrettierConfigFiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1 (nesting depth added 11). Of this number, 21 points are the body's own statements and 1 belongs to one function literal 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.
prettier.rewritePrettierPackageJson (cognitive 22) packages/cli/src/migration/migrator/prettier.ts:229— prettier.rewritePrettierPackageJson has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 238). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
tsx.typescriptScriptKeepReason (cognitive 22) packages/cli/src/migration/migrator/tsx.ts:192— tsx.typescriptScriptKeepReason has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), boolean chains 5, loops 1 (2 pts), 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.
vite-config.rewriteLintStagedConfigFile (cognitive 22) REDACTED:100— vite-config.rewriteLintStagedConfigFile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (3 pts), loops 2, 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.
utils.ensurePnpmCreateCatalogEntries (cognitive 22) packages/cli/src/create/utils.ts:21— utils.ensurePnpmCreateCatalogEntries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (7 pts), boolean chains 4, 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.
oxlint-plugin.rewriteVitePlusImportSpecifier (cognitive 22) packages/cli/src/oxlint-plugin.ts:80— oxlint-plugin.rewriteVitePlusImportSpecifier has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 1 (2 pts), boolean chains 1, 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.
oxlint-plugin.nearestPackageMatches (cognitive 22) packages/cli/src/oxlint-plugin.ts:223— oxlint-plugin.nearestPackageMatches has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (6 pts), ternaries 1 (3 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.
eslint.rewriteEslintPackageJson (cognitive 21) packages/cli/src/migration/migrator/eslint.ts:442— eslint.rewriteEslintPackageJson has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 9). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 453). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
vpx-script.parseVpxArgs (cognitive 21) packages/cli/src/vpx-script.ts:166— vpx-script.parseVpxArgs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
vitest-v5.sourceVersion (cognitive 21) packages/cli/src/migration/migrator/vitest-v5.ts:326— vitest-v5.sourceVersion has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
vitest-v5.checkNodeRange (cognitive 21) packages/cli/src/migration/migrator/vitest-v5.ts:412— vitest-v5.checkNodeRange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8 (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.
oxlint-config.removeMigratedOxlintConfigs (cognitive 21) packages/cli/src/migration/migrator/oxlint-config.ts:189— oxlint-config.removeMigratedOxlintConfigs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (6 pts), boolean chains 2, error handling 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.
npm-reinstall.prepareNpmViteAliasReinstall (cognitive 21) packages/cli/src/migration/npm-reinstall.ts:86— npm-reinstall.prepareNpmViteAliasReinstall has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (3 pts), error handling 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.
select-key.selectKey (cognitive 21) packages/prompts/src/select-key.ts:25— select-key.selectKey has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 4, match/switch 1 (nesting depth added 8). Of this number, 13 points are the body's own statements and 8 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.
HttpClient::send_get (cognitive 20) crates/vp_pm_cli/src/request.rs:74— HttpClient::send_get has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prettier.migratePrettierToOxfmt (cognitive 20) packages/cli/src/migration/migrator/prettier.ts:103— prettier.migratePrettierToOxfmt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 1 (3 pts), loops 1 (2 pts), ternaries 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.
script-runner.scanEnvironmentOptions (cognitive 20) packages/cli/src/migration/migrator/script-runner.ts:451— script-runner.scanEnvironmentOptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, ternaries 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.
config.findVitestV5MergedConfigFiles (cognitive 20) packages/cli/src/migration/vitest-v5/config.ts:203— config.findVitestV5MergedConfigFiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (6 pts), error handling 1 (2 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.
catalog.applyBuildAllowanceToWorkspaceYaml (cognitive 20) packages/cli/src/migration/migrator/catalog.ts:537— catalog.applyBuildAllowanceToWorkspaceYaml has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), ternaries 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.
catalog.rewriteYamlCatalogAtPath (cognitive 20) packages/cli/src/migration/migrator/catalog.ts:978— catalog.rewriteYamlCatalogAtPath has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, 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.
git-hooks.findWorkspacePackageHookPolicy (cognitive 20) packages/cli/src/migration/migrator/git-hooks.ts:244— git-hooks.findWorkspacePackageHookPolicy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts), ternaries 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.
define-config.vitePlusVitestResolverPlugin (cognitive 20) packages/cli/src/define-config.ts:282— define-config.vitePlusVitestResolverPlugin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 3 (4 pts), ternaries 3 (nesting depth added 3). Of this number, 19 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. 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.
org-resolve.resolveOrgManifestForCreate (cognitive 20) packages/cli/src/create/org-resolve.ts:127— org-resolve.resolveOrgManifestForCreate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, ternaries 1 (2 pts), error handling 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.
ts-node-config.readTsNodeEnvironment (cognitive 19) packages/cli/src/migration/migrator/ts-node-config.ts:80— ts-node-config.readTsNodeEnvironment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.migrateVitestV5Command (cognitive 19) packages/cli/src/migration/vitest-v5/commands.ts:121— commands.migrateVitestV5Command has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 3 (4 pts) (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.
catalog.rewriteCatalogObject (cognitive 19) packages/cli/src/migration/migrator/catalog.ts:1053— catalog.rewriteCatalogObject has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vite-config.rewriteAllImports (cognitive 19) REDACTED:894— vite-config.rewriteAllImports has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 5 (6 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.
git-hooks.vpConfigHookCommands (cognitive 19) packages/cli/src/migration/migrator/git-hooks.ts:169— git-hooks.vpConfigHookCommands has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
monorepo.executeMonorepoTemplate (cognitive 19) packages/cli/src/create/templates/monorepo.ts:23— monorepo.executeMonorepoTemplate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
build.wireBundledTsdownExtensions (cognitive 19) packages/core/build.ts:665— build.wireBundledTsdownExtensions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2, 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.
approve-builds.collectDirectDependencyNames (cognitive 18) packages/cli/src/utils/approve-builds.ts:253— approve-builds.collectDirectDependencyNames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tsup.collectUnsupportedTsupConfigConsumers (cognitive 18) packages/cli/src/migration/migrator/tsup.ts:226— tsup.collectUnsupportedTsupConfigConsumers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), boolean chains 4, ternaries 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.
vitest-ecosystem.pruneLegacyWrapperAliases (cognitive 18) packages/cli/src/migration/migrator/vitest-ecosystem.ts:670— vitest-ecosystem.pruneLegacyWrapperAliases has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rewrite-module-specifiers.applyRules (cognitive 18) packages/core/build-support/rewrite-module-specifiers.ts:75— rewrite-module-specifiers.applyRules has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (17 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.
build.bundleRolldown (cognitive 18) packages/core/build.ts:360— build.bundleRolldown has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 7). Of this number, 17 points are the body's own statements and 1 belongs to one function literal 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.
limit-options.trimLines (cognitive 18) packages/prompts/src/limit-options.ts:48— limit-options.trimLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sync-remote-deps.cloneOrResetRepo (cognitive 18) REDACTED:141— sync-remote-deps.cloneOrResetRepo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (3 pts), error handling 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.
RegistryCache.load (cognitive 18) packages/tools/src/registry-cache.ts:134— RegistryCache.load has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 3 (5 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.
vp_cli_snapshots::bin::vpt::backpressure_run::replay (cognitive 17) crates/vp_cli_snapshots/src/bin/vpt/backpressure_run.rs:170— vp_cli_snapshots::bin::vpt::backpressure_run::replay has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 8). 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.
help.renderCliDoc (cognitive 17) packages/cli/src/utils/help.ts:132— help.renderCliDoc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (2 pts), boolean chains 1, 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.
SourceEditor.constructor (cognitive 17) packages/cli/src/migration/vitest-v5/ast.ts:347— SourceEditor.constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (index). 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.
vitest-v5.installedSourceVersion (cognitive 17) packages/cli/src/migration/migrator/vitest-v5.ts:280— vitest-v5.installedSourceVersion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (5 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.
catalog.rewriteCatalog (cognitive 17) packages/cli/src/migration/migrator/catalog.ts:914— catalog.rewriteCatalog has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), boolean chains 4, loops 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.
source-scan.projectListsRequiredOxlintPluginsPeer (cognitive 17) packages/cli/src/migration/migrator/source-scan.ts:388— source-scan.projectListsRequiredOxlintPluginsPeer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, error handling 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.
vite-plus-bootstrap.ensureVitePlusDependencySpecs (cognitive 17) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:828— vite-plus-bootstrap.ensureVitePlusDependencySpecs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vite-plus-bootstrap.collectToolchainVersionChanges (cognitive 17) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:1367— vite-plus-bootstrap.collectToolchainVersionChanges has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (nesting depth added 3). 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, 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.
oxlint-config.prepareOxlintConfigs (cognitive 17) packages/cli/src/migration/migrator/oxlint-config.ts:91— oxlint-config.prepareOxlintConfigs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), ternaries 1 (3 pts), error handling 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.
hooks.status (cognitive 17) packages/cli/src/config/hooks.ts:748— hooks.status has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 5, error handling 1 (2 pts), if/else 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
git-hooks.isViteHooksSetupComplete (cognitive 17) packages/cli/src/migration/migrator/git-hooks.ts:114— git-hooks.isViteHooksSetupComplete has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
git-hooks.preflightGitHooksSetup (cognitive 17) packages/cli/src/migration/migrator/git-hooks.ts:303— git-hooks.preflightGitHooksSetup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 1, ternaries 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.
org-tarball.extractTarballTo (cognitive 17) packages/cli/src/create/org-tarball.ts:195— org-tarball.extractTarballTo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, error handling 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
remote.executeRemoteTemplate (cognitive 17) packages/cli/src/create/templates/remote.ts:16— remote.executeRemoteTemplate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 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.
legacy-vitest-alias.findLegacyVitestAliasConfig (cognitive 17) packages/cli/src/utils/legacy-vitest-alias.ts:65— legacy-vitest-alias.findLegacyVitestAliasConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BinConfig::find_bins_where (cognitive 16) crates/vp_global_cli/src/commands/env/bin_config.rs:174— BinConfig::find_bins_where has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 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.
scopes.staticPatterns (cognitive 16) packages/cli/src/migration/vitest-v5/scopes.ts:171— scopes.staticPatterns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 1, loops 1, ternaries 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.
scopes.resolveSetupFile (cognitive 16) packages/cli/src/migration/vitest-v5/scopes.ts:319— scopes.resolveSetupFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to one function literal 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.
hooks.findUnsafeHookInstallPath (cognitive 16) packages/cli/src/config/hooks.ts:147— hooks.findUnsafeHookInstallPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), 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.
define-config.computeAutoInlineList (cognitive 16) packages/cli/src/define-config.ts:442— define-config.computeAutoInlineList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 1 (3 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
path.path (cognitive 16) packages/prompts/src/path.ts:63— path.path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
install-global-cli.setupLocalDevDeps (cognitive 16) packages/tools/src/install-global-cli.ts:422— install-global-cli.setupLocalDevDeps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), boolean chains 1, ternaries 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.
check-rolldown-compat.checkRolldownCompatibility (cognitive 16) packages/tools/src/check-rolldown-compat.ts:16— check-rolldown-compat.checkRolldownCompatibility has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MethodTooLong: SubcommandResolver.resolve packages/cli/binding/src/cli/resolver.rs:72— MethodTooLong — resolve runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×1
Near-duplicate member pair (43 shared lines) crates/vp_pm_cli/src/package_manager.rs:1904— crates/vp_pm_cli/src/package_manager.rs:1904-2031 | crates/vp_pm_cli/src/package_manager.rs:2113-2239 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) crates/vp_pm_cli/src/resolution/commands/add.rs:167— crates/vp_pm_cli/src/resolution/commands/add.rs:167-215 | crates/vp_pm_cli/src/resolution/commands/add.rs:316-359 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) crates/vp_global_cli/src/commands/env/pin.rs:596— crates/vp_global_cli/src/commands/env/pin.rs:596-642 | crates/vp_global_cli/src/commands/env/pin.rs:922-964 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) crates/vp_global_cli/src/commands/env/which.rs:87— crates/vp_global_cli/src/commands/env/which.rs:87-116 | crates/vp_global_cli/src/commands/env/which.rs:289-331 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) crates/vp_global_cli/src/commands/env/which.rs:337— crates/vp_global_cli/src/commands/env/which.rs:337-362 | crates/vp_global_cli/src/shim/dispatch.rs:1119-1153 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) crates/vp_setup/src/install.rs:761— crates/vp_setup/src/install.rs:761-789 | crates/vp_setup/src/install.rs:969-991 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) packages/cli/binding/src/js_command_args/commands/config.rs:84— packages/cli/binding/src/js_command_args/commands/config.rs:84-104 | packages/cli/binding/src/js_command_args/commands/create.rs:202-230 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) crates/vp_pm_cli/src/resolution/commands/install.rs:280— crates/vp_pm_cli/src/resolution/commands/install.rs:280-299 | crates/vp_pm_cli/src/resolution/commands/install.rs:354-373 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) crates/vp_global_cli/src/commands/global/mod.rs:127— crates/vp_global_cli/src/commands/global/mod.rs:127-138 | crates/vp_global_cli/src/shim/dispatch.rs:142-152 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) crates/vp_pm_cli/src/resolution/commands/licenses.rs:24— crates/vp_pm_cli/src/resolution/commands/licenses.rs:24-36 | crates/vp_pm_cli/src/resolution/commands/licenses.rs:50-62 | crates/vp_pm_cli/src/resolution/commands/licenses.rs:66-78 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) crates/vp_pm_cli/src/resolution/commands/publish.rs:92— crates/vp_pm_cli/src/resolution/commands/publish.rs:92-104 | crates/vp_pm_cli/src/resolution/commands/publish.rs:119-131 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) crates/vp_shared/src/output.rs:93— crates/vp_shared/src/output.rs:93-105 | crates/vp_shared/src/output.rs:108-120 | crates/vp_shared/src/output.rs:151-160 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) crates/vp_global_cli/src/commands/env/bin_config.rs:97— crates/vp_global_cli/src/commands/env/bin_config.rs:97-107 | crates/vp_global_cli/src/commands/env/bin_config.rs:132-145 | crates/vp_global_cli/src/commands/env/package_metadata.rs:147-157 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) crates/vp_pm_cli/src/resolution/commands/patch.rs:19— crates/vp_pm_cli/src/resolution/commands/patch.rs:19-30 | crates/vp_pm_cli/src/resolution/commands/patch.rs:34-45 | crates/vp_pm_cli/src/resolution/commands/patch.rs:49-60 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 5+ corresponding lines) · ×1
Edited copies of one member (4 members, 5+ corresponding lines) crates/vp_global_cli/src/commands/env/current.rs:157— crates/vp_global_cli/src/commands/env/current.rs:157-164 | crates/vp_global_cli/src/commands/env/doctor.rs:925-929 | crates/vp_global_cli/src/commands/env/exec.rs:266-273 | crates/vp_global_cli/src/shim/dispatch.rs:1005-1011 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 7+ corresponding lines) · ×1
Edited copies of one member (6 members, 7+ corresponding lines) crates/vp_global_cli/src/commands/env/bin_config.rs:110— crates/vp_global_cli/src/commands/env/bin_config.rs:110-117 | crates/vp_global_cli/src/commands/env/config.rs:319-326 | crates/vp_global_cli/src/commands/env/config.rs:328-335 | crates/vp_global_cli/src/commands/global/install.rs:805-811 | crates/vp_setup/src/install.rs:140-146 | crates/vp_setup/src/lockfile.rs:49-55 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) crates/vp_global_cli/src/commands/env/config.rs:273— crates/vp_global_cli/src/commands/env/config.rs:273-278 | crates/vp_global_cli/src/commands/env/config.rs:280-285 | crates/vp_global_cli/src/commands/env/config.rs:288-293 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) crates/vp_global_cli/src/commands/delegate.rs:43— crates/vp_global_cli/src/commands/delegate.rs:43-48 | crates/vp_global_cli/src/commands/migrate.rs:14-19 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) crates/vp_global_cli/src/commands/env/clean.rs:140— crates/vp_global_cli/src/commands/env/clean.rs:140-146 | crates/vp_global_cli/src/install_dirs.rs:84-90 | crates/vp_pm_cli/src/package_manager.rs:1114-1120 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) crates/vp_pm_cli/src/resolution/commands/patch.rs:64— crates/vp_pm_cli/src/resolution/commands/patch.rs:64-68 | crates/vp_pm_cli/src/resolution/commands/patch_commit.rs:75-79 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) crates/vp_global_cli/src/commands/env/doctor.rs:666— crates/vp_global_cli/src/commands/env/doctor.rs:666-669 | crates/vp_global_cli/src/self_setup.rs:511-514 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (25–27 lines × 2) crates/vp_cli_help/src/lib.rs:183— crates/vp_cli_help/src/lib.rs:183-207 | crates/vp_global_cli/src/help.rs:144-170 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_cli_help/src/lib.rs:183` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–19 lines × 2) crates/vp_js_runtime/src/download.rs:149— crates/vp_js_runtime/src/download.rs:149-165 | crates/vp_pm_cli/src/request.rs:368-386 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_js_runtime/src/download.rs:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) crates/vp_pm_cli/src/package_manager.rs:1965— crates/vp_pm_cli/src/package_manager.rs:1965-1979 | crates/vp_pm_cli/src/package_manager.rs:2176-2190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_pm_cli/src/package_manager.rs:1965` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–14 lines × 2) crates/vp_global_cli/src/main.rs:259— crates/vp_global_cli/src/main.rs:259-272 | crates/vp_global_cli/src/main.rs:590-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/main.rs:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–14 lines × 2) crates/vp_migration/src/vite_config.rs:293— crates/vp_migration/src/vite_config.rs:293-306 | crates/vp_migration/src/vite_config.rs:331-340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_migration/src/vite_config.rs:293` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) crates/vp_pm_cli/src/resolution/commands/add.rs:180— crates/vp_pm_cli/src/resolution/commands/add.rs:180-190 | crates/vp_pm_cli/src/resolution/commands/add.rs:237-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_pm_cli/src/resolution/commands/add.rs:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) crates/vp_global_cli/src/commands/env/current.rs:85— crates/vp_global_cli/src/commands/env/current.rs:85-94 | crates/vp_global_cli/src/commands/env/doctor.rs:886-896 — 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–10 lines × 4) packages/cli/binding/src/cli/resolver.rs:130— packages/cli/binding/src/cli/resolver.rs:130-139 | packages/cli/binding/src/cli/resolver.rs:216-225 | packages/cli/binding/src/cli/resolver.rs:234-243 | packages/cli/binding/src/cli/resolver.rs:253-257 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/cli/binding/src/cli/resolver.rs:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) crates/vp_global_cli/src/commands/env/doctor.rs:509— crates/vp_global_cli/src/commands/env/doctor.rs:509-517 | crates/vp_global_cli/src/commands/env/doctor.rs:677-685 | crates/vp_global_cli/src/commands/env/doctor.rs:766-774 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) packages/cli/binding/src/cli/resolver.rs:114— packages/cli/binding/src/cli/resolver.rs:114-119 | packages/cli/binding/src/cli/resolver.rs:200-205 | packages/cli/binding/src/cli/resolver.rs:259-264 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/cli/binding/src/cli/resolver.rs:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/cli/binding/src/cli/resolver.rs:208` calls `Some`, `build_pack_cache_inputs` and `packages/cli/binding/src/cli/resolver.rs:122` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) crates/vp_pm_cli/src/package_manager.rs:1811— crates/vp_pm_cli/src/package_manager.rs:1811-1816 | crates/vp_pm_cli/src/package_manager.rs:2024-2028 | crates/vp_pm_cli/src/package_manager.rs:2232-2236 — 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 (2–5 lines × 3) crates/vp_global_cli/src/commands/env/current.rs:160— crates/vp_global_cli/src/commands/env/current.rs:160-164 | crates/vp_global_cli/src/commands/env/doctor.rs:926-927 | crates/vp_global_cli/src/commands/env/exec.rs:269-273 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/vp_global_cli/src/commands/env/current.rs:160` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/vp_global_cli/src/commands/env/doctor.rs:927` calls `as_path`, `arg`, `output` and `crates/vp_global_cli/src/commands/env/exec.rs:273` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
End-of-life runtime: Node.js 20 crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/shim_inherits_parent_engines_node/package.json:6— crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/shim_inherits_parent_engines_node/package.json declares Node.js 20 as this project's engines.node, and Node.js 20, support ended 2026-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
CI formatting step cannot fail .github/workflows/reusable-ecosystem-ci.yml:183— `# FIXME: skip format for now, will re-enable after prettier migration support` invokes prettier in the mode that REWRITES the files it reformats and exits 0 whatever it changed. The rewrite happens inside the runner's throwaway checkout and is then discarded, so the step passes on a badly-formatted change exactly as it passes on a clean one — it enforces nothing, and no other step in this file reads the result. `--check` is the flag that turns the same invocation into a gate: it leaves the files alone and exits non-zero when anything would have been reformatted.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
R10 · Code Duplication· Duplicated block with local edits (101 matched lines × 2 locations) · ×1
Duplicated block with local edits (101 matched lines × 2 locations) packages/cli/src/migration/migrator/prettier.ts:184— packages/cli/src/migration/migrator/prettier.ts:184 · packages/cli/src/migration/migrator/tsup.ts:569 — the two spans are one implementation copied and then locally edited — 509 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 (47 matched lines × 2 locations) · ×1
Duplicated block with local edits (47 matched lines × 2 locations) packages/cli/src/migration/migrator/catalog.ts:1254— packages/cli/src/migration/migrator/catalog.ts:1254 · packages/cli/src/migration/migrator/orchestrators.ts:163 — the two spans are one implementation copied and then locally edited — 290 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 (40 lines × 2 locations) packages/cli/src/migration/detector.ts:166— packages/cli/src/migration/detector.ts:166 · packages/cli/src/migration/detector.ts: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.
R10 · Code Duplication· Duplicated block with local edits (39 matched lines × 2 locations) · ×1
Duplicated block with local edits (39 matched lines × 2 locations) packages/prompts/src/group-multi-select.ts:126— packages/prompts/src/group-multi-select.ts:126 · packages/prompts/src/multi-select.ts:112 — the two spans are one implementation copied and then locally edited — 262 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 (32 lines × 2 locations) packages/cli/src/migration/migrator/package-json.ts:246— packages/cli/src/migration/migrator/package-json.ts:246 · packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:364 — 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 (31 lines × 2 locations) packages/cli/src/migration/migrator/eslint.ts:94— packages/cli/src/migration/migrator/eslint.ts:94 · packages/cli/src/migration/migrator/prettier.ts:23 — 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 (28 lines × 2 locations) packages/cli/src/migration/migrator/oxnode.ts:170— packages/cli/src/migration/migrator/oxnode.ts:170 · packages/cli/src/migration/migrator/ts-node.ts:189 — 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 (26 lines × 2 locations) packages/cli/src/migration/bin.ts:757— packages/cli/src/migration/bin.ts:757 · packages/cli/src/migration/bin.ts:1116 — both copies are in the same file, so extract the 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 × 3 locations) packages/cli/src/create/bin.ts:801— packages/cli/src/create/bin.ts:801 · packages/cli/src/migration/bin.ts:760 · packages/cli/src/migration/bin.ts:1121 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication· Duplicated block with local edits (20 matched lines × 2 locations) · ×1
Duplicated block with local edits (20 matched lines × 2 locations) REDACTED:163— REDACTED:163 · REDACTED:817 — the two spans are one implementation copied and then locally edited — 93 tokens are still identical, in the same order in both spans, 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 (19 lines × 2 locations) packages/cli/src/migration/migrator/eslint.ts:480— packages/cli/src/migration/migrator/eslint.ts:480 · packages/cli/src/migration/migrator/prettier.ts:255 — 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.
R10 · Code Duplication· Duplicated block with local edits (19 matched lines × 2 locations) · ×1
Duplicated block with local edits (19 matched lines × 2 locations) packages/cli/src/utils/agent.ts:371— packages/cli/src/utils/agent.ts:371 · packages/cli/src/utils/agent.ts:431 — the two spans are one implementation copied and then locally edited — 92 tokens are still identical, in the same order in both spans, 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 (18 lines × 2 locations) packages/cli/src/create/templates/monorepo.ts:103— packages/cli/src/create/templates/monorepo.ts:103 · packages/cli/src/create/templates/monorepo.ts:138 — 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 (18 matched lines × 2 locations) · ×1
Duplicated block with local edits (18 matched lines × 2 locations) packages/cli/src/utils/editor.ts:180— packages/cli/src/utils/editor.ts:180 · packages/cli/src/utils/editor.ts:234 — the two spans are one implementation copied and then locally edited — 90 tokens are still identical, in the same order in both spans, 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 (16 matched lines × 2 locations) · ×1
Duplicated block with local edits (16 matched lines × 2 locations) packages/cli/src/migration/migrator/source-scan.ts:214— packages/cli/src/migration/migrator/source-scan.ts:214 · packages/cli/src/migration/migrator/source-scan.ts:281 — the two spans are one implementation copied and then locally edited — 113 tokens are still identical, in the same order in both spans, 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 (15 matched lines × 2 locations) · ×1
Duplicated block with local edits (15 matched lines × 2 locations) packages/cli/src/init-config.ts:236— packages/cli/src/init-config.ts:236 · packages/cli/src/init-config.ts:265 — the two spans are one implementation copied and then locally edited — 81 tokens are still identical, in the same order in both spans, 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 (15 lines × 2 locations) packages/tools/src/registry-cache.ts:139— packages/tools/src/registry-cache.ts:139 · packages/tools/src/registry-cache.ts:168 — 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 (14 matched lines × 2 locations) · ×1
Duplicated block with local edits (14 matched lines × 2 locations) packages/cli/src/migration/migrator/tsconfig.ts:13— packages/cli/src/migration/migrator/tsconfig.ts:13 · packages/cli/src/migration/migrator/tsconfig.ts:38 — the two spans are one implementation copied and then locally edited — 64 tokens are still identical, in the same order in both spans, 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 (13 matched lines × 2 locations) · ×1
Duplicated block with local edits (13 matched lines × 2 locations) packages/cli/src/define-config.ts:959— packages/cli/src/define-config.ts:959 · packages/cli/src/define-config.ts:991 — the two spans are one implementation copied and then locally edited — 58 tokens are still identical, in the same order in both spans, 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 (11 matched lines × 2 locations) · ×1
Duplicated block with local edits (11 matched lines × 2 locations) packages/cli/src/script-hooks.ts:70— packages/cli/src/script-hooks.ts:70 · packages/cli/src/script-hooks.ts:94 — the two spans are one implementation copied and then locally edited — 60 tokens are still identical, in the same order in both spans, 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 (10 lines × 3 locations) packages/cli/src/migration/bin.ts:590— packages/cli/src/migration/bin.ts:590 · packages/cli/src/migration/bin.ts:600 · packages/cli/src/migration/bin.ts:625 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 158, cognitive 246) · ×1
Complex function main (cyclomatic 158, cognitive 246) packages/cli/src/create/bin.ts:311— main has cyclomatic complexity 158 and cognitive complexity 246; 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 CallExpression (cyclomatic 131, cognitive 174) packages/cli/src/migration/vitest-v5/source.ts:698— CallExpression has cyclomatic complexity 131 and cognitive complexity 174; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 114, cognitive 210) · ×1
Complex function main (cyclomatic 114, cognitive 210) packages/cli/src/migration/bin.ts:1046— main has cyclomatic complexity 114 and cognitive complexity 210; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function walk (cyclomatic 102, cognitive 137) · ×1
Complex function walk (cyclomatic 102, cognitive 137) packages/cli/src/migration/vitest-v5/scopes.ts:392— walk has cyclomatic complexity 102 and cognitive complexity 137; 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 prepareTsNodeRun (cyclomatic 86, cognitive 132) packages/cli/src/migration/migrator/ts-node-config.ts:197— prepareTsNodeRun has cyclomatic complexity 86 and cognitive complexity 132; 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 rewritePackageJson (cyclomatic 81, cognitive 112) packages/cli/src/migration/migrator/package-json.ts:39— rewritePackageJson has cyclomatic complexity 81 and cognitive complexity 112; 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 testOptions (cyclomatic 55, cognitive 83) packages/cli/src/migration/vitest-v5/config.ts:321— testOptions has cyclomatic complexity 55 and cognitive complexity 83; 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 46, cognitive 41) packages/cli/src/migration/vitest-v5/scopes.ts:692— (anonymous) has cyclomatic complexity 46 and cognitive complexity 41; 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 globalRestorationOrigin (cyclomatic 40, cognitive 40) packages/cli/src/migration/vitest-v5/source.ts:119— globalRestorationOrigin has cyclomatic complexity 40 and cognitive complexity 40; 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 lockedVitestVersion (cyclomatic 38, cognitive 72) packages/cli/src/migration/vitest-v5/lockfile.ts:79— lockedVitestVersion has cyclomatic complexity 38 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 detectVitePlusBootstrapPending (cyclomatic 38, cognitive 44) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:617— detectVitePlusBootstrapPending has cyclomatic complexity 38 and cognitive complexity 44; 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 mergePnpmWorkspaces (cyclomatic 35, cognitive 55) REDACTED:596— mergePnpmWorkspaces has cyclomatic complexity 35 and cognitive complexity 55; 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 scanOptions (cyclomatic 34, cognitive 81) packages/cli/src/migration/migrator/script-runner.ts:775— scanOptions has cyclomatic complexity 34 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 showMigrationSummary (cyclomatic 34, cognitive 43) packages/cli/src/migration/bin.ts:506— showMigrationSummary has cyclomatic complexity 34 and cognitive complexity 43; 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 ensureVitePlusBootstrap (cyclomatic 33, cognitive 38) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:945— ensureVitePlusBootstrap has cyclomatic complexity 33 and cognitive complexity 38; 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 opt (cyclomatic 33, cognitive 29) packages/prompts/src/group-multi-select.ts:54— opt has cyclomatic complexity 33 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.
Complex function rewriteSegment (cyclomatic 32, cognitive 38) packages/cli/src/migration/migrator/script-runner.ts:223— rewriteSegment has cyclomatic complexity 32 and cognitive complexity 38; 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 migrateBenchmarkOutput (cyclomatic 32, cognitive 37) packages/cli/src/migration/vitest-v5/commands.ts:37— migrateBenchmarkOutput has cyclomatic complexity 32 and cognitive complexity 37; 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 overrideMap (cyclomatic 31, cognitive 47) packages/cli/src/migration/vitest-v5/webdriverio.ts:298— overrideMap has cyclomatic complexity 31 and cognitive complexity 47; 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 scanAndRewriteFile (cyclomatic 31, cognitive 41) packages/cli/src/migration/migrator/vitest-v5.ts:528— scanAndRewriteFile has cyclomatic complexity 31 and cognitive complexity 41; 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 generateLicenseFile (cyclomatic 30, cognitive 64) scripts/generate-license.ts:66— generateLicenseFile has cyclomatic complexity 30 and cognitive complexity 64; 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 30, cognitive 48) packages/cli/src/migration/migrator/catalog.ts:329— (anonymous) has cyclomatic complexity 30 and cognitive complexity 48; 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 resolveStorybookScope (cyclomatic 29, cognitive 34) packages/cli/src/migration/vitest-v5/storybook.ts:121— resolveStorybookScope has cyclomatic complexity 29 and cognitive complexity 34; 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 migrateWebdriverioDependencies (cyclomatic 28, cognitive 63) packages/cli/src/migration/vitest-v5/webdriverio.ts:63— migrateWebdriverioDependencies has cyclomatic complexity 28 and cognitive complexity 63; 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 environmentFileUse (cyclomatic 28, cognitive 50) packages/cli/src/migration/migrator/script-runner.ts:1195— environmentFileUse has cyclomatic complexity 28 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 reconcileVitePlusBootstrapPackage (cyclomatic 28, cognitive 47) packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:304— reconcileVitePlusBootstrapPackage has cyclomatic complexity 28 and cognitive complexity 47; 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 detectConfigs (cyclomatic 28, cognitive 40) packages/cli/src/migration/detector.ts:163— detectConfigs has cyclomatic complexity 28 and cognitive complexity 40; 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 28, cognitive 39) REDACTED:607— (anonymous) has cyclomatic complexity 28 and cognitive complexity 39; 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 configPath (cyclomatic 28, cognitive 29) packages/cli/src/migration/vitest-v5/storybook.ts:52— configPath has cyclomatic complexity 28 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 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 mergeSemverVersions (cyclomatic 27, cognitive 42) REDACTED:463— mergeSemverVersions has cyclomatic complexity 27 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 writeAgentInstructions (cyclomatic 26, cognitive 61) packages/cli/src/utils/agent.ts:414— writeAgentInstructions has cyclomatic complexity 26 and cognitive complexity 61; 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 sanitizeMigratedOxlintConfig (cyclomatic 26, cognitive 60) packages/cli/src/migration/migrator/eslint.ts:855— sanitizeMigratedOxlintConfig has cyclomatic complexity 26 and cognitive complexity 60; 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 syncTestPackageExports (cyclomatic 26, cognitive 52) packages/cli/build.ts:344— syncTestPackageExports has cyclomatic complexity 26 and cognitive complexity 52; 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 createConditionalShim (cyclomatic 26, cognitive 44) packages/cli/build.ts:1280— createConditionalShim has cyclomatic complexity 26 and cognitive complexity 44; 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 26, cognitive 42) packages/cli/src/migration/migrator/orchestrators.ts:152— (anonymous) has cyclomatic complexity 26 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 ImportDeclaration (cyclomatic 26, cognitive 36) packages/cli/src/migration/vitest-v5/source.ts:596— ImportDeclaration has cyclomatic complexity 26 and cognitive complexity 36; 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 executeMigrationPlan (cyclomatic 26, cognitive 32) packages/cli/src/migration/bin.ts:741— executeMigrationPlan has cyclomatic complexity 26 and cognitive complexity 32; 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 isAssertionBindingHandled (cyclomatic 26, cognitive 24) packages/cli/src/migration/vitest-v5/source.ts:397— isAssertionBindingHandled has cyclomatic complexity 26 and cognitive complexity 24; 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 writeEditorConfig (cyclomatic 25, cognitive 63) packages/cli/src/utils/editor.ts:368— writeEditorConfig has cyclomatic complexity 25 and cognitive complexity 63; 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 render (cyclomatic 25, cognitive 45) packages/prompts/src/autocomplete.ts:126— render has cyclomatic complexity 25 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· packages/cli/src/migration/bin.ts · ×1
packages/cli/src/migration/bin.ts: 1654 lines of code packages/cli/src/migration/bin.ts:1— packages/cli/src/migration/bin.ts has 1654 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/cli/src/migration/migrator/catalog.ts · ×1
packages/cli/src/migration/migrator/catalog.ts: 1458 lines of code packages/cli/src/migration/migrator/catalog.ts:1— packages/cli/src/migration/migrator/catalog.ts has 1458 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/cli/src/migration/migrator/vite-plus-bootstrap.ts · ×1
packages/cli/src/migration/migrator/vite-plus-bootstrap.ts: 1378 lines of code packages/cli/src/migration/migrator/vite-plus-bootstrap.ts:1— packages/cli/src/migration/migrator/vite-plus-bootstrap.ts has 1378 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/cli/src/migration/migrator/script-runner.ts · ×1
packages/cli/src/migration/migrator/script-runner.ts: 1353 lines of code packages/cli/src/migration/migrator/script-runner.ts:1— packages/cli/src/migration/migrator/script-runner.ts has 1353 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/cli/src/create/bin.ts · ×1
packages/cli/src/create/bin.ts: 1339 lines of code packages/cli/src/create/bin.ts:1— packages/cli/src/create/bin.ts has 1339 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/cli/build.ts: 1287 lines of code packages/cli/build.ts:1— packages/cli/build.ts has 1287 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/cli/src/migration/vitest-v5/source.ts · ×1
packages/cli/src/migration/vitest-v5/source.ts: 1189 lines of code packages/cli/src/migration/vitest-v5/source.ts:1— packages/cli/src/migration/vitest-v5/source.ts has 1189 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/cli/src/help.ts: 1146 lines of code packages/cli/src/help.ts:1— packages/cli/src/help.ts has 1146 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/cli/src/define-config.ts · ×1
packages/cli/src/define-config.ts: 1080 lines of code packages/cli/src/define-config.ts:1— packages/cli/src/define-config.ts has 1080 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/cli/src/migration/migrator/eslint.ts · ×1
packages/cli/src/migration/migrator/eslint.ts: 1063 lines of code packages/cli/src/migration/migrator/eslint.ts:1— packages/cli/src/migration/migrator/eslint.ts has 1063 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/cli/src/migration/migrator/vitest-v5.ts · ×1
packages/cli/src/migration/migrator/vitest-v5.ts: 1024 lines of code packages/cli/src/migration/migrator/vitest-v5.ts:1— packages/cli/src/migration/migrator/vitest-v5.ts has 1024 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 948 lines of code REDACTED:1— REDACTED has 948 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 902 lines of code REDACTED:1— REDACTED has 902 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/cli/src/migration/migrator/vitest-ecosystem.ts · ×1
packages/cli/src/migration/migrator/vitest-ecosystem.ts: 778 lines of code packages/cli/src/migration/migrator/vitest-ecosystem.ts:1— packages/cli/src/migration/migrator/vitest-ecosystem.ts has 778 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 773 lines of code REDACTED:1— REDACTED has 773 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/cli/src/migration/vitest-v5/scopes.ts · ×1
packages/cli/src/migration/vitest-v5/scopes.ts: 769 lines of code packages/cli/src/migration/vitest-v5/scopes.ts:1— packages/cli/src/migration/vitest-v5/scopes.ts has 769 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/core/build.ts: 742 lines of code packages/core/build.ts:1— packages/core/build.ts has 742 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/cli/src/config/hooks.ts · ×1
packages/cli/src/config/hooks.ts: 739 lines of code packages/cli/src/config/hooks.ts:1— packages/cli/src/config/hooks.ts has 739 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/cli/src/migration/migrator/tsup.ts · ×1
packages/cli/src/migration/migrator/tsup.ts: 657 lines of code packages/cli/src/migration/migrator/tsup.ts:1— packages/cli/src/migration/migrator/tsup.ts has 657 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/cli/src/migration/migrator/orchestrators.ts · ×1
packages/cli/src/migration/migrator/orchestrators.ts: 650 lines of code packages/cli/src/migration/migrator/orchestrators.ts:1— packages/cli/src/migration/migrator/orchestrators.ts has 650 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/cli/src/migration/vitest-v5/config.ts · ×1
packages/cli/src/migration/vitest-v5/config.ts: 627 lines of code packages/cli/src/migration/vitest-v5/config.ts:1— packages/cli/src/migration/vitest-v5/config.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/cli/src/utils/agent.ts · ×1
packages/cli/src/utils/agent.ts: 608 lines of code packages/cli/src/utils/agent.ts:1— packages/cli/src/utils/agent.ts has 608 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/cli/src/utils/approve-builds.ts · ×1
packages/cli/src/utils/approve-builds.ts: 606 lines of code packages/cli/src/utils/approve-builds.ts:1— packages/cli/src/utils/approve-builds.ts has 606 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/cli/src/utils/editor.ts · ×1
packages/cli/src/utils/editor.ts: 602 lines of code packages/cli/src/utils/editor.ts:1— packages/cli/src/utils/editor.ts has 602 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/cli/src/migration/vitest-v5/ast.ts · ×1
packages/cli/src/migration/vitest-v5/ast.ts: 547 lines of code packages/cli/src/migration/vitest-v5/ast.ts:1— packages/cli/src/migration/vitest-v5/ast.ts has 547 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/cli/src/vpx-script.ts · ×1
packages/cli/src/vpx-script.ts: 504 lines of code packages/cli/src/vpx-script.ts:1— packages/cli/src/vpx-script.ts has 504 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/cli/src/migration/migrator/git-hooks.ts · ×1
packages/cli/src/migration/migrator/git-hooks.ts: 495 lines of code packages/cli/src/migration/migrator/git-hooks.ts:1— packages/cli/src/migration/migrator/git-hooks.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/cli/src/migration/migrator/source-scan.ts · ×1
packages/cli/src/migration/migrator/source-scan.ts: 478 lines of code packages/cli/src/migration/migrator/source-scan.ts:1— packages/cli/src/migration/migrator/source-scan.ts has 478 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/cli/src/oxlint-plugin.ts · ×1
packages/cli/src/oxlint-plugin.ts: 463 lines of code packages/cli/src/oxlint-plugin.ts:1— packages/cli/src/oxlint-plugin.ts has 463 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/cli/src/migration/migrator/oxlint-config.ts · ×1
packages/cli/src/migration/migrator/oxlint-config.ts: 456 lines of code packages/cli/src/migration/migrator/oxlint-config.ts:1— packages/cli/src/migration/migrator/oxlint-config.ts has 456 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· scripts/generate-license.ts · ×1
scripts/generate-license.ts: 456 lines of code scripts/generate-license.ts:1— scripts/generate-license.ts has 456 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/cli/src/migration/migrator/package-json.ts · ×1
packages/cli/src/migration/migrator/package-json.ts: 443 lines of code packages/cli/src/migration/migrator/package-json.ts:1— packages/cli/src/migration/migrator/package-json.ts has 443 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/cli/src/sync-versions/plan.ts · ×1
packages/cli/src/sync-versions/plan.ts: 436 lines of code packages/cli/src/sync-versions/plan.ts:1— packages/cli/src/sync-versions/plan.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/cli/src/migration/migrator/ts-node-config.ts · ×1
packages/cli/src/migration/migrator/ts-node-config.ts: 433 lines of code packages/cli/src/migration/migrator/ts-node-config.ts:1— packages/cli/src/migration/migrator/ts-node-config.ts has 433 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/cli/src/migration/migrator/yarn.ts · ×1
packages/cli/src/migration/migrator/yarn.ts: 428 lines of code packages/cli/src/migration/migrator/yarn.ts:1— packages/cli/src/migration/migrator/yarn.ts has 428 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/cli/src/migration/migrator/shared.ts · ×1
packages/cli/src/migration/migrator/shared.ts: 419 lines of code packages/cli/src/migration/migrator/shared.ts:1— packages/cli/src/migration/migrator/shared.ts has 419 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/tools/src/install-global-cli.ts · ×1
packages/tools/src/install-global-cli.ts: 411 lines of code packages/tools/src/install-global-cli.ts:1— packages/tools/src/install-global-cli.ts has 411 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/prompts/src/autocomplete.ts · ×1
packages/prompts/src/autocomplete.ts: 409 lines of code packages/prompts/src/autocomplete.ts:1— packages/prompts/src/autocomplete.ts has 409 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/cli/src/migration/migrator/tsx.ts · ×1
packages/cli/src/migration/migrator/tsx.ts: 408 lines of code packages/cli/src/migration/migrator/tsx.ts:1— packages/cli/src/migration/migrator/tsx.ts has 408 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling· The declared test suite includes a file that cannot be loaded · ×1
The declared test suite includes a file that cannot be loaded crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/custom-app.ts:1— This repository declares test tooling, and the ✓ above records that declaration — but crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/app_root_vite_signals/configs/custom-app.ts and 7 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
Dead file (~424 LoC) ecosystem-ci/patch-project.ts— no import path from any entry point (285 application, 289 tooling, 939 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~206 LoC) ecosystem-ci/webdriverio.ts— no import path from any entry point (285 application, 289 tooling, 939 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (ecosystem-ci/patch-project.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~72 LoC) ecosystem-ci/verify-install.ts— no import path from any entry point (285 application, 289 tooling, 939 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~37 LoC) ecosystem-ci/verify-videojs-v10.ts— no import path from any entry point (285 application, 289 tooling, 939 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~21 LoC) ecosystem-ci/npmx.ts— no import path from any entry point (285 application, 289 tooling, 939 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (ecosystem-ci/patch-project.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Unused dependency '@voidzero-dev/vite-plus-tools' — Declared in the root REDACTED 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.
Interpolated log message defeats structured logging packages/cli/binding/src/lib.rs:261— `debug!` at line 261 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 packages/cli/binding/src/lib.rs:266— `error!` at line 266 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 packages/cli/binding/src/utils.rs:94— `debug!` at line 94 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 packages/cli/binding/src/cli/handler.rs:171— `debug!` at line 171 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 packages/cli/binding/src/cli/handler.rs:180— `debug!` at line 180 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 packages/cli/binding/src/cli/handler.rs:200— `error!` at line 200 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 packages/cli/binding/src/cli/resolver.rs:67— `error!` at line 67 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/vp_shared/src/http.rs:213— `debug!` at line 213 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/vp_setup/src/install.rs:279— `warn!` at line 279 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/vp_setup/src/install.rs:404— `debug!` at line 404 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/vp_setup/src/install.rs:609— `debug!` at line 609 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/vp_setup/src/install.rs:655— `debug!` at line 655 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/vp_setup/src/install.rs:704— `debug!` at line 704 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/vp_setup/src/install.rs:729— `debug!` at line 729 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/vp_setup/src/install.rs:765— `warn!` at line 765 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/vp_setup/src/install.rs:781— `warn!` at line 781 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/vp_setup/src/install.rs:863— `debug!` at line 863 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/vp_setup/src/install.rs:866— `debug!` at line 866 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/vp_setup/src/install.rs:870— `warn!` at line 870 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/vp_setup/src/install.rs:908— `debug!` at line 908 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/vp_setup/src/install.rs:910— `warn!` at line 910 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/vp_setup/src/install.rs:934— `debug!` at line 934 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/vp_setup/src/install.rs:983— `warn!` at line 983 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/vp_setup/src/registry.rs:132— `debug!` at line 132 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/vp_setup/src/registry.rs:158— `debug!` at line 158 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Duplicated predicate packages/cli/src/migration/vitest-v5/config-object.ts:57— `binding?.constant && binding.declaration.type === 'VariableDeclarator'` appears character-identically in 2 files — packages/cli/src/migration/vitest-v5/config-object.ts, packages/cli/src/migration/vitest-v5/config.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/cli/src/create/utils.ts:43— `catalogName && catalogName !== 'default'` appears character-identically in 3 files — packages/cli/src/create/utils.ts, packages/cli/src/migration/migrator/catalog.ts, packages/cli/src/migration/migrator/yarn.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/cli/src/migration/vitest-v5/ast.ts:219— `declaration && editor.parent(declaration)` appears character-identically in 3 files — packages/cli/src/migration/vitest-v5/ast.ts, packages/cli/src/migration/vitest-v5/source.ts, packages/cli/src/migration/vitest-v5/storybook.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/cli/src/create/utils.ts:45— `doc.has('catalog') || !doc.hasIn(['catalogs', 'default'])` appears character-identically in 2 files — packages/cli/src/create/utils.ts, packages/cli/src/migration/migrator/catalog.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/cli/src/migration/migrator/eslint.ts:1095— `eslintProject.hasDependency && !eslintProject.configFile && eslintProject.legacyConfigFile` appears character-identically in 2 files — packages/cli/src/migration/migrator/eslint.ts, packages/cli/src/migration/setup-plan.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/cli/src/migration/migrator/eslint.ts:515— `filename === '.lintstagedrc' && !isJsonFile(configPath)` appears character-identically in 2 files — packages/cli/src/migration/migrator/eslint.ts, REDACTED. 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/cli/src/migration/migrator/package-json.ts:325— `name !== 'vitest' && name.includes('vitest') && !VITEST_DIRECT_USAGE_EXCLUDED.has(name)` appears character-identically in 2 files — packages/cli/src/migration/migrator/package-json.ts, packages/cli/src/migration/migrator/vitest-ecosystem.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/cli/src/create/bin.ts:748— `options.agent !== undefined || !options.interactive` appears character-identically in 2 files — packages/cli/src/create/bin.ts, packages/cli/src/migration/setup-plan.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/cli/src/migration/bin.ts:1628— `packageManager === PackageManager.npm || packageManager === PackageManager.bun` appears character-identically in 2 files — packages/cli/src/migration/bin.ts, packages/cli/src/migration/migrator/orchestrators.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/cli/src/migration/vitest-v5/config.ts:583— `parent?.type === 'VariableDeclarator' && parent.id.type === 'Identifier'` appears character-identically in 2 files — packages/cli/src/migration/vitest-v5/config.ts, packages/cli/src/migration/vitest-v5/source.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/cli/src/migration/migrator/catalog.ts:1129— `pkg.workspaces && !Array.isArray(pkg.workspaces)` appears character-identically in 2 files — packages/cli/src/migration/migrator/catalog.ts, packages/cli/src/utils/workspace.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/cli/src/migration/migrator/catalog.ts:1333— `pnpmMajorVersion !== undefined && pkg.pnpm` appears character-identically in 2 files — packages/cli/src/migration/migrator/catalog.ts, packages/cli/src/migration/migrator/vite-plus-bootstrap.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/cli/src/utils/agent.ts:513— `prompts.isCancel(action) || action === 'skip'` appears character-identically in 2 files — packages/cli/src/utils/agent.ts, packages/cli/src/utils/editor.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/prompts/src/group-multi-select.ts:142— `required && (selected === undefined || selected.length === 0)` appears character-identically in 2 files — packages/prompts/src/group-multi-select.ts, packages/prompts/src/multi-select.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/cli/src/migration/migrator/orchestrators.ts:275— `supportCatalog && !VITE_PLUS_VERSION.startsWith('file:')` appears character-identically in 2 files — packages/cli/src/migration/migrator/orchestrators.ts, packages/cli/src/migration/migrator/package-json.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/cli/src/migration/migrator/package-json.ts:259— `supportCatalog && packageManager !== PackageManager.bun` appears character-identically in 2 files — packages/cli/src/migration/migrator/package-json.ts, packages/cli/src/migration/migrator/vite-plus-bootstrap.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/cli/src/oxlint-plugin-config.ts:23— `typeof value === 'object' && value !== null && !Array.isArray(value)` appears character-identically in 3 files — packages/cli/src/oxlint-plugin-config.ts, packages/cli/src/utils/editor.ts, REDACTED. 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/cli/src/migration/migrator/package-json.ts:297— `usesAnyOptInProvider && packageManager === PackageManager.npm` appears character-identically in 2 files — packages/cli/src/migration/migrator/package-json.ts, packages/cli/src/migration/migrator/vite-plus-bootstrap.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/cli/src/migration/migrator/shared.ts:404— `value !== null && typeof value === 'object' && !Array.isArray(value)` appears character-identically in 7 files — packages/cli/src/migration/migrator/shared.ts, packages/cli/src/migration/migrator/vitest-ecosystem.ts, packages/cli/src/migration/migrator/vitest-v5.ts, packages/cli/src/migration/vitest-v5/lockfile.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/vp_global_cli/src/cli.rs:583— `has_flag_before_terminator(args, "--init") || has_flag_before_terminator(args, "--migrate")` appears character-identically in 2 files — crates/vp_global_cli/src/cli.rs, packages/cli/binding/src/cli/help.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.
redundant comment packages/cli/build.ts:523— "Update CLI REDACTED" repeats the code it sits on: 4 of its 4 words (update, cli, package, json) are already in `await updateCliPackageJson(cliPkgPath, generatedExports);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/create/discovery.ts:11— "Check if template name is a GitHub URL" repeats the code it sits on: 5 of its 6 words (template, name, git, hub, url) are already in `export function isGitHubUrl(templateName: string): boolean`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/create/templates/generator.ts:15— "Execute generator scaffold template" repeats the code it sits on: 4 of its 4 words (execute, generator, scaffold, template) are already in `export async function executeGeneratorScaffold(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/create/utils.ts:178— "invalid package name" repeats the code it sits on: 3 of its 3 words (invalid, package, name) are already in `const message = result.errors?.[0] ?? result.warnings?.[0] ?? 'Invalid package name';`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/migration/migrator/eslint.ts:920— "Override jsPlugins." repeats the code it sits on: 3 of its 3 words (override, js, plugins) are already in `let overrideSurvivors: NonNullable<OxlintConfig['jsPlugins']> = [];`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:291— "merge oxfmt config into vite.config.ts" repeats the code it sits on: 4 of its 5 words (merge, oxfmt, config, vite) are already in `mergeAndRemoveJsonConfig(projectPath, viteConfig, configs.oxfmtConfig, 'fmt', silent, report);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/utils/workspace.ts:119— "Discover all workspace packages" repeats the code it sits on: 3 of its 3 words (discover, workspace, packages) are already in `export function discoverWorkspacePackages(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/utils/workspace.ts:163— "Update REDACTED with workspace dependencies" repeats the code it sits on: 4 of its 5 words (update, package, json, dependencies) are already in `export function updatePackageJsonWithDeps(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/core/build-support/find-create-require.ts:56— "Find all createRequire patterns and their require calls" repeats the code it sits on: 4 of its 5 words (find, create, require, calls) are already in `const results = [findCreateRequireInStaticImports(ast), findCreateRequireInGlobalModule(ast)];`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/core/build-support/find-create-require.ts:173— "Find the createRequire import entry" repeats the code it sits on: 5 of its 5 words (find, create, require, import, entry) are already in `const createRequireEntry = importFromModule.entries.find((entry) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/core/build-support/find-create-require.ts:288— "Check if the object is a getBuiltinModule("module") call" repeats the code it sits on: 6 of its 6 words (check, object, get, builtin, module, call) are already in `if (!isGetBuiltinModuleCall(callee.object))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/core/build-support/rewrite-module-specifiers.ts:154— "Find string literals within this node" repeats the code it sits on: 4 of its 4 words (find, string, literals, node) are already in `const stringNodes = findStringLiterals(match);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:693— "Merge minimumReleaseAgeExclude" repeats the code it sits on: 5 of its 5 words (merge, minimum, release, age, exclude) are already in `result.minimumReleaseAgeExclude = mergeMinimumReleaseAgeExclude([`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:736— "Set ignoreScripts" repeats the code it sits on: 3 of its 3 words (set, ignore, scripts) are already in `result.ignoreScripts = true;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Silent fallback default in catch packages/cli/src/utils/approve-builds.ts:330— `resolveApproveBuildTargets` 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 packages/cli/src/utils/tsconfig.ts:39— `findTsconfigFiles` 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 packages/cli/src/migration/format.ts:133— `collectChangedFormatPaths` 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 packages/prompts/src/path.ts:125— `options` (in `path`) 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 on Err crates/vp_global_cli/src/cli.rs:647— `run_tasks_completions` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/vp_global_cli/src/commands/env/list.rs:35— `list_installed_versions` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/vp_migration/src/import_rewriter.rs:2161— `get_package_rewrite_context` turns every `Err` into `PackageRewriteContext::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 12 significant file(s) lose their only recent owner: packages/cli/src/migration/vitest-v5/source.ts, packages/cli/src/migration/vitest-v5/scopes.ts, packages/cli/binding/src/cli/app_target.rs, packages/cli/src/migration/migrator/source-scan.ts, packages/cli/src/migration/vitest-v5/ast.ts, crates/vp_global_cli/src/homebrew.rs, packages/cli/binding/src/cli/handler.rs, packages/cli/src/migration/vitest-v5/commands.ts (+4 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 10 significant file(s) lose their only recent owner: crates/vp_pm_cli/src/resolution/commands/install.rs, crates/vp_pm_cli/src/resolution/commands/update.rs, crates/vp_pm_cli/src/resolution/commands/add.rs, crates/vp_pm_cli/src/resolution/commands/outdated.rs, crates/vp_pm_cli/src/resolution/commands/remove.rs, crates/vp_pm_cli/src/resolution/commands/config.rs, crates/vp_pm_cli/src/resolution/commands/dist_tag.rs, crates/vp_pm_cli/src/resolution/commands/patch_commit.rs (+2 more). Pair on, review, or document these before any departure.
Mock-dominated test: skips Git-backed hook resolution when hooks are disabled by environment packages/cli/src/config/__tests__/bin.spec.ts:29— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 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 (24 single-owned of 309 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; 309 of the 421 production source files in this repository met that bar). They are anonymized user #3 (2 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: packages/prompts/src/task-log.ts, packages/prompts/src/password.ts.
D20 · ADR Quality· ADR has no Consequences section · ×1
ADR has no Consequences section rfcs/windows-installer.md:1— rfcs/windows-installer.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 22 project(s) overshoot their size bounds, lowering Project Cohesion to 9.1/10. The most over is `packages/cli` (38214 LoC, 198 module-visible types across 14 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.
Logging is not universal — Only 10/14 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/vp_cli_snapshots`, `crates/vp_installer`, `crates/vp_trampoline`, `packages/cli/templates/generator`.
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 'readPrepareRulesYaml' · ×1
Unused export 'readPrepareRulesYaml' packages/cli/src/migration/migrator/core-finalization.ts:67— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/cli/src/migration/migrator.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/cli/src/migration/migrator.ts in the same commit, or the barrel will import a name that no longer exists.
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 2/4 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) 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 — 13/49 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 (`!`) override strict null checking — ~0.7 `!` null assertions per 1k TypeScript source lines — 38 assertion(s) across the 51722 source line(s) of the 208 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/cli/src/migration/vitest-v5/scopes.ts (6), packages/cli/src/migration/migrator/script-runner.ts (4), packages/cli/src/migration/vitest-v5/benchmarks.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Skipped (documented): (unnamed test) packages/tools/src/__tests__/native-build-profile.spec.ts:13— Skipped with a documented reason — a deferral, not lazy debt: switched off by test.skipIf
Skipped (documented): (unnamed test) packages/core/__tests__/core-version.spec.ts:9— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/resolve-test.ts:37— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) packages/cli/src/utils/__tests__/command.spec.ts:41— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/utils/__tests__/command.spec.ts:54— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/migration/__tests__/oxlint-extends.spec.ts:281— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/migration/__tests__/oxlint-extends.spec.ts:655— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/migration/__tests__/tsx.spec.ts:217— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/migration/__tests__/tsx.spec.ts:229— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/create/__tests__/prompts.spec.ts:196— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:40— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:109— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:232— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:258— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:284— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:310— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:334— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:383— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:407— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:437— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:471— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:524— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:546— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:571— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/cli/src/config/__tests__/hooks.spec.ts:615— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Outdated: ast-grep-config — `ast-grep-config` is locked at 0.51.0 but 0.51.2 is the current stable release on crates.io, and it already satisfies the `"0.51.0"` requirement declared in crates/vp_error/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ast-grep-config` and commit the updated REDACTED.
Outdated: ast-grep-core — `ast-grep-core` is locked at 0.51.0 but 0.51.2 is the current stable release on crates.io, and it already satisfies the `"0.51.0"` requirement declared in crates/vp_migration/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ast-grep-core` and commit the updated REDACTED.
Outdated: ast-grep-language — `ast-grep-language` is locked at 0.51.0 but 0.51.2 is the current stable release on crates.io, and it already satisfies the `"0.51.0"` requirement declared in crates/vp_migration/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ast-grep-language` and commit the updated REDACTED.
Outdated: flate2 — `flate2` is locked at 1.1.10 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1.1.10"` requirement declared in crates/vp_global_cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: ignore — `ignore` is locked at 0.4.33 but 0.4.34 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in crates/vp_error/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ignore` and commit the updated REDACTED.
Outdated: napi — `napi` is locked at 3.14.2 but 3.16.2 is the current stable release on crates.io, and it already satisfies the `"3.12.2"` requirement declared in packages/cli/binding/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-derive — `napi-derive` is locked at 3.6.12 but 3.7.1 is the current stable release on crates.io, and it already satisfies the `"3.6.3"` requirement declared in packages/cli/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: pgp — `pgp` is locked at 0.21.0 but 0.21.1 is the current stable release on crates.io, and it already satisfies the `"0.21.0"` requirement declared in crates/vp_js_runtime/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p pgp` and commit the updated REDACTED.
Outdated: syn — `syn` is locked at 3.0.9 but 3.0.10 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in crates/vp_pm_cli_macros/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p syn` and commit the updated REDACTED.
Outdated: uuid — `uuid` is locked at 1.28.0 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1.27.0"` requirement declared in crates/vp_global_cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
Outdated: webpki-root-certs — `webpki-root-certs` is locked at 1.0.10 but 1.0.12 is the current stable release on crates.io, and it already satisfies the `"1.0.10"` requirement declared in crates/vp_shared/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p webpki-root-certs` and commit the updated REDACTED.
Outdated: zip — `zip` is locked at 9.0.5 but 9.5.1 is the current stable release on crates.io, and it already satisfies the `"9.0"` requirement declared in crates/vp_js_runtime/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p zip` and commit the updated REDACTED.
doc comments repeat the names packages/prompts/src/autocomplete.ts:86— 0 of 2 documented parameters and 2 of 55 summaries in `@voidzero-dev/vite-plus-prompts` only repeat the member or parameter name (e.g. "Validates the value" for `validate`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names packages/cli/src/migration/migrator/catalog.ts:310— 5 of 18 documented parameters and 0 of 418 summaries in `vite-plus` only repeat the member or parameter name (e.g. "The path to the project" for `projectPath`). Delete the restating tags, or add what the name does not say.
Off the main sequence: vp_shared — vp_shared: abstractness 0.04, instability 0.00, distance 0.96 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
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 28 file(s) — `REDACTED`, `.github/scripts/upgrade-deps.ts`, `docs/.vitepress/theme/index.ts`, `ecosystem-ci/clone.ts`, `ecosystem-ci/patch-project.ts`, … (+23 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 01a1db59-19c3-748b-af32-d5690728e532 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 34 · Warnings: 918 · Recommendations: 96 · Info: 51 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 18:36 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.