Public report — farm, published 30 Sep 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this survey Filed cd_8c1c90a083764d8a806740d59bea84ac Filed 30 September 2026, 01:01 UTC Public

Farm-Fe/farm

Measured 30 September 2026, 00:43 UTC

36% At Risk

Large · 131,795 LoC · 368 projects · rebuild ~0.9 person-years · weakest lens: Security (26%)

Findings by grade

318 critical 821 serious 81 minor 40 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
30 September 2026, 00:43 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

54/59dimensions tool-verifieddeterministic · confidence 1.0 · 5 LLM-assisted, advisory
1161findings with an exact file:lineof 1220 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
59/132dimensions across the health lenses131795 LoC · 368 projects — wide & deep
Chapters

Executive summary

⚠ A critical security finding caps this grade — resolve it before relying on the score below; see the Security lens.

This large-scale system is currently at risk, with an overall health score of 36%. While the codebase is structurally sound and maintainable, critical security gaps and operational immaturity create significant exposure for the business. The asset is substantial, comprising over 130,000 lines of production code, with a rebuild effort estimated at roughly 0.9 person-years and a cost of approximately €130,000. This represents a considerable investment that requires careful stewardship to protect against escalating technical debt and security liabilities.

The most urgent concern is security exposure, which sits at a dangerously low 26%. For an asset of this size, weak security controls mean that a single breach could result in severe financial and reputational damage. The highest-leverage action is to immediately resolve three leaked secrets found in configuration files. This fix is inexpensive, requiring only a few engineer-days, yet it prevents an annual drag on productivity equivalent to dozens of engineer-days. Addressing this vulnerability pays for itself within two months, offering immediate protection with minimal effort.

A secondary risk is the velocity tax imposed by code complexity. Although the code health is strong at 80%, the average complexity score of 7.1 out of 10 acts as a hidden tax on every change. This means modifications in weaker areas cost 2–5% more time and effort than they should, slowing down feature delivery and increasing the likelihood of defects. Over time, this inefficiency compounds, making the system harder and more expensive to evolve as the team changes hundreds of thousands of lines annually.

Despite these risks, the system has genuine strengths. The architecture is robust at 74%, and the code is highly maintainable, meaning new teams can pick it up with relative ease. The production readiness score of 26% indicates that while the code is good, the operational safeguards and testing coverage are insufficient. To maximize leverage, leadership should prioritize the immediate remediation of security secrets. This single action offers the fastest return on investment, reducing risk and freeing up capacity for further modernization efforts.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Security 26% · 46% weightReadiness 26% · 25% weightAccessibility 50% · 14% weightPerformance 66% · 8% weightArchitecture 74% · 4% weightMaturity 78% · 2% weightCode Health 80% · 1% weight

Raise Security 26 → 70 (the Healthy floor) ⇒ headline 36 → ~45.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

134 finding(s) are new versus the previous scan (2026-09-13) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D5 · Unstable project farmfe_compiler
  • D5 · Unstable project farmfe_plugin_file_size
  • D5 · Unstable project farmfe_plugin_script
  • D5 · Off the main sequence: @farmfe/runtime-plugin-hmr
  • D5 · Off the main sequence: @farmfe/runtime-plugin-import-meta
  • D5 · Off the main sequence: @farmfe/utils
  • D5 · Off the main sequence: farmfe_ecosystem_tailwindcss
  • D5 · Off the main sequence: farmfe_svgr_rs
  • D5 · Off the main sequence: farmfe_utils
  • D5 · Off the main sequence: farmfe_testing_helpers
  • D5 · Off the main sequence: farmfe_toolkit_plugin_types
  • D5 · Off the main sequence: farmfe_toolkit
  • D5 · Off the main sequence: farmfe_core
  • D6 · Low cohesion: JsPluginAdapter (LCOM4 11) crates/node/src/plugin_adapters/js_plugin_adapter/mod.rs
  • D6 · Low cohesion: FarmPluginCss (LCOM4 8) crates/plugin_css/src/lib.rs
  • D6 · Low cohesion: FarmPluginScript (LCOM4 7) crates/plugin_script/src/lib.rs
  • D6 · Low cohesion: FarmPluginLibrary (LCOM4 6) crates/plugin_library/src/lib.rs
  • D6 · Low cohesion: RenameVisitor (LCOM4 6) crates/toolkit/src/script/concatenate_modules/unique_idents.rs
  • D6 · Low cohesion: CompilationContext (LCOM4 4) crates/core/src/context/mod.rs
  • D22 · Redundant/Conflicting Logic for Error-to-ModuleId Conversion: `Compiler` has a setter that takes errors, but a utility function exists to extract module IDs from those same errors. It is unclear if the setter calls the utility or if they are independent. The setter name implies it sets a single ID (`last_fail_module_ids` is singular type `ModuleId` but takes a slice), which is semantically confusing.
  • D22 · Inconsistent Borrowing API: `ModuleCacheManager` exposes multiple methods for accessing cached data (`get_cache`, `get_cache_ref`, `get_cache_mut_ref`, `get_cache_mut_option_ref`) with unclear distinctions in ownership/lifetime guarantees compared to the underlying `ModuleMemoryStore`. `get_cache_mut_option_ref` is particularly confusingly named (returns `RefMut` but name suggests Option?).
  • D22 · Inconsistent Cache Persistence API: `CacheManager` has `write_cache()`, but specific managers (`ModuleCacheManager`, etc.) also have `write_cache()`. It is unclear if calling the manager's write triggers the global write or if they are independent. Additionally, `PluginCacheManager` has `write_cache_to_disk()` which is distinct from `write_cache()`, creating confusion about when data is persisted.
  • D22 · Confusing Constructor Naming: `new_without_internal_plugins` is a verbose and awkward name for a constructor variant. It suggests a special case rather than a standard builder pattern or factory method.
  • D22 · Inconsistent Method Naming for Similar Operations: `get_cache_mut_option_ref` and `get_cache_mut_ref` both return `RefMut` but have different names, implying different behavior (likely one returns Option internally or handles missing keys differently), but the naming is not self-evident from the signature.
  • D29 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D35 · Change coupling: REDACTED ↔ share.ts packages/core/src/config/index.ts
  • D35 · Change coupling: REDACTED ↔ binding.ts packages/core/src/config/index.ts
  • R10 · Duplication concentrated across 7 sibling directories (9 clone groups) crates/create-farm-rs/templates/tauri/react/src/App.tsx
  • R10 · Duplicated block (46 lines × 2 locations) crates/create-farm-rs/templates/tauri/preact/src/App.tsx
  • R10 · Duplicated block (35 lines × 21 locations) packages/create-farm-plugin/templates/rust/scripts/index.js
  • R10 · Duplicated block with local edits (33 matched lines × 2 locations) packages/core/src/server/index.ts

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €43,000–€210,000
Cost to rebuild€43,000–€210,000 (0.4–1.3 person-years (709–2,250 h), ~1–2 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 36% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~0.9 person-years of build effort (about ~€130,000 to rebuild). Its weakest lens is Security at 26% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.
+9.2 pts · Low effort · REDACTED Scanning
2
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
+9.2 pts · Medium effort · Dependency Hygiene
3
Add tests that import the unreached modules (directly or through their public entry).
+9.2 pts · Medium effort · Test Coverage

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~0.9 person-years to rebuild), and its weakest lens is Security at 26%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~0.9 person-years rebuild (131,795 LoC) · weakest lens: Security 26%
→ Direct remediation budget at Security first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 37.5–229.7 engineer-days every year, paid as drag on the ~689,019 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 2–5% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 169,895 line(s) changed over a 90-day window ⇒ ~689,019/year · D1/D2/D4/D6 code quality: averaging 7.1/10 ⇒ a 2–5% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 7.1/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 2–5% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4/D6 code quality: averaging 7.1/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch @farmfe/core core farm_plugin_svgr farm_plugin_svgr farmfe_core farmfe_core farm_plugin_svgr->farmfe_core farmfe_macro_plugin farmfe_macro_plugin farm_plugin_svgr->farmfe_macro_plugin farmfe_toolkit farmfe_toolkit farm_plugin_svgr->farmfe_toolkit farmfe_toolkit_plugin_types farmfe_toolkit_plugin_types farm_plugin_svgr->farmfe_toolkit_plugin_types farmfe_utils farmfe_utils farm_plugin_svgr->farmfe_utils serde serde farm_plugin_svgr->serde farmfe_compiler farmfe_compiler farmfe_compiler->farmfe_core farmfe_plugin_file_size farmfe_plugin_file_size farmfe_compiler->farmfe_plugin_file_size farmfe_plugin_resolve farmfe_plugin_resolve farmfe_compiler->farmfe_plugin_resolve farmfe_plugin_script farmfe_plugin_script farmfe_compiler->farmfe_plugin_script farmfe_plugin_script_meta farmfe_plugin_script_meta farmfe_compiler->farmfe_plugin_script_meta farmfe_testing_helpers farmfe_testing_helpers farmfe_compiler->farmfe_testing_helpers farmfe_compiler->farmfe_toolkit farmfe_compiler->farmfe_utils farmfe_core->farmfe_utils farmfe_core->serde farmfe_plugin_auto_import farmfe_plugin_auto_import farmfe_plugin_auto_import->farmfe_core farmfe_plugin_auto_import->farmfe_macro_plugin farmfe_plugin_auto_import->farmfe_toolkit farmfe_plugin_auto_import->farmfe_toolkit_plugin_types farmfe_plugin_auto_import->farmfe_utils farmfe_plugin_auto_import->serde farmfe_plugin_file_size->farmfe_core farmfe_plugin_file_size->farmfe_macro_plugin farmfe_plugin_file_size->farmfe_testing_helpers farmfe_plugin_file_size->farmfe_toolkit farmfe_plugin_file_size->farmfe_utils farmfe_plugin_icons farmfe_plugin_icons farmfe_plugin_icons->farmfe_core farmfe_plugin_icons->farmfe_macro_plugin farmfe_plugin_icons->farmfe_toolkit farmfe_plugin_icons->farmfe_toolkit_plugin_types farmfe_plugin_icons->farmfe_utils farmfe_plugin_icons->serde farmfe_plugin_react_components farmfe_plugin_react_components farmfe_plugin_react_components->farmfe_core farmfe_plugin_react_components->farmfe_macro_plugin farmfe_plugin_react_components->farmfe_toolkit farmfe_plugin_react_components->farmfe_toolkit_plugin_types farmfe_plugin_react_components->farmfe_utils farmfe_plugin_react_components->serde farmfe_plugin_resolve->farmfe_core farmfe_plugin_resolve->farmfe_testing_helpers farmfe_plugin_resolve->farmfe_toolkit farmfe_plugin_resolve->farmfe_utils farmfe_plugin_script->farmfe_core farmfe_plugin_script->farmfe_plugin_script_meta farmfe_plugin_script->farmfe_testing_helpers farmfe_plugin_script->farmfe_toolkit farmfe_plugin_script->farmfe_utils farmfe_plugin_script_meta->farmfe_core farmfe_plugin_script_meta->farmfe_testing_helpers farmfe_plugin_script_meta->farmfe_toolkit farmfe_plugin_script_meta->farmfe_utils farmfe_plugin_tailwindcss farmfe_plugin_tailwindcss farmfe_plugin_tailwindcss->farmfe_core farmfe_plugin_tailwindcss->farmfe_macro_plugin farmfe_plugin_tailwindcss->farmfe_toolkit farmfe_plugin_tailwindcss->farmfe_utils farmfe_plugin_tailwindcss->serde farmfe_plugin_url farmfe_plugin_url farmfe_plugin_url->farmfe_core farmfe_plugin_url->farmfe_macro_plugin farmfe_plugin_url->farmfe_toolkit farmfe_plugin_url->farmfe_toolkit_plugin_types farmfe_plugin_url->farmfe_utils farmfe_plugin_url->serde farmfe_plugin_worker farmfe_plugin_worker farmfe_plugin_worker->farmfe_compiler farmfe_plugin_worker->farmfe_core farmfe_plugin_worker->farmfe_macro_plugin farmfe_plugin_worker->farmfe_toolkit farmfe_plugin_worker->farmfe_toolkit_plugin_types farmfe_plugin_worker->farmfe_utils farmfe_plugin_worker->serde farmfe_testing_helpers->farmfe_core farmfe_toolkit->farmfe_core farmfe_toolkit->farmfe_testing_helpers farmfe_toolkit->farmfe_utils farmfe_toolkit_plugin_types->farmfe_core __more__ +348 more projects

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

1090 modules, 1258 dependencies. 6 dependency cycles across 65 modules, marked above the diagonal.

Showing the 40 most-connected modules; 1050 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 crates.compiler.tests.fixtures.library.dynamic.lodash_export.logger2 farmfe_core.module.meta_data.script.statement3 farmfe_ecosystem_tailwindcss_node.source_maps4 farmfe_toolkit.resolve.package_json_loader5 packages.core.src.plugin.type6 serde.core.de7 farmfe_core.module.meta_data.script8 farmfe_plugin_vue_jsx.options9 packages.core.src.config.types10 farmfe_core.config.config_regex11 packages.core.src.server12 packages.core.src.utils13 farmfe_core.config14 farmfe_core.module15 farmfe_core.plugin.hooks.load16 farmfe_core.plugin.hooks.process_module17 farmfe_core.plugin.hooks.resolve18 farmfe_core.plugin.hooks.transform19 farmfe_core.resource20 farmfe_core.resource.resource_pot21 farmfe_core.module.module_graph22 farmfe_core.plugin.hooks.analyze_deps23 farmfe_core.cache.module_cache24 farmfe_core.module.module_group25 farmfe_core.cache26 farmfe_core.plugin.hooks.handle_entry_resource27 farmfe_core.plugin28 farmfe_core.stats29 farmfe_core.context30 farmfe_compiler31 farmfe_node.plugin_adapters.js_plugin_adapter32 farmfe_node.plugin_adapters.js_plugin_adapter.thread_safe_js_plugin_hook33 farmfe_node.plugin_adapters.rust_plugin_adapter34 farmfe_plugin_auto_import35 farmfe_plugin_css36 farmfe_plugin_html37 farmfe_plugin_progress38 farmfe_plugin_script39 farmfe_plugin_virtual40 farmfe_plugin_vue_jsx
1 crates.compiler.tests.fixtures.library.dynamic.lodash_export.logger
2 farmfe_core.module.meta_data.script.statement
3 farmfe_ecosystem_tailwindcss_node.source_maps
4 farmfe_toolkit.resolve.package_json_loader
5 packages.core.src.plugin.type
6 serde.core.de
7 farmfe_core.module.meta_data.script1
8 farmfe_plugin_vue_jsx.options2
9 packages.core.src.config.types2
10 farmfe_core.config.config_regex11
11 packages.core.src.server12
12 packages.core.src.utils116
13 farmfe_core.config1
14 farmfe_core.module21
15 farmfe_core.plugin.hooks.load1
16 farmfe_core.plugin.hooks.process_module2
17 farmfe_core.plugin.hooks.resolve1
18 farmfe_core.plugin.hooks.transform2
19 farmfe_core.resource11
20 farmfe_core.resource.resource_pot12
21 farmfe_core.module.module_graph33
22 farmfe_core.plugin.hooks.analyze_deps11
23 farmfe_core.cache.module_cache511
24 farmfe_core.module.module_group21
25 farmfe_core.cache1
26 farmfe_core.plugin.hooks.handle_entry_resource1111
27 farmfe_core.plugin121111111111
28 farmfe_core.stats531
29 farmfe_core.context1132111121
30 farmfe_compiler133112
31 farmfe_node.plugin_adapters.js_plugin_adapter111111211
32 farmfe_node.plugin_adapters.js_plugin_adapter.thread_safe_js_plugin_hook11
33 farmfe_node.plugin_adapters.rust_plugin_adapter1211111111211
34 farmfe_plugin_auto_import1111111
35 farmfe_plugin_css132111111142
36 farmfe_plugin_html411111143
37 farmfe_plugin_progress11111211
38 farmfe_plugin_script111121123
39 farmfe_plugin_virtual112221
40 farmfe_plugin_vue_jsx211111
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
….lodash_export.logger…data.script.statement…dcss_node.source_maps…e.package_json_loader….core.src.plugin.typeserde.core.de…dule.meta_data.script…lugin_vue_jsx.options…core.src.config.types…e.config.config_regex…kages.core.src.server…ckages.core.src.utilsfarmfe_core.configfarmfe_core.module…ore.plugin.hooks.load….hooks.process_module….plugin.hooks.resolve…lugin.hooks.transformfarmfe_core.resource…resource.resource_pot…e.module.module_graph…in.hooks.analyze_deps…re.cache.module_cache…e.module.module_groupfarmfe_core.cache…handle_entry_resourcefarmfe_core.pluginfarmfe_core.statsfarmfe_core.contextfarmfe_compiler…ers.js_plugin_adapter…d_safe_js_plugin_hook…s.rust_plugin_adapter…fe_plugin_auto_importfarmfe_plugin_cssfarmfe_plugin_htmlfarmfe_plugin_progressfarmfe_plugin_scriptfarmfe_plugin_virtualfarmfe_plugin_vue_jsx….lodash_export.logger1…data.script.statement2…dcss_node.source_maps3…e.package_json_loader4….core.src.plugin.type5serde.core.de6…dule.meta_data.script7…lugin_vue_jsx.options8…core.src.config.types9…e.config.config_regex10…kages.core.src.server11…ckages.core.src.utils12farmfe_core.config13farmfe_core.module14…ore.plugin.hooks.load15….hooks.process_module16….plugin.hooks.resolve17…lugin.hooks.transform18farmfe_core.resource19…resource.resource_pot20…e.module.module_graph21…in.hooks.analyze_deps22…re.cache.module_cache23…e.module.module_group24farmfe_core.cache25…handle_entry_resource26farmfe_core.plugin27farmfe_core.stats28farmfe_core.context29farmfe_compiler30…ers.js_plugin_adapter31…d_safe_js_plugin_hook32…s.rust_plugin_adapter33…fe_plugin_auto_import34farmfe_plugin_css35farmfe_plugin_html36farmfe_plugin_progress37farmfe_plugin_script38farmfe_plugin_virtual39farmfe_plugin_vue_jsx40122111211612112121112331151121111111211111111115311132111121133112111111211111211111111211111111113211111114241111114311111211111121123112221211111+1050 more modules (most-connected shown)

At a glance — Code Health · 80% · Adequate · gated by D2 ·

At a glance — Architecture · 74% · Strong ·

At a glance — Maturity · 78% · Strong ·

At a glance — Readiness · 26% · Weak · gated by D13, R4, R8, P7 ·

At a glance — Security · 26% · Weak · gated by D28, D29, D30, D36 ·

At a glance — Accessibility · 50% · Weak · gated by AC4 ·

At a glance — Performance · 66% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A06:2021 — Vulnerable & Outdated Components220High / Critical
A03:2021 — Injection187High / Critical
A02:2021 — Cryptographic Failures11High / Critical

Roadmap

Immediately resolve the three leaked secrets in REDACTED and REDACTED, then clean up the dependency list by removing unused packages and explicitly declaring imports. Strengthen reliability by adding tests for unreached modules and enforcing request timeouts with retry logic on all outbound HTTP calls. Finally, enable automated dependency scanning tools to maintain ongoing security and performance hygiene.

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

Do thisHelpsEffortDimension
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.+9.2 ptsLowREDACTED Scanning
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+9.2 ptsMediumDependency Hygiene
Add tests that import the unreached modules (directly or through their public entry).+9.2 ptsMediumTest Coverage
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.+9.2 ptsMediumOutbound HTTP resilience
Enable Dependabot/Renovate or a dependency-review gate.+9.1 ptsMediumSecurity & performance tooling
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+9.0 ptsMediumObservability
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+8.8 ptsMediumDeployment & Rollback
Resolve the 7 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED (2), REDACTED.+3.1 ptsLowSecrets (history)

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.1SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
crates/plugin_css/src/lib.rs5.5MixedCognitive Complexity: FarmPluginCssResolve::resolve (cognitive 27)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED

How the grades work

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

Critical — 318

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 — 821

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 — 81

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

Could not be resolved — 40

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 54 of 59 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 59 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D15D16D17D19D20D21D22D26D28D29D30D34D35D36D43AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX9M1M2M3M4P1P10P2P3P4P6P7PF1PF3R1R10R11R2R3R4R6R7R8R9

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0efc4-a2b3-73fc-ab7b-0f741c196316.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for the repository root failed in the analyzer sandbox (throw new Error(), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 62 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 110 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test 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 (throw new Error(), 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (throw new Error(), 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the jest suite in crates/create-farm-rs/templates/nestjs/ was NOT MEASURED: the dependency install for crates/create-farm-rs/templates/nestjs/ failed in the analyzer sandbox (throw new Error(), 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the jest suite in examples/nestjs/ was NOT MEASURED: the dependency install for examples/nestjs/ failed in the analyzer sandbox (throw new Error(), 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 — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. License Compliance couldn't be assessed within its 15-minute budget on a solution this large — not included in this run.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `crates/create-farm-rs/templates/electron/preact/electron/electron-env.d.ts`, `crates/create-farm-rs/templates/electron/react/electron/electron-env.d.ts`, `crates/create-farm-rs/templates/electron/solid/electron/electron-env.d.ts`, `crates/create-farm-rs/templates/electron/svelte/electron/electron-env.d.ts`, `crates/create-farm-rs/templates/electron/vanilla/electron/electron-env.d.ts`, … (+7 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.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 27 further occurrence(s) are not listed individually; the score already reflects all 67.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 110 further occurrence(s) are not listed individually; the score already reflects all 150.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • 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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • 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.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (5): D19, D21, D22, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.6 / 10Adequate✓ Tool-verified

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

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

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

77 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Parser::parse at 57. A further 3 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 farmfe_ecosystem_tailwindcss::variants::resolve_named at 48 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/create-farm-rs/src/template.rs (Template::display_text at 30), rust-ecosystem/tailwindcss/src/utils/infer_data_type.rs (farmfe_ecosystem_tailwindcss::utils::infer_data_type::check at 17). 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.

farmfe_ecosystem_tailwindcss::attribute_selector_parser::parse (cyclomatic 44) · ×11rust-ecosystem/tailwindcss/src/attribute_selector_parser.rs:97
VueJsxTransformVisitor::transform_attrs (cyclomatic 53) · ×7rust-plugins/vue-jsx/src/lib.rs:517
farmfe_toolkit::script::analyze_statement::statement_info::analyze_statement_info (cyclomatic 37) · ×5crates/toolkit/src/script/analyze_statement/statement_info.rs:32
farmfe_compiler::update::diff_and_patch_module_graph::diff_module_deps (cyclomatic 34) · ×4crates/compiler/src/update/diff_and_patch_module_graph.rs:265
farmfe_plugin_mangle_exports::mangle_exports::update_exports_meta_and_module_decl (cyclomatic 27) · ×4crates/plugin_mangle_exports/src/mangle_exports.rs:251

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

What to do

  1. Resolve the 11 farmfe_ecosystem_tailwindcss finding(s) in Cyclomatic Complexity — start with attribute_selector_parser.rs, math_operators.rs, selector_parser.rs. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 7 VueJsxTransformVisitor finding(s) in Cyclomatic Complexity — start with resolve_type.rs (5), lib.rs (2). — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 5 farmfe_toolkit finding(s) in Cyclomatic Complexity — start with mod.rs (2), statement_info.rs, strip_module_decl.rs. — One of this dimension's main actionable groups (5 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity2.9 / 10Weak✓ Tool-verified

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

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

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

179 method(s) exceeded the cognitive complexity threshold of 15; the worst was farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_write_imported_idents_statements at 161.

farmfe_ecosystem_tailwindcss::selector_parser::parse (cognitive 78) · ×20rust-ecosystem/tailwindcss/src/selector_parser.rs:90
farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_export_statements (cognitive 78) · ×13crates/toolkit/src/script/concatenate_modules/strip_module_decl.rs:255
farmfe_compiler::update::diff_and_patch_module_graph::diff_module_deps (cognitive 79) · ×12crates/compiler/src/update/diff_and_patch_module_graph.rs:265
farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_write_imported_idents_statements (cognitive 161) · ×8crates/plugin_tree_shake/src/tree_shake_modules.rs:309
VueJsxTransformVisitor::resolve_indexed_access (cognitive 122) · ×8rust-plugins/vue-jsx/src/resolve_type.rs:628

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

What to do

  1. Resolve the 20 farmfe_ecosystem_tailwindcss finding(s) in Cognitive Complexity — start with candidate.rs (2), ast.rs (2), compiler.rs (2). — One of this dimension's main actionable groups (20 warning-level).
  2. Resolve the 13 farmfe_toolkit finding(s) in Cognitive Complexity — start with handle_external_modules.rs (3), strip_module_decl.rs (2), mod.rs (2). — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 12 farmfe_compiler finding(s) in Cognitive Complexity — start with patch_module_group_graph.rs (4), diff_and_patch_module_graph.rs (2), generate_and_diff_resource_pots.rs (2). — One of this dimension's main actionable groups (12 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

57 god class(es) detected.

FunctionTooLong: farmfe_svgr_rs::transform_svg_component::variables::get_variables · ×21rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:42
MethodTooLong: VueJsxTransformVisitor.resolve_indexed_access · ×14rust-plugins/vue-jsx/src/resolve_type.rs:628
FileTooLong: src/lib.rs · ×12rust-plugins/vue-jsx/src/lib.rs
ClassTooLong: VueJsxTransformVisitor · ×5rust-plugins/vue-jsx/src/lib.rs:39
TooManyMethods: Compiler · ×3crates/compiler/src/lib.rs:31

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

What to do

  1. Resolve the 21 FunctionTooLong finding(s) in God Classes — start with variables.rs, expand_exports.rs, tree_shake_modules.rs. — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 14 MethodTooLong finding(s) in God Classes — start with lib.rs (5), resolve_type.rs (4), utilities.rs. — One of this dimension's main actionable groups (14 warning-level).
  3. Resolve the 12 FileTooLong finding(s) in God Classes — start with lib.rs (3), utilities.rs, resolve_type.rs. — One of this dimension's main actionable groups (12 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.6 / 10Stronggated by 104 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

103 duplicated block group(s) detected. One further row reports members as variants of one another; it aggregates block groups already counted above and is not itself counted. Measured on part of this repository only: .ts (23% 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.

Duplicated block (6 lines × 2) · ×11crates/core/src/module/module_graph.rs:689
Duplicated block (14 lines × 2) · ×8crates/compiler/src/build/mod.rs:169
Duplicated block (12 lines × 2) · ×7crates/compiler/src/build/module_cache.rs:343
Duplicated block (11 lines × 2) · ×7crates/core/src/cache/module_cache/mutable_modules.rs:118
Duplicated block (10 lines × 2) · ×7crates/core/src/module/module_graph.rs:243

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

What to do

  1. Resolve the 11 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with svg_builder.rs (4), module_graph.rs (2), lib.rs (2). — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 8 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with lib.rs (3), mod.rs, deps_analyzer.rs. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 7 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with module_cache.rs, thread_safe_js_plugin_hook.rs, variables.rs. — One of this dimension's main actionable groups (7 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling9.7 / 10Stronggated by 13 serious findings✓ Tool-verified

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

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

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

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

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

Off the main sequence: @farmfe/runtime-plugin-hmr · ×10
Unstable project farmfe_compiler
Unstable project farmfe_plugin_file_size
Unstable project farmfe_plugin_script

What to do

  1. Resolve the 10 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 1 Unstable project farmfe_compiler finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project farmfe_plugin_file_size finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

6 of 122 classes have LCOM4 above 3.

Low cohesion: JsPluginAdapter (LCOM4 11) · ×6crates/node/src/plugin_adapters/js_plugin_adapter/mod.rs:60

What to do

  1. Resolve the 6 Low cohesion finding(s) in Cohesion (LCOM4) — start with lib.rs (3), mod.rs (2), unique_idents.rs. — One of this dimension's main actionable groups (6 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

879 test methods: 324 unit, 553 integration, 0 BDD, 2 e2e. The JavaScript/TypeScript suite contributes 62 `it`/`test` case(s) across 22 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 817 `#[test]` function(s) across 151 file(s) declaring at least one; its unit/integration split is Cargo's own — 72 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.8 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

No assertions: Binding - should parse config to rust correctlypackages/core/tests/binding.spec.ts:13

What to do

  1. Resolve the 1 No assertions finding(s) in Test Quality — start with binding.spec.ts. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D12 · Dependency Hygiene8.8 8.0 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

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

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

Outdated: anyhow · ×23

What to do

  1. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

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

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

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

3 secret(s) detected.

REDACTED

What to do

  1. Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

Top hotspots: crates/toolkit/src/script/analyze_statement/statement_info.rs (3×37=111); crates/compiler/src/generate/render_resource_pots.rs (3×30=90); crates/plugin_mangle_exports/src/mangle_exports.rs (3×27=81)

Hotspot: crates/toolkit/src/script/analyze_statement/statement_info.rs · ×5crates/toolkit/src/script/analyze_statement/statement_info.rs:32

What to do

  1. Resolve the 5 Hotspot finding(s) in Churn × Complexity Hotspots — start with statement_info.rs, render_resource_pots.rs, mangle_exports.rs. — One of this dimension's main actionable groups (5 warning-level).

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

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

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

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

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

2 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs. Counted over 343 of the 732 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

✓ On the Gold path — maintain.

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

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

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

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

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

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

TodoComment · ×73crates/compiler/src/build/module_cache.rs:313
XxxComment · ×3crates/toolkit/src/script/concatenate_modules/unique_idents.rs:356

What to do

  1. Resolve the 73 TodoComment finding(s) in Explicit Debt — start with mod.rs (13), lib.rs (7), REDACTED (7). — One of this dimension's main actionable groups (73 warning-level).
  2. Resolve the 3 XxxComment finding(s) in Explicit Debt — start with REDACTED (2), unique_idents.rs. — One of this dimension's main actionable groups (3 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityStrong◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

The repository's root README is excellent: it states Farm's purpose (extremely fast Vite-compatible Rust web build tool), shows an English and Chinese link, a Discord chat badge, npm package badges for @farmfe/core, Gurubase, node compatibility, downloads, and the license, plus links to the full docs site. It also opens with a strong Intro section and an online experience sandbox link before diving into the outline (Intro; Why Farm?; Features; Getting Started; with npm; with yarn; with pnpm; Benchmark; Contribution; Chat With Us; Contributors; Credits; Author & Maintainer). The READMEs for each directory (changesets, e2e, website, crates/core) are all focused on their own directories and do not claim to represent the repository's overview or install/usage guidance. All 379 documents in this summary fall under the 'internal-focused' category because they document subdirectories rather than the root.

What to do

  1. Improve Documentation Quality — currently 8.0/10. — The repository's root README is excellent: it states Farm's purpose (extremely fast Vite-compatible Rust web build tool), shows an English and Chinese link, a Discord chat badge, npm package badges for @farmfe/core, Gurubase, node compatibility, downloads, and the license, plus links to the full docs site. It also opens with a strong Intro section and an online experience sandbox link before diving into the outline (Intro; Why Farm?; Features; Getting Started; with npm; with yarn; with pnpm; Benchmark; Contribution; Chat With Us; Contributors; Credits; Author & Maintainer). The READMEs for each directory (changesets, e2e, website, crates/core) are all focused on their own directories and do not claim to represent the repository's overview or install/usage guidance. All 379 documents in this summary fall under the 'internal-focused' category because they document subdirectories rather than the root.

Detailed fixes: d19_recommendation.md.

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

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

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyWeak◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

5 API inconsistencies across a 400-member sample of 481 exposed types.

Redundant/Conflicting Logic for Error-to-ModuleId Conversion: `Compiler` has a setter that takes errors, but a utility function exists to extract module IDs from those same errors. It is unclear if the setter calls the utility or if they are independent. The setter name implies it sets a single ID (`last_fail_module_ids` is singular type `ModuleId` but takes a slice), which is semantically confusing.
Inconsistent Borrowing API: `ModuleCacheManager` exposes multiple methods for accessing cached data (`get_cache`, `get_cache_ref`, `get_cache_mut_ref`, `get_cache_mut_option_ref`) with unclear distinctions in ownership/lifetime guarantees compared to the underlying `ModuleMemoryStore`. `get_cache_mut_option_ref` is particularly confusingly named (returns `RefMut` but name suggests Option?).
Inconsistent Cache Persistence API: `CacheManager` has `write_cache()`, but specific managers (`ModuleCacheManager`, etc.) also have `write_cache()`. It is unclear if calling the manager's write triggers the global write or if they are independent. Additionally, `PluginCacheManager` has `write_cache_to_disk()` which is distinct from `write_cache()`, creating confusion about when data is persisted.
Confusing Constructor Naming: `new_without_internal_plugins` is a verbose and awkward name for a constructor variant. It suggests a special case rather than a standard builder pattern or factory method.
Inconsistent Method Naming for Similar Operations: `get_cache_mut_option_ref` and `get_cache_mut_ref` both return `RefMut` but have different names, implying different behavior (likely one returns Option internally or handles missing keys differently), but the naming is not self-evident from the signature.

What to do

  1. Resolve the 1 Redundant/Conflicting Logic for Error-to-ModuleId Conversion finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Inconsistent Borrowing API finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Inconsistent Cache Persistence API finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

D26 · Project Cohesion9.8 / 10Exemplary✓ Tool-verified

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

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

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

1 of 71 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

✓ On the Gold path — maintain.

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

D28 · Secrets (history)3.0 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

187 finding(s): 0 critical, 171 high, 16 medium, 0 low. 142 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 37 file(s) — `.agents/skills/agent-browser/templates/authenticated-session.sh` (line 27), `.agents/skills/agent-browser/templates/capture-workflow.sh` (line 16), `.agents/skills/agent-browser/templates/form-automation.sh` (line 16), `.claude/skills/agent-browser/templates/authenticated-session.sh` (line 27), `.claude/skills/agent-browser/templates/capture-workflow.sh` (line 16), … (+32 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 5 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (4), REDACTED. — One of this dimension's main actionable groups (9 issue-level).
  2. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  3. No action in Static Analysis (SAST) — all 142 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (142 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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

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

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

220 finding(s): 10 critical, 98 high, 94 medium, 18 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D34 · Knowledge Freshness9.4 / 10Exemplary✓ Tool-verified

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

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

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

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

Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.9 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: REDACTED↔share.ts 57%; index.d.ts↔schema.ts 50%; REDACTED↔binding.ts 50%

Change coupling: REDACTED ↔ share.ts · ×3packages/core/src/config/index.ts

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with REDACTED (2), index.d.ts. — One of this dimension's main actionable groups (3 warning-level).

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 · Forms & labels5.3 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — crates/create-farm-rs/templates/electron/vanilla/src/main.ts:16, crates/create-farm-rs/templates/vanilla/src/main.ts:16
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×6) — crates/create-farm-rs/templates/tauri/preact/src/App.tsx:41, crates/create-farm-rs/templates/tauri/react/src/App.tsx:41, crates/create-farm-rs/templates/tauri/solid/src/App.tsx:41, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×7) — crates/create-farm-rs/templates/tauri/svelte/src/lib/Greet.svelte:15, crates/create-farm-rs/templates/tauri/vanilla/index.html:47, crates/create-farm-rs/templates/tauri/vue/src/components/Greet.vue:16, …
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — js-plugins/visualizer/src/client/src/pages/analysis/Compilation.vue:33, js-plugins/visualizer/src/client/src/pages/analysis/Plugin.vue:4

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure6.9 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — .agents/skills/brainstorming/scripts/frame-template.html:2, .claude/skills/brainstorming/scripts/frame-template.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×4) — .agents/skills/brainstorming/scripts/frame-template.html:2, .claude/skills/brainstorming/scripts/frame-template.html:2, crates/create-farm-rs/templates/lit/index.html:2, …

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • The repo's own CSS styles .card with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×2) — crates/create-farm-rs/templates/electron/svelte/src/App.svelte:18, crates/create-farm-rs/templates/svelte/src/App.svelte:18
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×2) — js-plugins/visualizer/src/client/src/components/ModuleList.vue:8, js-plugins/visualizer/src/client/src/components/ResourcePots.vue:8

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — your Biome config enables no a11y rules and there's no axe/pa11y/Lighthouse in tests or CI. Start by turning on Biome's own a11y rule group to catch issues at author time. What was searched, so you can tell an absence from a miss: the 95 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain you already use: enable Biome's a11y rule group in your biome.json `linter.rules` (it is off whenever `recommended` is false and the group is unlisted), then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.3 / 10Exemplary✓ Tool-verified

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

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

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

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 115 of 438 project(s) that lack one — worth up to 0.5 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

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

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

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

  • `cargo fmt` invokes cargo fmt 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. — REDACTED:14

What to do

  • Add `--check` to the cargo fmt step in `REDACTED` 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.
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability4.7 / 10Weak✓ Tool-verified

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

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

  • Only 5/23 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/create-farm-rs`, `crates/create-farm-rs/templates/tauri/preact/src-tauri`, `crates/create-farm-rs/templates/tauri/react/src-tauri`, `crates/create-farm-rs/templates/tauri/solid/src-tauri`, `crates/create-farm-rs/templates/tauri/svelte/src-tauri` and 13 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Consider OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) and a health-check endpoint (a /health route on your axum/actix router) for operability.
P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

What to do

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

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

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

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — rust-plugins/icons/src/cache/mod.rs:92

What to do

  • Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
PF1 · Benchmark discipline7.5 / 10Strong✓ Tool-verified

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

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

PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • `farmLessPlugin` holds an async function that calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — js-plugins/less/src/index.ts:29
  • `farmSassPlugin` holds an async function that calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — js-plugins/sass/src/index.ts:45
  • `resolveDependency` is async and calls existsSync, statSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — js-plugins/sass/src/index.ts:189
  • `readConfigFile` is async and calls existsSync, rmSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/config/load-config-file.ts:156
  • `checkCompilationInputValue` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/config/normalize-config/index.ts:180
  • `normalizePersistentCache` is async and calls existsSync, readFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/config/normalize-config/normalize-persistent-cache.ts:21
  • `defaultLoadPlugin` holds an async function that calls existsSync, readFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/plugin/js/adapter-plugins/default-load.ts:9
  • `hmrUpdate` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/server/hmr-engine.ts:129
  • `lazyCompilationMiddleware` holds an async function that calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/server/middlewares/lazyCompilation.ts:17
  • `#resolveOptions` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/server/preview.ts:159
  • `isCacheDirExists` is async and calls readdirSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/utils/cacheDir.ts:3
  • `recursiveReaddir` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/utils/file.ts:79
  • `getAdditionContext` is async and calls readFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/utils/plugin-utils.ts:6
  • `checkPublicFile` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/utils/publicDir.ts:11
  • `traceDependencies` is async and calls existsSync, statSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/core/src/utils/trace-dependencies.ts:15
  • `copyTemplate` is async and calls existsSync, copyFileSync, readFileSync, writeFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/create-farm-plugin/index.ts:114
  • `prepublish` is async and calls execSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/plugin-tools/src/prepublish.ts:8
  • `installDependencies` is async and calls execSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build.mjs:54
  • `buildExamples` is async and calls readdirSync, existsSync, readFileSync, statSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build.mjs:69
  • `buildJsPlugins` is async and calls readdirSync, statSync, existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build.mjs:268
  • `buildRustPlugins` is async and calls readdirSync, statSync, existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build.mjs:316
  • `runExample` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/test-e2e-worker.mjs:85

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.
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified

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

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

R10 · Code Duplication9.0 / 10Strong✓ Tool-verified

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

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

  • 9 duplicated blocks under crates/create-farm-rs/templates/ have copies in at least two of the sibling directories electron, preact, react, solid, tauri, tauri2 (+1 more sibling(s) not listed) — 6 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — crates/create-farm-rs/templates/tauri/react/src/App.tsx:7
  • 8 of the duplicated blocks reported below have copies in at least two of the sibling directories preact, react, solid, svelte, vanilla, vue under crates/create-farm-rs/templates/electron/. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — crates/create-farm-rs/templates/electron/preact/electron/main.ts:5
  • 5 duplicated blocks under js-plugins/ have copies in at least two of the sibling directories babel, dts, less, postcss, react-compiler, sass — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — js-plugins/less/src/index.ts:39
  • rust-plugins/dts/scripts/index.js:1 · rust-plugins/replace-dirname/scripts/index.js:1 · rust-plugins/svgr/scripts/index.js:1 · rust-plugins/vue-jsx/scripts/index.js:1 — these 4 files are line-for-line copies of one another — 64 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — rust-plugins/dts/scripts/index.js:1
  • packages/create-farm-plugin/templates/rust/scripts/index.js:69 · rust-plugins/auto-import/scripts/index.js:69 · rust-plugins/compress/scripts/index.js:69 · rust-plugins/dsv/scripts/index.js:69 · +17 more site(s) not listed — the 21 copies are spread across 21 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/create-farm-plugin/templates/rust/scripts/index.js:69
  • crates/create-farm-rs/templates/tauri/preact/src/App.tsx:7 · crates/create-farm-rs/templates/tauri/react/src/App.tsx:7 — 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. — crates/create-farm-rs/templates/tauri/preact/src/App.tsx:7
  • js-plugins/less/src/index.ts:39 · js-plugins/sass/src/index.ts:56 — the two spans are one implementation copied and then locally edited — 254 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. — js-plugins/less/src/index.ts:39
  • packages/core/src/server/type.ts:9 · packages/runtime-plugin-hmr/src/types.ts:55 — the two spans are one implementation copied and then locally edited — 163 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/core/src/server/type.ts:9
  • crates/create-farm-rs/templates/tauri/react/src/App.tsx:7 · crates/create-farm-rs/templates/tauri2/react/src/App.tsx:6 — 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. — crates/create-farm-rs/templates/tauri/react/src/App.tsx:7
  • crates/create-farm-rs/templates/tauri/solid/src/App.tsx:7 · crates/create-farm-rs/templates/tauri2/solid/src/App.tsx:6 — 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. — crates/create-farm-rs/templates/tauri/solid/src/App.tsx:7
  • js-plugins/copy/farm.config.ts:4 · js-plugins/vuetify/farm.config.ts:4 · packages/create-farm-plugin/templates/js/farm.config.ts:4 — the 3 copies are spread across 3 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. — js-plugins/copy/farm.config.ts:4
  • packages/create-farm-plugin/templates/rust/scripts/index.js:6 · rust-plugins/auto-import/scripts/index.js:6 · rust-plugins/compress/scripts/index.js:6 · rust-plugins/dsv/scripts/index.js:6 · +17 more site(s) not listed — the 21 copies are spread across 21 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. There is one copy in each of 21 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — packages/create-farm-plugin/templates/rust/scripts/index.js:6
  • packages/core/src/types/ws.ts:148 · packages/core/src/types/ws.ts:184 · packages/core/src/types/ws.ts:219 — 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/core/src/types/ws.ts:148
  • crates/create-farm-rs/templates/electron/preact/electron/main.ts:5 · crates/create-farm-rs/templates/electron/react/electron/main.ts:5 · crates/create-farm-rs/templates/electron/solid/electron/main.ts:5 · crates/create-farm-rs/templates/electron/svelte/electron/main.ts:5 · +2 more site(s) not listed — the 6 copies are spread across 6 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. There is one copy in each of 6 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — crates/create-farm-rs/templates/electron/preact/electron/main.ts:5
  • packages/core/src/server/index.ts:727 · packages/core/src/server/preview.ts:273 — the two spans are one implementation copied and then locally edited — 197 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/core/src/server/index.ts:727
  • scripts/build.mjs:282 · scripts/build.mjs:332 — 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. — scripts/build.mjs:282
  • crates/create-farm-rs/templates/electron/solid/src/App.tsx:6 · crates/create-farm-rs/templates/solid/src/App.tsx:6 — 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. — crates/create-farm-rs/templates/electron/solid/src/App.tsx:6
  • crates/create-farm-rs/templates/tauri2/preact/src/App.tsx:17 · crates/create-farm-rs/templates/tauri2/react/src/App.tsx:17 · crates/create-farm-rs/templates/tauri2/solid/src/App.tsx:17 — the 3 copies are spread across 3 files, and the CITED SPAN is a DECLARATION HEADER — the name, parameter list with its constraints and defaults, and base-type clause of a declaration — rather than statements inside a body. A header cannot be lifted into a helper: there is no expression position for a call to stand in, and the copies are frequently required to match, because one declaration passes its parameters straight through to the other. So the move is not extraction. Give the repeated pieces names — factor a long constraint or base-type expression into one named type both declarations refer to — and where the headers must stay identical, derive one from the other (a shared base declaration, or a single alias that spells the parameter set once) so that changing it once changes both. Where the language offers neither, treat the two as a pair that must be edited together: they drift apart the first time only one of them is changed, which is why this is reported. — crates/create-farm-rs/templates/tauri2/preact/src/App.tsx:17
  • packages/core/binding/resolve-binding.cjs:160 · packages/core/binding/resolve-binding.cjs:191 — 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/core/binding/resolve-binding.cjs:160
  • packages/create-farm-plugin/templates/js/playground/src/main.tsx:5 · packages/create-farm-plugin/templates/rust/playground/src/main.tsx:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/create-farm-plugin/templates/js/playground/src/main.tsx:5
  • crates/create-farm-rs/templates/electron/react/src/main.tsx:5 · crates/create-farm-rs/templates/react/src/main.tsx:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — crates/create-farm-rs/templates/electron/react/src/main.tsx:5
  • crates/create-farm-rs/templates/electron/preact/src/app.tsx:6 · crates/create-farm-rs/templates/preact/src/app.tsx:6 — 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. — crates/create-farm-rs/templates/electron/preact/src/app.tsx:6
  • js-plugins/visualizer/src/client/src/components/CodeDiff.vue:25 · js-plugins/visualizer/src/client/src/components/CodeViewer.vue:24 — 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. — js-plugins/visualizer/src/client/src/components/CodeDiff.vue:25
  • REDACTED:521 · REDACTED:580 — 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:521
  • packages/runtime-plugin-hmr/src/overlay.ts:703 · packages/runtime-plugin-hmr/src/overlay.ts:742 — the two spans are one implementation copied and then locally edited — 145 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/runtime-plugin-hmr/src/overlay.ts:703
  • packages/core/src/plugin/js/apply-html-transform.ts:68 · packages/core/src/plugin/js/apply-html-transform.ts:104 — the two spans are one implementation copied and then locally edited — 132 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/core/src/plugin/js/apply-html-transform.ts:68
  • packages/core/src/server/error.ts:5 · packages/runtime-plugin-hmr/src/utils.ts:32 — 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/core/src/server/error.ts:5
  • crates/create-farm-rs/templates/tauri2/preact/farm.config.ts:5 · crates/create-farm-rs/templates/tauri2/solid/farm.config.ts:5 · crates/create-farm-rs/templates/tauri2/svelte/farm.config.ts:5 · crates/create-farm-rs/templates/tauri2/vue/farm.config.ts:5 — the 4 copies are spread across 4 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. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — crates/create-farm-rs/templates/tauri2/preact/farm.config.ts:5
  • packages/core/src/types/ws.ts:257 · packages/core/src/types/ws.ts:278 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/core/src/types/ws.ts:257
  • crates/create-farm-rs/templates/electron/preact/electron/preload.ts:4 · crates/create-farm-rs/templates/electron/react/electron/preload.ts:4 · crates/create-farm-rs/templates/electron/solid/electron/preload.ts:4 · crates/create-farm-rs/templates/electron/svelte/electron/preload.ts:4 · +2 more site(s) not listed — the 6 copies are spread across 6 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. — crates/create-farm-rs/templates/electron/preact/electron/preload.ts:4
  • crates/create-farm-rs/templates/electron/preact/forge.config.cjs:13 · crates/create-farm-rs/templates/electron/react/forge.config.cjs:13 · crates/create-farm-rs/templates/electron/solid/forge.config.cjs:13 · crates/create-farm-rs/templates/electron/svelte/forge.config.cjs:13 · +2 more site(s) not listed — the 6 copies are spread across 6 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. There is one copy in each of 6 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — crates/create-farm-rs/templates/electron/preact/forge.config.cjs:13
  • crates/create-farm-rs/templates/electron/solid/farm.config.ts:3 · crates/create-farm-rs/templates/electron/svelte/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 51 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. — crates/create-farm-rs/templates/electron/solid/farm.config.ts:3
  • crates/create-farm-rs/templates/electron/solid/farm.config.ts:3 · crates/create-farm-rs/templates/electron/vue/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 51 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. — crates/create-farm-rs/templates/electron/solid/farm.config.ts:3
  • packages/core/src/plugin/js/js-plugin-schema.ts:256 · packages/core/src/plugin/js/js-plugin-schema.ts:275 · packages/core/src/plugin/js/js-plugin-schema.ts:294 · packages/core/src/plugin/js/js-plugin-schema.ts:313 · +2 more site(s) not listed — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. — packages/core/src/plugin/js/js-plugin-schema.ts:256
  • packages/core/src/server/index.ts:322 · packages/core/src/watcher/index.ts:266 — the two spans are one implementation copied and then locally edited — 84 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/core/src/server/index.ts:322
  • crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 · crates/create-farm-rs/templates/electron/solid/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 52 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. — crates/create-farm-rs/templates/electron/preact/farm.config.ts:3
  • crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 · crates/create-farm-rs/templates/electron/svelte/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 51 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. — crates/create-farm-rs/templates/electron/preact/farm.config.ts:3
  • crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 · crates/create-farm-rs/templates/electron/vue/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 51 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. — crates/create-farm-rs/templates/electron/preact/farm.config.ts:3
  • packages/core/src/plugin/index.ts:209 · packages/core/src/plugin/index.ts:247 — the two spans are one implementation copied and then locally edited — 73 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/core/src/plugin/index.ts:209
  • packages/core/src/plugin/js/index.ts:182 · packages/core/src/plugin/js/index.ts:201 — 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/core/src/plugin/js/index.ts:182

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.
R11 · Import Boundaries6.0 / 10Adequate✓ Tool-verified

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.

  • js-plugins/electron/src/index.ts:5 imports @farmfe/core, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — js-plugins/electron/src/index.ts:5
  • js-plugins/less/src/utils.ts:7 reaches into another package with a relative path (../../package.json) — import the package by name instead. — js-plugins/less/src/utils.ts:7
  • js-plugins/postcss/src/utils.ts:6 reaches into another package with a relative path (../../package.json) — import the package by name instead. — js-plugins/postcss/src/utils.ts:6
  • js-plugins/sass/src/options.ts:7 reaches into another package with a relative path (../../package.json) — import the package by name instead. — js-plugins/sass/src/options.ts:7
  • js-plugins/visualizer/src/client/src/api/index.ts:2 imports @farmfe/core/binding/binding, which the target package's package.json `exports` does not declare — use a declared entry or declare the subpath. — js-plugins/visualizer/src/client/src/api/index.ts:2
  • js-plugins/visualizer/src/client/src/components/AnalyzeDepsRecord.vue:51 imports @farmfe/core/binding, which the target package's package.json `exports` does not declare — use a declared entry or declare the subpath. — js-plugins/visualizer/src/client/src/components/AnalyzeDepsRecord.vue:51
  • js-plugins/visualizer/src/client/src/components/ModuleList.vue:32 imports @farmfe/core/binding/binding, which the target package's package.json `exports` does not declare — use a declared entry or declare the subpath. — js-plugins/visualizer/src/client/src/components/ModuleList.vue:32
  • js-plugins/visualizer/src/client/src/components/ProcessRecord.vue:33 imports @farmfe/core/binding, which the target package's package.json `exports` does not declare — use a declared entry or declare the subpath. — js-plugins/visualizer/src/client/src/components/ProcessRecord.vue:33
  • packages/cli/src/index.ts:1 imports @farmfe/core, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/cli/src/index.ts:1
  • packages/cli/src/utils.ts:4 imports @farmfe/core, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/cli/src/utils.ts:4
  • packages/cli/src/utils.ts:26 imports @farmfe/core, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/cli/src/utils.ts:26
  • scripts/test-e2e-worker.mjs:15 reaches into another package with a relative path (../e2e/farm-runner.mjs) — import the package by name instead. — scripts/test-e2e-worker.mjs:15
  • scripts/test-e2e-worker.mjs:15 imports e2e/farm-runner.mjs, 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. — scripts/test-e2e-worker.mjs:15
  • scripts/test-e2e-worker.mjs:21 reaches into another package with a relative path (../e2e/runner.mjs) — import the package by name instead. — scripts/test-e2e-worker.mjs:21
  • scripts/test-e2e-worker.mjs:21 imports e2e/runner.mjs, 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. — scripts/test-e2e-worker.mjs:21
  • scripts/test-e2e-worker.mjs:22 reaches into another package with a relative path (../e2e/utils.mjs) — import the package by name instead. — scripts/test-e2e-worker.mjs:22
  • scripts/test-e2e-worker.mjs:22 imports e2e/utils.mjs, 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. — scripts/test-e2e-worker.mjs:22
  • scripts/test-e2e.mjs:21 reaches into another package with a relative path (../e2e/runner.mjs) — import the package by name instead. — scripts/test-e2e.mjs:21
  • scripts/test-e2e.mjs:21 imports e2e/runner.mjs, 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. — scripts/test-e2e.mjs:21
  • scripts/test-e2e.mjs:22 reaches into another package with a relative path (../e2e/process-cleanup.mjs) — import the package by name instead. — scripts/test-e2e.mjs:22
  • scripts/test-e2e.mjs:22 imports e2e/process-cleanup.mjs, 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. — scripts/test-e2e.mjs:22
  • scripts/test-e2e.mjs:23 reaches into another package with a relative path (../e2e/utils.mjs) — import the package by name instead. — scripts/test-e2e.mjs:23
  • scripts/test-e2e.mjs:23 imports e2e/utils.mjs, 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. — scripts/test-e2e.mjs:23

What to do

  • Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (13 rows); move the shared test helper into a source directory production code may depend on (6 rows); declare the workspace packages these files import in the importing package's own package.json dependencies (4 rows) — those imports are already bare package specifiers, so the import statements do not change, only the manifest.
R2 · Cyclomatic Complexity7.3 / 10Strong✓ Tool-verified

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

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

  • normalizePersistentCache has cyclomatic complexity 39 and cognitive complexity 68; 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/core/src/config/normalize-config/normalize-persistent-cache.ts:21
  • viteConfigToFarmConfig has cyclomatic complexity 37 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/core/src/plugin/js/farm-to-vite-config.ts:321
  • executor has cyclomatic complexity 23 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. — js-plugins/copy/src/index.ts:133
  • normalizeTargetEnv has cyclomatic complexity 21 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. — packages/core/src/config/normalize-config/normalize-output.ts:141
  • normalizeUserCompilationConfig has cyclomatic complexity 21 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/core/src/config/normalize-config/index.ts:43
  • cleanupStaleE2EProcesses has cyclomatic complexity 21 and cognitive complexity 22; 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. — e2e/process-cleanup.mjs:278
  • normalizeRuntimeConfig has cyclomatic complexity 21 and cognitive complexity 16; 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/core/src/config/normalize-config/normalize-runtime.ts:20
  • applyHotUpdates has cyclomatic complexity 19 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. — REDACTED:93
  • farmRequire has cyclomatic complexity 19 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/runtime/src/module-system.ts:149
  • config has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/create-farm-rs/templates/nestjs/index.plugin.ts:6
  • interopRequireWildcard has cyclomatic complexity 18 and cognitive complexity 22; 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/runtime/src/modules/module-helper.ts:107
  • convertPluginVite has cyclomatic complexity 18 and cognitive complexity 21; 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/core/src/plugin/js/index.ts:160
  • #resolveOptions has cyclomatic complexity 18 and cognitive complexity 15; 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/core/src/server/preview.ts:159
  • getResolvedOptions has cyclomatic complexity 17 and cognitive complexity 25; 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. — js-plugins/dts/src/utils.ts:116
  • mergeFarmCliConfig has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/core/src/config/merge-config.ts:48
  • farmUserConfigToViteConfig has cyclomatic complexity 16 and cognitive complexity 15; 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/core/src/plugin/js/farm-to-vite-config.ts:14
  • htmlFallbackMiddleware has cyclomatic complexity 16 and cognitive complexity 15; 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/core/src/server/middlewares/htmlFallback.ts:9
  • handleResolveOptions has cyclomatic complexity 16 and cognitive complexity 14; 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. — js-plugins/dts/src/context.ts:40
  • checkCompilationInputValue has cyclomatic complexity 15 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/core/src/config/normalize-config/index.ts:180
  • parseArgs has cyclomatic complexity 15 and cognitive complexity 23; 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/test-e2e.mjs:37

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files8.8 / 10Strong✓ Tool-verified

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

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

What to do

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

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

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

  • vitest.config.ts declares environment "node", and no package here declares a DOM implementation (jsdom / happy-dom), a component testing library or a browser runner — so none of the 57 unreached component module(s) can be tested as written, however the suite is authored: js-plugins/visualizer/src/client/src/pages/analysis/Compilation.vue, js-plugins/visualizer/src/client/src/pages/analysis/Plugin.vue, js-plugins/visualizer/src/client/src/pages/analysis/Bundle.vue, js-plugins/visualizer/src/client/src/components/NavBar.vue, js-plugins/visualizer/src/client/src/components/AnalyzeDepsRecord.vue, js-plugins/visualizer/src/client/src/components/ResourcePots.vue and 51 more. Add a DOM environment and a component testing library (for example jsdom + @testing-library, or the runner's browser mode), then test the components. Reported once because these files share one cause, not one omission each. — vitest.config.ts
  • 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. (×39) — packages/core/src/types/ws.ts, js-plugins/dts/src/utils.ts, scripts/build.mjs, …

What to do

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

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

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

R7 · Dead Code8.4 / 10Strong✓ Tool-verified

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

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

  • Unreachable from the 191 application, 163 tooling and 230 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 (191 application, 163 tooling, 230 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 (×19) — packages/core/binding/resolve-binding.cjs, packages/core/src/server/error.ts, js-plugins/visualizer/src/client/src/components/AnalyzeDepsRecord.vue, …
  • no import path from any entry point (191 application, 163 tooling, 230 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (js-plugins/visualizer/src/client/src/pages/analysis/Module.vue) — 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 — js-plugins/visualizer/src/client/src/components/ModuleList.vue
  • This script imports the product ('../Card'), so it is an authored benchmark, not measurement input — but nothing invokes it: no package.json script, no CI workflow or build recipe, no Dockerfile, no other file under website/src/components/Benchmark/, and no in-repo reference to its name at all. It runs only if someone remembers to type `node website/src/components/Benchmark/index.tsx`, and it silently rots against the API it measures. Wire it into a script or workflow the way its wired siblings are, or delete it. — website/src/components/Benchmark/index.tsx
  • Nothing imports this binding — it is safe to review for removal. (×18) — js-plugins/dts/src/utils.ts:28, js-plugins/dts/src/utils.ts:33, js-plugins/dts/src/utils.ts:37, …

What to do

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

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

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

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×5) — crates/create-farm-rs/templates/electron/solid/svelte.config.js:1, crates/create-farm-rs/templates/electron/vanilla/svelte.config.js:1, rust-plugins/auto-import/tests/test.ts:3, …
  • Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json. (×6) — rust-plugins/auto-import/playground-vue/src/types/auto_import.d.ts:4, rust-plugins/icons/types/preact.d.ts:2, rust-plugins/icons/types/react.d.ts:2, …
  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
  • Declared in crates/create-farm-rs/templates/nestjs/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Every import is type-only — move it to devDependencies. — js-plugins/visualizer/src/dev.ts:2

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports4.8 / 10Weak✓ Tool-verified

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

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

  • packages/core/src/utils/index.ts → packages/core/src/utils/fsUtils.ts → packages/core/src/config/index.ts → packages/core/src/config/env.ts → packages/core/src/utils/index.ts (one verified cycle inside a mutually-dependent group of 37 files) — packages/core/src/utils/index.ts

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

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

LensScoreRatingImpact
Code Health80%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture74%StrongSolid.
Maturity78%StrongStrongest area.
Readiness26%Weak — gated by D13, R4, R8, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security26%Weak — gated by D28, D29, D30, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility50%Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance66%AdequateAcceptable, with room to improve.
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.

  • X10 Duplicated predicate — 7 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 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.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 66 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.

  • AX1 Captive dependencies — Not applicable: NestJS makes a provider that injects a request-scoped one request-scoped itself (scope bubbles up the injection chain), and gives every consumer its own transient instance by contract.
  • AX2 Stateful singletons — Not applicable: Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
  • D14 License Compliance — License Compliance not included (time budget)
  • 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.
  • 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. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 12 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (21 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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • 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# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb. TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — 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
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — 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
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — 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
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — 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
  • X5 Nullable reference types — 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
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 318 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 117 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×95
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 70 more in this group — see findings.md.
AC2 · Forms & labels · <input> without a programmatic label · ×12
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri/preact/src/App.tsx:41 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri/react/src/App.tsx:41 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri/solid/src/App.tsx:41 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri/svelte/src/lib/Greet.svelte:15 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri/vanilla/index.html:47 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri/vue/src/components/Greet.vue:16 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri2/preact/src/App.tsx:39 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri2/react/src/App.tsx:39 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri2/solid/src/App.tsx:39 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri2/svelte/src/routes/+page.svelte:31 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri2/vanilla/index.html:37 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label crates/create-farm-rs/templates/tauri2/vue/src/App.vue:32 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
D30 · Dependency Vulnerabilities · Critical CVE · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <select> without a programmatic label · ×3
  • <select> without a programmatic label js-plugins/visualizer/src/client/src/pages/analysis/Compilation.vue:33 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label js-plugins/visualizer/src/client/src/pages/analysis/Compilation.vue:75 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <select> without a programmatic label js-plugins/visualizer/src/client/src/pages/analysis/Plugin.vue:4 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D13 · REDACTED Scanning · Leaked secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text crates/create-farm-rs/templates/electron/vanilla/src/main.ts:16 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text crates/create-farm-rs/templates/vanilla/src/main.ts:16 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC3 · Page structure · <html> without a lang · ×2
  • <html> without a lang .agents/skills/brainstorming/scripts/frame-template.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang .claude/skills/brainstorming/scripts/frame-template.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×2
  • Clickable element isn't keyboard-operable crates/create-farm-rs/templates/electron/svelte/src/App.svelte:18 — The repo's own CSS styles .card with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable crates/create-farm-rs/templates/svelte/src/App.svelte:18 — The repo's own CSS styles .card with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×2
  • Click handler on a non-interactive <div> js-plugins/visualizer/src/client/src/components/ModuleList.vue:8 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> js-plugins/visualizer/src/client/src/components/ResourcePots.vue:8 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@sveltejs/vite-plugin-svelte' · ×2
  • Unlisted import '@sveltejs/vite-plugin-svelte' crates/create-farm-rs/templates/electron/solid/svelte.config.js:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
  • Unlisted import '@sveltejs/vite-plugin-svelte' crates/create-farm-rs/templates/electron/vanilla/svelte.config.js:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'react' · ×1
  • Unlisted import 'react' rust-plugins/auto-import/tests/test.ts:3 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'vue' · ×1
  • Unlisted import 'vue' rust-plugins/auto-import/tests/test.ts:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'react-refresh' · ×1
  • Unlisted import 'react-refresh' rust-plugins/react/src/is_react_refresh_boundary.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (4 files) · ×1
  • Import cycle (4 files) packages/core/src/utils/index.ts — packages/core/src/utils/index.ts → packages/core/src/utils/fsUtils.ts → packages/core/src/config/index.ts → packages/core/src/config/env.ts → packages/core/src/utils/index.ts (one verified cycle inside a mutually-dependent group of 37 files)
Serious — 821 finding(s)
D17 · Explicit Debt · TodoComment · ×73
  • TodoComment crates/compiler/src/build/module_cache.rs:313 — // TODO: return of resolve hook should be treated as part of the cache key — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/compiler/src/build/module_cache.rs:395 — // TODO using context.load first for virtual modules, then read file string if context.load returns None — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/compiler/src/update/diff_and_patch_module_graph/test_patch_module_graph.rs:166 — // TODO update these complex 1 2 3 tests — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/compiler/src/write/mod.rs:19 — // TODO may be different for different platforms threshold will be different linux / macos / windows — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/compiler/src/write/mod.rs:22 — // TODO use error::{CompilationError} we need refactor Error mod — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/compiler/src/write/mod.rs:222 — // TODO use error::{CompilationError} we need refactor Error mod — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/compiler/src/write/mod.rs:25 — // // TODO add writeBundle write hooks plugin_driver — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/compiler/src/write/mod.rs:166 — // TODO try catch error — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/compiler/tests/bundle.rs:50 — // TODO: multiple bundle — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/cache/module_cache/mutable_modules.rs:26 — // TODO: cache unit test — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/cache/store/disk.rs:41 — // TODO make CacheStore a trait and implement DiskCacheStore or RemoteCacheStore or more. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/config/partial_bundling.rs:30 — /// TODO check if it is between 0 and 1 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/config/output.rs:127 — /// TODO set default to MultipleBundle when multiple bundle is fully supported — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/context/mod.rs:416 — // TODO optimize string performance — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/error/mod.rs:23 — // TODO, give the specific recommended plugin of this kind of module — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/error/mod.rs:39 — // TODO, give the specific recommended plugin of this kind of module — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/error/mod.rs:24 — // TODO add potential causes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/core/src/error/mod.rs:67 — // TODO optimize using source Error — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/node/src/lib.rs:263 — /// TODO: usage example — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/node/src/file_watcher.rs:28 — // TODO support other kind of events — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/node/src/plugin_adapters/js_plugin_adapter/mod.rs:517 — // TODO: maybe can prompt for the name of the plugin — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/plugin_define/src/lib.rs:105 — // TODO support source map — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/plugin_library/src/lib.rs:308 — // TODO: add a hook collect resource pot import/export info before render resource pot — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/plugin_library/src/formats/mod.rs:47 — // TODO support multiple bundle, in multiple bundle, the helper may not be in a separate resource — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/plugin_library/src/formats/cjs.rs:93 — // TODO add test case — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 48 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×57
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 32 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×39
  • No test reaches this file packages/core/src/types/ws.ts — 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 js-plugins/dts/src/utils.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/build.mjs — 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 js-plugins/sass/src/index.ts — 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 js-plugins/tailwindcss/src/index.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/test-e2e.mjs — 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/runtime/src/modules/dynamic-import.ts — 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 js-plugins/dts/src/context.ts — 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 js-plugins/react-compiler/src/types.ts — 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/index.ts — 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/binding/resolve-binding.cjs — 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/runtime/src/module-system.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/test-e2e-worker.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/create-farm-plugin/index.ts — 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 js-plugins/copy/src/index.ts — 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 js-plugins/electron/src/index.ts — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/plugin_lazy_compilation/src/dynamic_module.ts — 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 js-plugins/postcss/src/index.ts — 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 js-plugins/less/src/index.ts — 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/runtime/src/modules/module-helper.ts — 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/utils.ts — 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 rust-plugins/dts/scripts/index.js — 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 rust-plugins/tailwindcss/scripts/index.js — 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 js-plugins/visualizer/src/client/src/utils/file.ts — 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 rust-plugins/svgr/scripts/index.js — 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.
  • + 14 more in this group — see findings.md.
R11 · Import Boundaries · Boundary violation [package · ×23
  • Boundary violation [package:undeclared-workspace-dep] js-plugins/electron/src/index.ts:5 — js-plugins/electron/src/index.ts:5 imports @farmfe/core, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:relative-cross-package] js-plugins/less/src/utils.ts:7 — js-plugins/less/src/utils.ts:7 reaches into another package with a relative path (../../package.json) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] js-plugins/postcss/src/utils.ts:6 — js-plugins/postcss/src/utils.ts:6 reaches into another package with a relative path (../../package.json) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] js-plugins/sass/src/options.ts:7 — js-plugins/sass/src/options.ts:7 reaches into another package with a relative path (../../package.json) — import the package by name instead.
  • Boundary violation [package:deep-import] js-plugins/visualizer/src/client/src/api/index.ts:2 — js-plugins/visualizer/src/client/src/api/index.ts:2 imports @farmfe/core/binding/binding, which the target package's package.json `exports` does not declare — use a declared entry or declare the subpath.
  • Boundary violation [package:deep-import] js-plugins/visualizer/src/client/src/components/AnalyzeDepsRecord.vue:51 — js-plugins/visualizer/src/client/src/components/AnalyzeDepsRecord.vue:51 imports @farmfe/core/binding, which the target package's package.json `exports` does not declare — use a declared entry or declare the subpath.
  • Boundary violation [package:deep-import] js-plugins/visualizer/src/client/src/components/ModuleList.vue:32 — js-plugins/visualizer/src/client/src/components/ModuleList.vue:32 imports @farmfe/core/binding/binding, which the target package's package.json `exports` does not declare — use a declared entry or declare the subpath.
  • Boundary violation [package:deep-import] js-plugins/visualizer/src/client/src/components/ProcessRecord.vue:33 — js-plugins/visualizer/src/client/src/components/ProcessRecord.vue:33 imports @farmfe/core/binding, which the target package's package.json `exports` does not declare — use a declared entry or declare the subpath.
  • Boundary violation [package:undeclared-workspace-dep] packages/cli/src/index.ts:1 — packages/cli/src/index.ts:1 imports @farmfe/core, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/cli/src/utils.ts:4 — packages/cli/src/utils.ts:4 imports @farmfe/core, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/cli/src/utils.ts:26 — packages/cli/src/utils.ts:26 imports @farmfe/core, a package this repository publishes, but this package's own package.json does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:relative-cross-package] scripts/test-e2e-worker.mjs:15 — scripts/test-e2e-worker.mjs:15 reaches into another package with a relative path (../e2e/farm-runner.mjs) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] scripts/test-e2e-worker.mjs:15 — scripts/test-e2e-worker.mjs:15 imports e2e/farm-runner.mjs, 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:relative-cross-package] scripts/test-e2e-worker.mjs:21 — scripts/test-e2e-worker.mjs:21 reaches into another package with a relative path (../e2e/runner.mjs) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] scripts/test-e2e-worker.mjs:21 — scripts/test-e2e-worker.mjs:21 imports e2e/runner.mjs, 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:relative-cross-package] scripts/test-e2e-worker.mjs:22 — scripts/test-e2e-worker.mjs:22 reaches into another package with a relative path (../e2e/utils.mjs) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] scripts/test-e2e-worker.mjs:22 — scripts/test-e2e-worker.mjs:22 imports e2e/utils.mjs, 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:relative-cross-package] scripts/test-e2e.mjs:21 — scripts/test-e2e.mjs:21 reaches into another package with a relative path (../e2e/runner.mjs) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] scripts/test-e2e.mjs:21 — scripts/test-e2e.mjs:21 imports e2e/runner.mjs, 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:relative-cross-package] scripts/test-e2e.mjs:22 — scripts/test-e2e.mjs:22 reaches into another package with a relative path (../e2e/process-cleanup.mjs) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] scripts/test-e2e.mjs:22 — scripts/test-e2e.mjs:22 imports e2e/process-cleanup.mjs, 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:relative-cross-package] scripts/test-e2e.mjs:23 — scripts/test-e2e.mjs:23 reaches into another package with a relative path (../e2e/utils.mjs) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] scripts/test-e2e.mjs:23 — scripts/test-e2e.mjs:23 imports e2e/utils.mjs, 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×22
  • Sync-over-async blocking js-plugins/less/src/index.ts:29 — `farmLessPlugin` holds an async function that calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking js-plugins/sass/src/index.ts:45 — `farmSassPlugin` holds an async function that calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking js-plugins/sass/src/index.ts:189 — `resolveDependency` is async and calls existsSync, statSync — 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/core/src/config/load-config-file.ts:156 — `readConfigFile` is async and calls existsSync, rmSync — 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/core/src/config/normalize-config/index.ts:180 — `checkCompilationInputValue` is async and calls existsSync — 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/core/src/config/normalize-config/normalize-persistent-cache.ts:21 — `normalizePersistentCache` is async and calls existsSync, readFileSync — 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/core/src/plugin/js/adapter-plugins/default-load.ts:9 — `defaultLoadPlugin` holds an async function that calls existsSync, readFileSync — 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/core/src/server/hmr-engine.ts:129 — `hmrUpdate` is async and calls existsSync — 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/core/src/server/middlewares/lazyCompilation.ts:17 — `lazyCompilationMiddleware` holds an async function that calls existsSync — 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/core/src/server/preview.ts:159 — `#resolveOptions` is async and calls existsSync — 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/core/src/utils/cacheDir.ts:3 — `isCacheDirExists` is async and calls readdirSync — 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/core/src/utils/file.ts:79 — `recursiveReaddir` is async and calls existsSync — 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/core/src/utils/plugin-utils.ts:6 — `getAdditionContext` is async and calls readFileSync — 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/core/src/utils/publicDir.ts:11 — `checkPublicFile` is async and calls existsSync — 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/core/src/utils/trace-dependencies.ts:15 — `traceDependencies` is async and calls existsSync, statSync — 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/create-farm-plugin/index.ts:114 — `copyTemplate` is async and calls existsSync, copyFileSync, readFileSync, writeFileSync — 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/plugin-tools/src/prepublish.ts:8 — `prepublish` is async and calls execSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build.mjs:54 — `installDependencies` is async and calls execSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build.mjs:69 — `buildExamples` is async and calls readdirSync, existsSync, readFileSync, statSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build.mjs:268 — `buildJsPlugins` is async and calls readdirSync, statSync, existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build.mjs:316 — `buildRustPlugins` is async and calls readdirSync, statSync, existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/test-e2e-worker.mjs:85 — `runExample` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D3 · God Classes · FunctionTooLong · ×21
  • FunctionTooLong: farmfe_svgr_rs::transform_svg_component::variables::get_variables rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:42 — FunctionTooLong — farmfe_svgr_rs::transform_svg_component::variables::get_variables runs 214 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_module_exports_dfs crates/plugin_script_meta/src/plugin_exports/expand_exports.rs:162 — FunctionTooLong — farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_module_exports_dfs runs 194 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 94 over it, 1.94× 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: farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_write_imported_idents_statements crates/plugin_tree_shake/src/tree_shake_modules.rs:309 — FunctionTooLong — farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_write_imported_idents_statements runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_plugin_css::transform_css_to_script::transform_css_to_script_modules crates/plugin_css/src/transform_css_to_script.rs:38 — FunctionTooLong — farmfe_plugin_css::transform_css_to_script::transform_css_to_script_modules runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_compiler::update::diff_and_patch_module_graph::diff_module_deps crates/compiler/src/update/diff_and_patch_module_graph.rs:265 — FunctionTooLong — farmfe_compiler::update::diff_and_patch_module_graph::diff_module_deps runs 146 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 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_compiler::generate::render_resource_pots::render_resource_pots_and_generate_resources crates/compiler/src/generate/render_resource_pots.rs:22 — FunctionTooLong — farmfe_compiler::generate::render_resource_pots::render_resource_pots_and_generate_resources runs 143 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 43 over it, 1.43× 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: farmfe_toolkit::script::analyze_statement::statement_info::analyze_statement_info crates/toolkit/src/script/analyze_statement/statement_info.rs:32 — FunctionTooLong — farmfe_toolkit::script::analyze_statement::statement_info::analyze_statement_info runs 143 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 43 over it, 1.43× 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: roadmap.TimelineCpm website/src/pages/roadmap.tsx:29 — FunctionTooLong — TimelineCpm runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_plugin_mangle_exports::mangle_exports::update_exports_meta_and_module_decl crates/plugin_mangle_exports/src/mangle_exports.rs:251 — FunctionTooLong — farmfe_plugin_mangle_exports::mangle_exports::update_exports_meta_and_module_decl runs 134 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 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_toolkit::script::concatenate_modules::strip_modules_asts crates/toolkit/src/script/concatenate_modules/mod.rs:237 — FunctionTooLong — farmfe_toolkit::script::concatenate_modules::strip_modules_asts runs 134 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 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_compiler::update::handle_update_modules::handle_update_modules crates/compiler/src/update/handle_update_modules.rs:12 — FunctionTooLong — farmfe_compiler::update::handle_update_modules::handle_update_modules runs 123 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 23 over it, 1.23× 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: farmfe_ecosystem_tailwindcss::candidate::parse_candidate rust-ecosystem/tailwindcss/src/candidate.rs:32 — FunctionTooLong — farmfe_ecosystem_tailwindcss::candidate::parse_candidate runs 120 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 20 over it, 1.20× 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: farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_export_statements crates/toolkit/src/script/concatenate_modules/strip_module_decl.rs:255 — FunctionTooLong — farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_export_statements runs 119 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 19 over it, 1.19× 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: farmfe_ecosystem_tailwindcss::attribute_selector_parser::parse rust-ecosystem/tailwindcss/src/attribute_selector_parser.rs:97 — FunctionTooLong — farmfe_ecosystem_tailwindcss::attribute_selector_parser::parse runs 116 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 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.farmPlugin REDACTED:100 — FunctionTooLong — farmPlugin runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× 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: farmfe_ecosystem_tailwindcss::selector_parser::parse rust-ecosystem/tailwindcss/src/selector_parser.rs:90 — FunctionTooLong — farmfe_ecosystem_tailwindcss::selector_parser::parse runs 107 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 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_ecosystem_tailwindcss::utils::math_operators::add_whitespace_around_math_operators rust-ecosystem/tailwindcss/src/utils/math_operators.rs:41 — FunctionTooLong — farmfe_ecosystem_tailwindcss::utils::math_operators::add_whitespace_around_math_operators runs 104 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 4 over it, 1.04× 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: farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_ambiguous_export_all crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:603 — FunctionTooLong — farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_ambiguous_export_all runs 103 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 3 over it, 1.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: farmfe_toolkit::script::module2cjs::transform_export_named crates/toolkit/src/script/module2cjs.rs:570 — FunctionTooLong — farmfe_toolkit::script::module2cjs::transform_export_named runs 103 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 3 over it, 1.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: normalize-persistent-cache.normalizePersistentCache packages/core/src/config/normalize-config/normalize-persistent-cache.ts:21 — FunctionTooLong — normalizePersistentCache runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farmfe_plugin_auto_import::parser::scan_exports::scan_exports rust-plugins/auto-import/src/parser/scan_exports.rs:79 — FunctionTooLong — farmfe_plugin_auto_import::parser::scan_exports::scan_exports runs 101 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 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D2 · Cognitive Complexity · farmfe_ecosystem_tailwindcss · ×20
  • farmfe_ecosystem_tailwindcss::selector_parser::parse (cognitive 78) rust-ecosystem/tailwindcss/src/selector_parser.rs:90 — farmfe_ecosystem_tailwindcss::selector_parser::parse has cognitive complexity 78 (threshold 15). Drivers by points: if/else 20 (61 pts), loops 5 (14 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::utils::math_operators::add_whitespace_around_math_operators (cognitive 68) rust-ecosystem/tailwindcss/src/utils/math_operators.rs:41 — farmfe_ecosystem_tailwindcss::utils::math_operators::add_whitespace_around_math_operators has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (48 pts), boolean chains 16, loops 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::attribute_selector_parser::parse (cognitive 54) rust-ecosystem/tailwindcss/src/attribute_selector_parser.rs:97 — farmfe_ecosystem_tailwindcss::attribute_selector_parser::parse has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 10, loops 8 (10 pts), match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::candidate::parse_candidate (cognitive 40) rust-ecosystem/tailwindcss/src/candidate.rs:32 — farmfe_ecosystem_tailwindcss::candidate::parse_candidate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 7 (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.
  • farmfe_ecosystem_tailwindcss::value_parser::parse (cognitive 37) rust-ecosystem/tailwindcss/src/value_parser.rs:73 — farmfe_ecosystem_tailwindcss::value_parser::parse has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 3 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::apply::process_nodes (cognitive 35) rust-ecosystem/tailwindcss/src/apply.rs:44 — farmfe_ecosystem_tailwindcss::apply::process_nodes has cognitive complexity 35 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 4 (11 pts), match/switch 2 (7 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.
  • farmfe_ecosystem_tailwindcss::ast::optimize_ast (cognitive 32) rust-ecosystem/tailwindcss/src/ast.rs:124 — farmfe_ecosystem_tailwindcss::ast::optimize_ast has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • farmfe_ecosystem_tailwindcss::compiler::scan_var_calls (cognitive 30) rust-ecosystem/tailwindcss/src/compiler.rs:309 — farmfe_ecosystem_tailwindcss::compiler::scan_var_calls has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 3 (8 pts), boolean chains 3 (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.
  • farmfe_ecosystem_tailwindcss::utils::decode_arbitrary_value::recursively_decode_arbitrary_values (cognitive 26) rust-ecosystem/tailwindcss/src/utils/decode_arbitrary_value.rs:45 — farmfe_ecosystem_tailwindcss::utils::decode_arbitrary_value::recursively_decode_arbitrary_values has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (17 pts), loops 2 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::utils::segment::segment (cognitive 26) rust-ecosystem/tailwindcss/src/utils/segment.rs:23 — farmfe_ecosystem_tailwindcss::utils::segment::segment has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::variants::resolve_functional (cognitive 25) rust-ecosystem/tailwindcss/src/variants.rs:482 — farmfe_ecosystem_tailwindcss::variants::resolve_functional has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (25 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.
  • farmfe_ecosystem_tailwindcss::utils::escape::unescape (cognitive 23) rust-ecosystem/tailwindcss/src/utils/escape.rs:96 — farmfe_ecosystem_tailwindcss::utils::escape::unescape has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::utils::brace_expansion::expand_sequence (cognitive 21) rust-ecosystem/tailwindcss/src/utils/brace_expansion.rs:126 — farmfe_ecosystem_tailwindcss::utils::brace_expansion::expand_sequence has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::utils::compare::compare (cognitive 21) rust-ecosystem/tailwindcss/src/utils/compare.rs:14 — farmfe_ecosystem_tailwindcss::utils::compare::compare has cognitive complexity 21 (threshold 15). Drivers by points: loops 3 (7 pts), match/switch 2 (7 pts), if/else 2 (4 pts), boolean chains 3 (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.
  • farmfe_ecosystem_tailwindcss::utils::is_valid_arbitrary::is_valid_arbitrary (cognitive 20) rust-ecosystem/tailwindcss/src/utils/is_valid_arbitrary.rs:19 — farmfe_ecosystem_tailwindcss::utils::is_valid_arbitrary::is_valid_arbitrary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::ast::stringify (cognitive 20) rust-ecosystem/tailwindcss/src/ast.rs:55 — farmfe_ecosystem_tailwindcss::ast::stringify has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 5 (7 pts), 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.
  • farmfe_ecosystem_tailwindcss::candidate::normalize_arbitrary_value (cognitive 19) rust-ecosystem/tailwindcss/src/candidate.rs:378 — farmfe_ecosystem_tailwindcss::candidate::normalize_arbitrary_value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::utilities::resolve_spacing (cognitive 17) rust-ecosystem/tailwindcss/src/utilities.rs:658 — farmfe_ecosystem_tailwindcss::utilities::resolve_spacing has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::utils::brace_expansion::expand_inner (cognitive 16) rust-ecosystem/tailwindcss/src/utils/brace_expansion.rs:22 — farmfe_ecosystem_tailwindcss::utils::brace_expansion::expand_inner has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss::compiler::walk_features (cognitive 16) rust-ecosystem/tailwindcss/src/compiler.rs:455 — farmfe_ecosystem_tailwindcss::compiler::walk_features has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · MethodTooLong · ×14
  • MethodTooLong: VueJsxTransformVisitor.resolve_indexed_access rust-plugins/vue-jsx/src/resolve_type.rs:628 — MethodTooLong — resolve_indexed_access runs 274 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 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UtilityRegistry.builtin rust-ecosystem/tailwindcss/src/utilities.rs:27 — MethodTooLong — builtin runs 273 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 173 over it, 2.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VueJsxTransformVisitor.transform_attrs rust-plugins/vue-jsx/src/lib.rs:517 — MethodTooLong — transform_attrs runs 257 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 157 over it, 2.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ExportsVisitor.visit_module_decl rust-plugins/auto-import/src/parser/parse.rs:169 — MethodTooLong — visit_module_decl runs 179 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VueJsxTransformVisitor.resolve_type_elements rust-plugins/vue-jsx/src/resolve_type.rs:362 — MethodTooLong — resolve_type_elements runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ErrorOverlay.renderMessages packages/runtime-plugin-hmr/src/overlay.ts:611 — MethodTooLong — renderMessages runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VueJsxTransformVisitor.transform_children rust-plugins/vue-jsx/src/lib.rs:895 — MethodTooLong — transform_children runs 135 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 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.
  • MethodTooLong: Compiler.update crates/compiler/src/update/mod.rs:145 — MethodTooLong — update runs 130 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 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.
  • MethodTooLong: SideEffectsAnalyzer.visit_expr crates/plugin_tree_shake/src/statement_graph/analyze_statement_side_effects.rs:302 — MethodTooLong — visit_expr 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.
  • MethodTooLong: FarmPluginCss.transform crates/plugin_css/src/lib.rs:232 — MethodTooLong — transform runs 122 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 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FarmfePluginIcons.load rust-plugins/icons/src/lib.rs:124 — MethodTooLong — load runs 117 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 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VueJsxTransformVisitor.infer_runtime_type rust-plugins/vue-jsx/src/resolve_type.rs:978 — MethodTooLong — infer_runtime_type runs 112 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 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VueJsxTransformVisitor.extract_props_type rust-plugins/vue-jsx/src/resolve_type.rs:25 — MethodTooLong — extract_props_type runs 111 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 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FarmfePluginCompress.finalize_resources rust-plugins/compress/src/lib.rs:88 — MethodTooLong — finalize_resources runs 104 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 4 over it, 1.04× 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 vulnerability · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D2 · Cognitive Complexity · farmfe_toolkit · ×13
  • farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_export_statements (cognitive 78) crates/toolkit/src/script/concatenate_modules/strip_module_decl.rs:255 — farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_export_statements has cognitive complexity 78 (threshold 15). Drivers by points: if/else 13 (42 pts), match/switch 4 (21 pts), loops 4 (15 pts) (nesting depth added 57). 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.
  • farmfe_toolkit::script::analyze_statement::statement_info::analyze_statement_info (cognitive 71) crates/toolkit/src/script/analyze_statement/statement_info.rs:32 — farmfe_toolkit::script::analyze_statement::statement_info::analyze_statement_info has cognitive complexity 71 (threshold 15). Drivers by points: match/switch 12 (38 pts), if/else 7 (23 pts), loops 3 (10 pts) (nesting depth added 49). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
  • farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_import_statements (cognitive 46) crates/toolkit/src/script/concatenate_modules/strip_module_decl.rs:118 — farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_import_statements has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (35 pts), loops 3 (7 pts), match/switch 1 (4 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_ambiguous_export_all (cognitive 43) crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:603 — farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_ambiguous_export_all has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 3 (12 pts), boolean chains 6 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • farmfe_toolkit::script::transform_to_esm::update_module_graph_edges_of_cjs_modules (cognitive 37) crates/toolkit/src/script/transform_to_esm/mod.rs:111 — farmfe_toolkit::script::transform_to_esm::update_module_graph_edges_of_cjs_modules has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_external_import (cognitive 32) crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:92 — farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_external_import has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (5 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • farmfe_toolkit::sourcemap::collapse_sourcemap_chain (cognitive 28) crates/toolkit/src/sourcemap.rs:271 — farmfe_toolkit::sourcemap::collapse_sourcemap_chain has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 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.
  • farmfe_toolkit::script::concatenate_modules::strip_modules_asts (cognitive 28) crates/toolkit/src/script/concatenate_modules/mod.rs:237 — farmfe_toolkit::script::concatenate_modules::strip_modules_asts has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_toolkit::script::module2cjs::transform_export_named (cognitive 25) crates/toolkit/src/script/module2cjs.rs:570 — farmfe_toolkit::script::module2cjs::transform_export_named has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_toolkit::sourcemap::trace_module_sourcemap (cognitive 20) crates/toolkit/src/sourcemap.rs:82 — farmfe_toolkit::sourcemap::trace_module_sourcemap has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 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.
  • farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_external_export (cognitive 19) crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:420 — farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_external_export has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 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.
  • farmfe_toolkit::fs::normalize_file_name_as_variable (cognitive 18) crates/toolkit/src/fs.rs:104 — farmfe_toolkit::fs::normalize_file_name_as_variable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_toolkit::script::module2cjs::transform_module_decls (cognitive 17) crates/toolkit/src/script/module2cjs.rs:278 — farmfe_toolkit::script::module2cjs::transform_module_decls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farmfe_compiler · ×12
  • farmfe_compiler::update::diff_and_patch_module_graph::diff_module_deps (cognitive 79) crates/compiler/src/update/diff_and_patch_module_graph.rs:265 — farmfe_compiler::update::diff_and_patch_module_graph::diff_module_deps has cognitive complexity 79 (threshold 15). Drivers by points: if/else 24 (54 pts), loops 10 (22 pts), boolean chains 3 (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.
  • farmfe_compiler::generate::render_resource_pots::render_resource_pots_and_generate_resources (cognitive 76) crates/compiler/src/generate/render_resource_pots.rs:22 — farmfe_compiler::generate::render_resource_pots::render_resource_pots_and_generate_resources has cognitive complexity 76 (threshold 15). Drivers by points: if/else 25 (55 pts), loops 9 (20 pts), boolean chains 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_compiler::update::patch_module_group_graph::patch_removed_dynamic_import_and_dynamic_entry (cognitive 44) crates/compiler/src/update/patch_module_group_graph.rs:288 — farmfe_compiler::update::patch_module_group_graph::patch_removed_dynamic_import_and_dynamic_entry has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 3 (8 pts), boolean chains 3 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • farmfe_compiler::update::patch_module_group_graph::patch_existing_added_non_dynamic_children (cognitive 34) crates/compiler/src/update/patch_module_group_graph.rs:402 — farmfe_compiler::update::patch_module_group_graph::patch_existing_added_non_dynamic_children has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_compiler::update::handle_update_modules::handle_update_modules (cognitive 34) crates/compiler/src/update/handle_update_modules.rs:12 — farmfe_compiler::update::handle_update_modules::handle_update_modules has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 4 (9 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.
  • farmfe_compiler::update::patch_module_group_graph::patch_any_module_group_for_toposort_modules (cognitive 31) crates/compiler/src/update/patch_module_group_graph.rs:598 — farmfe_compiler::update::patch_module_group_graph::patch_any_module_group_for_toposort_modules has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (21 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 21). 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.
  • farmfe_compiler::update::patch_module_group_graph::patch_module_group_graph (cognitive 29) crates/compiler/src/update/patch_module_group_graph.rs:16 — farmfe_compiler::update::patch_module_group_graph::patch_module_group_graph has cognitive complexity 29 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 3 (10 pts), boolean chains 1 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • farmfe_compiler::update::regenerate_resources::generate_and_diff_resource_pots::handle_enforce_resource_pots (cognitive 27) crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots.rs:149 — farmfe_compiler::update::regenerate_resources::generate_and_diff_resource_pots::handle_enforce_resource_pots has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_compiler::update::diff_and_patch_module_graph::patch_module_graph (cognitive 25) crates/compiler/src/update/diff_and_patch_module_graph.rs:122 — farmfe_compiler::update::diff_and_patch_module_graph::patch_module_graph has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 7 (9 pts), match/switch 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_compiler::update::regenerate_resources::generate_and_diff_resource_pots::diff_and_patch_resource_pot_map (cognitive 22) crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots.rs:303 — farmfe_compiler::update::regenerate_resources::generate_and_diff_resource_pots::diff_and_patch_resource_pot_map has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (10 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • farmfe_compiler::generate::partial_bundling::generate_enforce_resource_pots (cognitive 17) crates/compiler/src/generate/partial_bundling.rs:203 — farmfe_compiler::generate::partial_bundling::generate_enforce_resource_pots has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_compiler::build::resolve_module (cognitive 17) crates/compiler/src/build/mod.rs:655 — farmfe_compiler::build::resolve_module has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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.
D3 · God Classes · FileTooLong · ×12
  • FileTooLong: src/lib.rs rust-plugins/vue-jsx/src/lib.rs — FileTooLong — 1162 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 86% of them inside a single declaration: VueJsxTransformVisitor (7 blocks, 39-1489). The bar is 500 significant lines; this is 662 over it, 2.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/utilities.rs rust-ecosystem/tailwindcss/src/utilities.rs — FileTooLong — 956 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 108 free functions. The bar is 500 significant lines; this is 456 over it, 1.91× 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/resolve_type.rs rust-plugins/vue-jsx/src/resolve_type.rs — FileTooLong — 941 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 95% of them inside a single declaration: VueJsxTransformVisitor (21-1226). The bar is 500 significant lines; this is 441 over it, 1.88× 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: script/module2cjs.rs crates/toolkit/src/script/module2cjs.rs — FileTooLong — 757 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 257 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: plugin/plugin_driver.rs crates/core/src/plugin/plugin_driver.rs — FileTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: PluginDriver (2 blocks, 27-929). The bar is 500 significant lines; this is 208 over it, 1.42× 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: REDACTED REDACTED — FileTooLong — 664 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: VitePluginAdapter (100-976). The bar is 500 significant lines; this is 164 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/lib.rs crates/swc_transformer_import_glob/src/lib.rs — FileTooLong — 602 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 102 over it, 1.20× 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: concatenate_modules/handle_external_modules.rs crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs — FileTooLong — 592 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 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/resolver.rs crates/plugin_resolve/src/resolver.rs — FileTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 92% of them inside a single declaration: Resolver (3 blocks, 52-864). The bar is 500 significant lines; this is 91 over it, 1.18× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/overlay.ts packages/runtime-plugin-hmr/src/overlay.ts — FileTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 84 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lib.rs crates/plugin_css/src/lib.rs — FileTooLong — 562 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: FarmPluginCss (3 blocks, 169-736). The bar is 500 significant lines; this is 62 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: update/mod.rs crates/compiler/src/update/mod.rs — FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 79% of them inside a single declaration: Compiler (78-690). The bar is 500 significant lines; this is 55 over it, 1.11× 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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · farmfe_ecosystem_tailwindcss · ×11
  • farmfe_ecosystem_tailwindcss::attribute_selector_parser::parse (cyclomatic 44) rust-ecosystem/tailwindcss/src/attribute_selector_parser.rs:97 — farmfe_ecosystem_tailwindcss::attribute_selector_parser::parse has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • farmfe_ecosystem_tailwindcss::utils::math_operators::add_whitespace_around_math_operators (cyclomatic 37) rust-ecosystem/tailwindcss/src/utils/math_operators.rs:41 — farmfe_ecosystem_tailwindcss::utils::math_operators::add_whitespace_around_math_operators 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.
  • farmfe_ecosystem_tailwindcss::selector_parser::parse (cyclomatic 33) rust-ecosystem/tailwindcss/src/selector_parser.rs:90 — farmfe_ecosystem_tailwindcss::selector_parser::parse 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.
  • farmfe_ecosystem_tailwindcss::candidate::parse_candidate (cyclomatic 26) rust-ecosystem/tailwindcss/src/candidate.rs:32 — farmfe_ecosystem_tailwindcss::candidate::parse_candidate 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.
  • farmfe_ecosystem_tailwindcss::value_parser::parse (cyclomatic 19) rust-ecosystem/tailwindcss/src/value_parser.rs:73 — farmfe_ecosystem_tailwindcss::value_parser::parse 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.
  • farmfe_ecosystem_tailwindcss::variants::resolve_functional (cyclomatic 17) rust-ecosystem/tailwindcss/src/variants.rs:482 — farmfe_ecosystem_tailwindcss::variants::resolve_functional has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: farmfe_ecosystem_tailwindcss::variants::resolve_named (cyclomatic 48) 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.
  • farmfe_ecosystem_tailwindcss::ast::optimize_ast (cyclomatic 17) rust-ecosystem/tailwindcss/src/ast.rs:124 — farmfe_ecosystem_tailwindcss::ast::optimize_ast 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.
  • farmfe_ecosystem_tailwindcss::utils::brace_expansion::expand_sequence (cyclomatic 16) rust-ecosystem/tailwindcss/src/utils/brace_expansion.rs:126 — farmfe_ecosystem_tailwindcss::utils::brace_expansion::expand_sequence 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.
  • farmfe_ecosystem_tailwindcss::utilities::resolve_spacing (cyclomatic 16) rust-ecosystem/tailwindcss/src/utilities.rs:658 — farmfe_ecosystem_tailwindcss::utilities::resolve_spacing 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.
  • farmfe_ecosystem_tailwindcss::apply::process_nodes (cyclomatic 16) rust-ecosystem/tailwindcss/src/apply.rs:44 — farmfe_ecosystem_tailwindcss::apply::process_nodes 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.
  • farmfe_ecosystem_tailwindcss::utils::segment::segment (cyclomatic 16) rust-ecosystem/tailwindcss/src/utils/segment.rs:23 — farmfe_ecosystem_tailwindcss::utils::segment::segment 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.
D29 · Static Analysis (SAST) · REDACTED · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×11
  • Duplicated block (6 lines × 2) crates/core/src/module/module_graph.rs:689 — crates/core/src/module/module_graph.rs:689-694 | crates/core/src/module/module_group.rs:139-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/core/src/module/module_graph.rs:697 — crates/core/src/module/module_graph.rs:697-702 | crates/core/src/module/module_group.rs:155-160 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/plugin_runtime/src/import_meta_visitor.rs:78 — crates/plugin_runtime/src/import_meta_visitor.rs:78-83 | crates/plugin_tree_shake/src/remove_hot_update.rs:29-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/toolkit/src/script/concatenate_modules/unique_idents.rs:218 — crates/toolkit/src/script/concatenate_modules/unique_idents.rs:218-223 | crates/toolkit/src/script/concatenate_modules/unique_idents.rs:237-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) rust-plugins/vue-jsx/src/lib.rs:1048 — rust-plugins/vue-jsx/src/lib.rs:1048-1053 | rust-plugins/vue-jsx/src/lib.rs:1120-1125 — both copies are in the same file, so extract the 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) rust-plugins/auto-import/src/lib.rs:44 — rust-plugins/auto-import/src/lib.rs:44-49 | rust-plugins/react-components/src/lib.rs:60-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) rust-plugins/icons/src/loader/svg_builder.rs:33 — rust-plugins/icons/src/loader/svg_builder.rs:33-38 | rust-plugins/svgr/src/svg_builder.rs:46-51 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) rust-plugins/icons/src/loader/svg_builder.rs:50 — rust-plugins/icons/src/loader/svg_builder.rs:50-55 | rust-plugins/svgr/src/svg_builder.rs:63-68 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) rust-plugins/icons/src/loader/svg_builder.rs:57 — rust-plugins/icons/src/loader/svg_builder.rs:57-62 | rust-plugins/svgr/src/svg_builder.rs:70-75 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) rust-plugins/icons/src/loader/svg_builder.rs:74 — rust-plugins/icons/src/loader/svg_builder.rs:74-79 | rust-plugins/svgr/src/svg_builder.rs:87-92 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) rust-ecosystem/tailwindcss/src/utilities.rs:1018 — rust-ecosystem/tailwindcss/src/utilities.rs:1018-1023 | rust-ecosystem/tailwindcss/src/utilities.rs:1049-1054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D5 · Coupling · Off the main sequence · ×10
  • Off the main sequence: @farmfe/runtime-plugin-hmr — @farmfe/runtime-plugin-hmr: 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: @farmfe/runtime-plugin-import-meta — @farmfe/runtime-plugin-import-meta: 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: @farmfe/utils — @farmfe/utils: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: farmfe_ecosystem_tailwindcss — farmfe_ecosystem_tailwindcss: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: farmfe_svgr_rs — farmfe_svgr_rs: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: farmfe_utils — farmfe_utils: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 24 project(s), so it's rigid to change.
  • Off the main sequence: farmfe_testing_helpers — farmfe_testing_helpers: abstractness 0.00, instability 0.05, distance 0.95 — zone of pain — concrete and depended on by 20 project(s), so it's rigid to change.
  • Off the main sequence: farmfe_toolkit_plugin_types — farmfe_toolkit_plugin_types: abstractness 0.00, instability 0.05, distance 0.95 — zone of pain — concrete and depended on by 19 project(s), so it's rigid to change.
  • Off the main sequence: farmfe_toolkit — farmfe_toolkit: abstractness 0.02, instability 0.07, distance 0.91 — zone of pain — concrete and depended on by 38 project(s), so it's rigid to change.
  • Off the main sequence: farmfe_core — farmfe_core: abstractness 0.06, instability 0.06, distance 0.88 — zone of pain — concrete and depended on by 46 project(s), so it's rigid to change.
D2 · Cognitive Complexity · farmfe_plugin_tree_shake · ×8
  • farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_write_imported_idents_statements (cognitive 161) crates/plugin_tree_shake/src/tree_shake_modules.rs:309 — farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_write_imported_idents_statements has cognitive complexity 161 (threshold 15). Drivers by points: if/else 22 (111 pts), loops 10 (31 pts), match/switch 2 (18 pts), boolean chains 1 (nesting depth added 126). 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.
  • farmfe_plugin_tree_shake::tree_shake_modules::find_dep_module_read_global_variables_dfs (cognitive 40) crates/plugin_tree_shake/src/tree_shake_modules.rs:608 — farmfe_plugin_tree_shake::tree_shake_modules::find_dep_module_read_global_variables_dfs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 5 (15 pts), boolean chains 1 (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.
  • farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_used_statements (cognitive 35) crates/plugin_tree_shake/src/tree_shake_modules.rs:206 — farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_used_statements has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • farmfe_plugin_tree_shake::tree_shake_modules::traverse_tree_shake_modules (cognitive 32) crates/plugin_tree_shake/src/tree_shake_modules.rs:79 — farmfe_plugin_tree_shake::tree_shake_modules::traverse_tree_shake_modules has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (11 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_plugin_tree_shake::tree_shake_modules::remove_export_idents::remove_export_idents (cognitive 32) crates/plugin_tree_shake/src/tree_shake_modules/remove_export_idents.rs:112 — farmfe_plugin_tree_shake::tree_shake_modules::remove_export_idents::remove_export_idents has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 5 (10 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.
  • farmfe_plugin_tree_shake::tree_shake_modules::remove_export_idents::is_module_contains_reexport_ident (cognitive 27) crates/plugin_tree_shake/src/tree_shake_modules/remove_export_idents.rs:58 — farmfe_plugin_tree_shake::tree_shake_modules::remove_export_idents::is_module_contains_reexport_ident has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 1 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_plugin_tree_shake::tree_shake_modules::remove_useless_stmts::remove_useless_stmts (cognitive 24) crates/plugin_tree_shake/src/tree_shake_modules/remove_useless_stmts.rs:18 — farmfe_plugin_tree_shake::tree_shake_modules::remove_useless_stmts::remove_useless_stmts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (7 pts), loops 2 (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.
  • farmfe_plugin_tree_shake::statement_graph::analyze_written_imported_idents::find_written_imported_idents_dfs (cognitive 18) crates/plugin_tree_shake/src/statement_graph/analyze_written_imported_idents.rs:43 — farmfe_plugin_tree_shake::statement_graph::analyze_written_imported_idents::find_written_imported_idents_dfs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VueJsxTransformVisitor · ×8
  • VueJsxTransformVisitor::resolve_indexed_access (cognitive 122) rust-plugins/vue-jsx/src/resolve_type.rs:628 — VueJsxTransformVisitor::resolve_indexed_access has cognitive complexity 122 (threshold 15). Drivers by points: if/else 32 (82 pts), match/switch 12 (40 pts) (nesting depth added 78). 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.
  • VueJsxTransformVisitor::transform_attrs (cognitive 79) rust-plugins/vue-jsx/src/lib.rs:517 — VueJsxTransformVisitor::transform_attrs has cognitive complexity 79 (threshold 15). Drivers by points: if/else 32 (52 pts), match/switch 9 (20 pts), boolean chains 7 (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.
  • VueJsxTransformVisitor::resolve_type_elements (cognitive 65) rust-plugins/vue-jsx/src/resolve_type.rs:362 — VueJsxTransformVisitor::resolve_type_elements has cognitive complexity 65 (threshold 15). Drivers by points: match/switch 10 (36 pts), if/else 10 (24 pts), loops 2 (5 pts) (nesting depth added 43). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
  • VueJsxTransformVisitor::extract_props_type (cognitive 42) rust-plugins/vue-jsx/src/resolve_type.rs:25 — VueJsxTransformVisitor::extract_props_type has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 7 (18 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VueJsxTransformVisitor::transform_children (cognitive 38) rust-plugins/vue-jsx/src/lib.rs:895 — VueJsxTransformVisitor::transform_children has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (27 pts), match/switch 5 (10 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.
  • VueJsxTransformVisitor::infer_runtime_type (cognitive 38) rust-plugins/vue-jsx/src/resolve_type.rs:978 — VueJsxTransformVisitor::infer_runtime_type has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (28 pts), match/switch 4 (8 pts), loops 1 (2 pts) (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • VueJsxTransformVisitor::build_props_type (cognitive 34) rust-plugins/vue-jsx/src/resolve_type.rs:187 — VueJsxTransformVisitor::build_props_type has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (29 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VueJsxTransformVisitor::extract_emits_type (cognitive 26) rust-plugins/vue-jsx/src/resolve_type.rs:1140 — VueJsxTransformVisitor::extract_emits_type has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 8 (21 pts), if/else 4 (5 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×8
  • Duplicated block (14 lines × 2) crates/compiler/src/build/mod.rs:169 — crates/compiler/src/build/mod.rs:169-182 | crates/compiler/src/update/mod.rs:229-242 — `crates/compiler/src/build/mod.rs` and `crates/compiler/src/update/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (14 lines × 2) crates/plugin_html/src/deps_analyzer.rs:116 — crates/plugin_html/src/deps_analyzer.rs:116-129 | crates/plugin_html/src/deps_analyzer.rs:172-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/plugin_library/src/lib.rs:462 — crates/plugin_library/src/lib.rs:462-475 | crates/plugin_library/src/lib.rs:494-507 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/swc_transformer_import_glob/src/lib.rs:194 — crates/swc_transformer_import_glob/src/lib.rs:194-207 | crates/swc_transformer_import_glob/src/lib.rs:220-233 — both copies are in the same file, so extract the 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) rust-ecosystem/tailwindcss/src/candidate.rs:292 — rust-ecosystem/tailwindcss/src/candidate.rs:292-305 | rust-ecosystem/tailwindcss/src/candidate.rs:309-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) rust-plugins/auto-import/src/lib.rs:137 — rust-plugins/auto-import/src/lib.rs:137-150 | rust-plugins/strip/src/lib.rs:61-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 (14 lines × 2) rust-plugins/vue-jsx/src/directive.rs:93 — rust-plugins/vue-jsx/src/directive.rs:93-106 | rust-plugins/vue-jsx/src/directive.rs:241-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/node/src/plugin_adapters/js_plugin_adapter/hooks/augment_resource_hash.rs:61 — crates/node/src/plugin_adapters/js_plugin_adapter/hooks/augment_resource_hash.rs:61-74 | crates/node/src/plugin_adapters/js_plugin_adapter/hooks/process_rendered_resource_pot.rs:109-122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D1 · Cyclomatic Complexity · VueJsxTransformVisitor · ×7
  • VueJsxTransformVisitor::transform_attrs (cyclomatic 53) rust-plugins/vue-jsx/src/lib.rs:517 — VueJsxTransformVisitor::transform_attrs 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.
  • VueJsxTransformVisitor::resolve_indexed_access (cyclomatic 46) rust-plugins/vue-jsx/src/resolve_type.rs:628 — VueJsxTransformVisitor::resolve_indexed_access has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • VueJsxTransformVisitor::resolve_type_elements (cyclomatic 39) rust-plugins/vue-jsx/src/resolve_type.rs:362 — VueJsxTransformVisitor::resolve_type_elements has cyclomatic complexity 39 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • VueJsxTransformVisitor::infer_runtime_type (cyclomatic 36) rust-plugins/vue-jsx/src/resolve_type.rs:978 — VueJsxTransformVisitor::infer_runtime_type has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • VueJsxTransformVisitor::transform_children (cyclomatic 24) rust-plugins/vue-jsx/src/lib.rs:895 — VueJsxTransformVisitor::transform_children 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.
  • VueJsxTransformVisitor::extract_props_type (cyclomatic 21) rust-plugins/vue-jsx/src/resolve_type.rs:25 — VueJsxTransformVisitor::extract_props_type has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • VueJsxTransformVisitor::extract_emits_type (cyclomatic 20) rust-plugins/vue-jsx/src/resolve_type.rs:1140 — VueJsxTransformVisitor::extract_emits_type has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×7
  • Duplicated block (12 lines × 2) crates/compiler/src/build/module_cache.rs:343 — crates/compiler/src/build/module_cache.rs:343-354 | crates/compiler/src/build/module_cache.rs:379-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/node/src/plugin_adapters/js_plugin_adapter/thread_safe_js_plugin_hook.rs:354 — crates/node/src/plugin_adapters/js_plugin_adapter/thread_safe_js_plugin_hook.rs:354-365 | crates/node/src/plugin_adapters/js_plugin_adapter/thread_safe_js_plugin_hook.rs:395-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:376 — rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:376-387 | rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:389-400 — both copies are in the same file, so extract the 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) rust-ecosystem/tailwindcss/src/utilities.rs:450 — rust-ecosystem/tailwindcss/src/utilities.rs:450-461 | rust-ecosystem/tailwindcss/src/utilities.rs:608-619 — both copies are in the same file, so extract the 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) rust-plugins/react-components/src/insert_import.rs:197 — rust-plugins/react-components/src/insert_import.rs:197-208 | rust-plugins/react-components/src/insert_import.rs:213-224 — both copies are in the same file, so extract the 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) rust-plugins/icons/src/compiler/react.rs:5 — rust-plugins/icons/src/compiler/react.rs:5-16 | rust-plugins/svgr/src/react_compiler.rs:10-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) crates/core/src/plugin/plugin_driver.rs:220 — crates/core/src/plugin/plugin_driver.rs:220-231 | crates/core/src/plugin/plugin_driver.rs:900-912 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×7
  • Duplicated block (11 lines × 2) crates/core/src/cache/module_cache/mutable_modules.rs:118 — crates/core/src/cache/module_cache/mutable_modules.rs:118-128 | crates/core/src/cache/resource_cache/resource_pot.rs:76-86 — 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/plugin_partial_bundling/src/analyze_module_graph.rs:122 — crates/plugin_partial_bundling/src/analyze_module_graph.rs:122-132 | crates/plugin_partial_bundling/src/analyze_module_graph.rs:165-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) rust-ecosystem/tailwindcss/src/utilities.rs:1397 — rust-ecosystem/tailwindcss/src/utilities.rs:1397-1407 | rust-ecosystem/tailwindcss/src/utilities.rs:1431-1441 — both copies are in the same file, so extract the 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) rust-plugins/icons/src/loader/svg_builder.rs:104 — rust-plugins/icons/src/loader/svg_builder.rs:104-114 | rust-plugins/svgr/src/svg_builder.rs:117-127 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/core/src/module/module_graph.rs:291 — crates/core/src/module/module_graph.rs:291-301 | crates/core/src/module/module_graph.rs:429-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/create-farm-rs/src/lib.rs:118 — crates/create-farm-rs/src/lib.rs:118-128 | crates/create-farm-rs/src/lib.rs:133-143 — both copies are in the same file, so extract the 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) rust-ecosystem/tailwindcss/src/utilities.rs:1189 — rust-ecosystem/tailwindcss/src/utilities.rs:1189-1199 | rust-ecosystem/tailwindcss/src/utilities.rs:1211-1221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×7
  • Duplicated block (10 lines × 2) crates/core/src/module/module_graph.rs:243 — crates/core/src/module/module_graph.rs:243-252 | crates/core/src/module/module_graph.rs:513-522 — both copies are in the same file, so extract the 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/plugin_css/src/lib.rs:660 — crates/plugin_css/src/lib.rs:660-669 | crates/plugin_script/src/lib.rs:565-575 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) crates/toolkit/src/script/analyze_statement/statement_info.rs:81 — crates/toolkit/src/script/analyze_statement/statement_info.rs:81-90 | crates/toolkit/src/script/analyze_statement/statement_info.rs:92-101 — both copies are in the same file, so extract the 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) rust-plugins/auto-import/src/finish_imports.rs:25 — rust-plugins/auto-import/src/finish_imports.rs:25-34 | rust-plugins/react-components/src/finish_components.rs:29-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) crates/testing_helpers/src/lib.rs:247 — crates/testing_helpers/src/lib.rs:247-256 | crates/testing_helpers/src/lib.rs:262-272 — both copies are in the same file, so extract the 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) rust-plugins/sass/src/rebase_urls.rs:64 — rust-plugins/sass/src/rebase_urls.rs:64-73 | rust-plugins/sass/src/rebase_urls.rs:84-94 — both copies are in the same file, so extract the 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/compiler/src/update/handle_update_modules.rs:34 — crates/compiler/src/update/handle_update_modules.rs:34-43 | crates/compiler/src/update/handle_update_modules.rs:165-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • Duplicated block (9 lines × 2) crates/compiler/src/build/mod.rs:557 — crates/compiler/src/build/mod.rs:557-565 | crates/compiler/src/update/mod.rs:486-494 — `crates/compiler/src/build/mod.rs` and `crates/compiler/src/update/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (9 lines × 2) rust-plugins/auto-import/src/parser/scan_exports.rs:55 — rust-plugins/auto-import/src/parser/scan_exports.rs:55-63 | rust-plugins/react-components/src/find_local_components.rs:50-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) rust-plugins/auto-import/src/parser/scan_exports.rs:69 — rust-plugins/auto-import/src/parser/scan_exports.rs:69-77 | rust-plugins/react-components/src/find_local_components.rs:169-177 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) rust-plugins/icons/src/loader/svg_builder.rs:40 — rust-plugins/icons/src/loader/svg_builder.rs:40-48 | rust-plugins/svgr/src/svg_builder.rs:53-61 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) rust-plugins/icons/src/loader/svg_builder.rs:64 — rust-plugins/icons/src/loader/svg_builder.rs:64-72 | rust-plugins/svgr/src/svg_builder.rs:77-85 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:133 — rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:133-141 | rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:229-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) rust-ecosystem/tailwindcss-node/src/compile.rs:111 — rust-ecosystem/tailwindcss-node/src/compile.rs:111-119 | rust-ecosystem/tailwindcss-node/src/compile.rs:128-136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×7
  • Duplicated block (5 lines × 2) rust-plugins/auto-import/src/parser/scan_dirs_exports.rs:39 — rust-plugins/auto-import/src/parser/scan_dirs_exports.rs:39-43 | rust-plugins/react-components/src/find_local_components.rs:364-368 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) rust-plugins/vue-jsx/src/resolve_type.rs:365 — rust-plugins/vue-jsx/src/resolve_type.rs:365-369 | rust-plugins/vue-jsx/src/resolve_type.rs:404-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) rust-plugins/icons/src/loader/svg_builder.rs:116 — rust-plugins/icons/src/loader/svg_builder.rs:116-120 | rust-plugins/svgr/src/svg_builder.rs:144-148 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/node/src/plugin_adapters/js_plugin_adapter/context_methods/vite_get_importers.rs:19 — crates/node/src/plugin_adapters/js_plugin_adapter/context_methods/vite_get_importers.rs:19-23 | crates/node/src/plugin_adapters/js_plugin_adapter/context_methods/vite_get_modules_by_file.rs:36-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) rust-ecosystem/tailwindcss/src/utilities.rs:1281 — rust-ecosystem/tailwindcss/src/utilities.rs:1281-1285 | rust-ecosystem/tailwindcss/src/utilities.rs:1295-1299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/node/src/plugin_adapters/js_plugin_adapter/context.rs:242 — crates/node/src/plugin_adapters/js_plugin_adapter/context.rs:242-246 | crates/node/src/plugin_adapters/js_plugin_adapter/context.rs:254-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) rust-plugins/vue-jsx/src/resolve_type.rs:1144 — rust-plugins/vue-jsx/src/resolve_type.rs:1144-1148 | rust-plugins/vue-jsx/src/resolve_type.rs:1150-1154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D6 · Cohesion (LCOM4) · Low cohesion · ×6
  • Low cohesion: JsPluginAdapter (LCOM4 11) crates/node/src/plugin_adapters/js_plugin_adapter/mod.rs:60 — JsPluginAdapter's methods fall into 11 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 11 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: FarmPluginCss (LCOM4 8) crates/plugin_css/src/lib.rs:169 — FarmPluginCss's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FarmPluginScript (LCOM4 7) crates/plugin_script/src/lib.rs:74 — FarmPluginScript's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FarmPluginLibrary (LCOM4 6) crates/plugin_library/src/lib.rs:61 — FarmPluginLibrary's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RenameVisitor (LCOM4 6) crates/toolkit/src/script/concatenate_modules/unique_idents.rs:122 — RenameVisitor's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CompilationContext (LCOM4 4) crates/core/src/context/mod.rs:53 — CompilationContext's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
R7 · Dead Code · Dead file (~56 LoC) · ×6
  • Dead file (~56 LoC) crates/create-farm-rs/templates/electron/preact/electron/main.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~56 LoC) crates/create-farm-rs/templates/electron/react/electron/main.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~56 LoC) crates/create-farm-rs/templates/electron/solid/electron/main.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~56 LoC) crates/create-farm-rs/templates/electron/svelte/electron/main.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~56 LoC) crates/create-farm-rs/templates/electron/vanilla/electron/main.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~56 LoC) crates/create-farm-rs/templates/electron/vue/electron/main.ts — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~24 LoC) · ×6
  • Dead file (~24 LoC) crates/create-farm-rs/templates/electron/preact/electron/preload.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~24 LoC) crates/create-farm-rs/templates/electron/react/electron/preload.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~24 LoC) crates/create-farm-rs/templates/electron/solid/electron/preload.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~24 LoC) crates/create-farm-rs/templates/electron/svelte/electron/preload.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~24 LoC) crates/create-farm-rs/templates/electron/vanilla/electron/preload.ts — no import path from any entry point (191 application, 163 tooling, 230 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 (~24 LoC) crates/create-farm-rs/templates/electron/vue/electron/preload.ts — no import path from any entry point (191 application, 163 tooling, 230 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
D1 · Cyclomatic Complexity · farmfe_toolkit · ×5
  • farmfe_toolkit::script::analyze_statement::statement_info::analyze_statement_info (cyclomatic 37) crates/toolkit/src/script/analyze_statement/statement_info.rs:32 — farmfe_toolkit::script::analyze_statement::statement_info::analyze_statement_info has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_export_statements (cyclomatic 25) crates/toolkit/src/script/concatenate_modules/strip_module_decl.rs:255 — farmfe_toolkit::script::concatenate_modules::strip_module_decl::strip_export_statements 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.
  • farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_ambiguous_export_all (cyclomatic 20) crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:603 — farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_ambiguous_export_all 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.
  • farmfe_toolkit::script::concatenate_modules::strip_modules_asts (cyclomatic 19) crates/toolkit/src/script/concatenate_modules/mod.rs:237 — farmfe_toolkit::script::concatenate_modules::strip_modules_asts 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.
  • farmfe_toolkit::script::transform_to_esm::update_module_graph_edges_of_cjs_modules (cyclomatic 16) crates/toolkit/src/script/transform_to_esm/mod.rs:111 — farmfe_toolkit::script::transform_to_esm::update_module_graph_edges_of_cjs_modules 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×5
  • Hotspot: crates/toolkit/src/script/analyze_statement/statement_info.rs crates/toolkit/src/script/analyze_statement/statement_info.rs:32 — crates/toolkit/src/script/analyze_statement/statement_info.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in farmfe_toolkit::script::analyze_statement::statement_info::analyze_statement_info at line 32. 1 of those changes was a fix/bug commit, and the other 2 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-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 08:34:49 +08:00' --until='2026-06-14 08:34:49 +08:00' --full-history --no-merges -- crates/toolkit/src/script/analyze_statement/statement_info.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/compiler/src/generate/render_resource_pots.rs crates/compiler/src/generate/render_resource_pots.rs:22 — crates/compiler/src/generate/render_resource_pots.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in farmfe_compiler::generate::render_resource_pots::render_resource_pots_and_generate_resources at line 22. 1 of those changes was a fix/bug commit, and the other 2 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-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 08:34:49 +08:00' --until='2026-06-14 08:34:49 +08:00' --full-history --no-merges -- crates/compiler/src/generate/render_resource_pots.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/plugin_mangle_exports/src/mangle_exports.rs crates/plugin_mangle_exports/src/mangle_exports.rs:251 — crates/plugin_mangle_exports/src/mangle_exports.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in farmfe_plugin_mangle_exports::mangle_exports::update_exports_meta_and_module_decl at line 251. 1 of those changes was a fix/bug commit, and the other 2 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-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 08:34:49 +08:00' --until='2026-06-14 08:34:49 +08:00' --full-history --no-merges -- crates/plugin_mangle_exports/src/mangle_exports.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/toolkit/src/script/concatenate_modules/handle_external_modules.rs crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:603 — crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in farmfe_toolkit::script::concatenate_modules::handle_external_modules::handle_ambiguous_export_all at line 603. 1 of those changes was a fix/bug commit, and the other 3 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-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 08:34:49 +08:00' --until='2026-06-14 08:34:49 +08:00' --full-history --no-merges -- crates/toolkit/src/script/concatenate_modules/handle_external_modules.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/swc_transformer_import_glob/src/lib.rs crates/swc_transformer_import_glob/src/lib.rs:821 — crates/swc_transformer_import_glob/src/lib.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in farmfe_swc_transformer_import_glob::get_object_literal at line 821. 1 of those changes was a fix/bug commit, and the other 2 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-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 08:34:49 +08:00' --until='2026-06-14 08:34:49 +08:00' --full-history --no-merges -- crates/swc_transformer_import_glob/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.
D2 · Cognitive Complexity · farmfe_plugin_mangle_exports · ×5
  • farmfe_plugin_mangle_exports::mangle_exports::update_exports_meta_and_module_decl (cognitive 131) crates/plugin_mangle_exports/src/mangle_exports.rs:251 — farmfe_plugin_mangle_exports::mangle_exports::update_exports_meta_and_module_decl has cognitive complexity 131 (threshold 15). Drivers by points: match/switch 8 (59 pts), if/else 12 (54 pts), loops 5 (18 pts) (nesting depth added 106). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
  • farmfe_plugin_mangle_exports::mangle_exports::find_imports_to_rename (cognitive 95) crates/plugin_mangle_exports/src/mangle_exports.rs:153 — farmfe_plugin_mangle_exports::mangle_exports::find_imports_to_rename has cognitive complexity 95 (threshold 15). Drivers by points: if/else 13 (59 pts), loops 4 (21 pts), match/switch 2 (13 pts), boolean chains 2 (nesting depth added 74). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • farmfe_plugin_mangle_exports::mangle_exports::find_idents_can_not_be_mangled (cognitive 50) crates/plugin_mangle_exports/src/mangle_exports.rs:482 — farmfe_plugin_mangle_exports::mangle_exports::find_idents_can_not_be_mangled has cognitive complexity 50 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 4 (13 pts), match/switch 2 (11 pts), boolean chains 1 (nesting depth added 35). 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.
  • farmfe_plugin_mangle_exports::mangle_exports::mangle_exports (cognitive 33) crates/plugin_mangle_exports/src/mangle_exports.rs:26 — farmfe_plugin_mangle_exports::mangle_exports::mangle_exports has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 5 (10 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.
  • farmfe_plugin_mangle_exports::utils::transform_export_all_to_export_named (cognitive 20) crates/plugin_mangle_exports/src/utils.rs:51 — farmfe_plugin_mangle_exports::utils::transform_export_all_to_export_named has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 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.
D3 · God Classes · ClassTooLong · ×5
  • ClassTooLong: VueJsxTransformVisitor rust-plugins/vue-jsx/src/lib.rs:39 — ClassTooLong — 1002 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 24 methods, 7 blocks, lines 39-1489. The bar is 400 significant lines; this is 602 over it, 2.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PluginDriver crates/core/src/plugin/plugin_driver.rs:27 — ClassTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 2 blocks, lines 27-929. The bar is 400 significant lines; this is 173 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VitePluginAdapter REDACTED:100 — ClassTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 169 over it, 1.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Resolver crates/plugin_resolve/src/resolver.rs:52 — ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 3 blocks, lines 52-864. The bar is 400 significant lines; this is 143 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FarmPluginCss crates/plugin_css/src/lib.rs:169 — ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 3 blocks, lines 169-736. The bar is 400 significant lines; this is 4 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×5
  • Duplicated block (8 lines × 2) crates/plugin_partial_bundling/src/analyze_module_graph.rs:44 — crates/plugin_partial_bundling/src/analyze_module_graph.rs:44-51 | crates/plugin_partial_bundling/src/analyze_module_graph.rs:67-74 — both copies are in the same file, so extract the 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) rust-plugins/vue-jsx/src/resolve_type.rs:372 — rust-plugins/vue-jsx/src/resolve_type.rs:372-379 | rust-plugins/vue-jsx/src/resolve_type.rs:411-418 — both copies are in the same file, so extract the 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) rust-plugins/vue-jsx/src/resolve_type.rs:432 — rust-plugins/vue-jsx/src/resolve_type.rs:432-439 | rust-plugins/vue-jsx/src/resolve_type.rs:454-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) rust-plugins/auto-import/src/parser/generate_dts.rs:95 — rust-plugins/auto-import/src/parser/generate_dts.rs:95-102 | rust-plugins/react-components/src/generate_dts.rs:98-105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) rust-plugins/auto-import/src/parser/scan_exports.rs:179 — rust-plugins/auto-import/src/parser/scan_exports.rs:179-186 | rust-plugins/auto-import/src/parser/scan_exports.rs:190-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×5
  • Duplicated block (7 lines × 2) crates/plugin_runtime/src/render_resource_pot/source_replacer.rs:130 — crates/plugin_runtime/src/render_resource_pot/source_replacer.rs:130-136 | crates/plugin_runtime/src/render_resource_pot/source_replacer.rs:267-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/core/src/module/meta_data/mod.rs:111 — crates/core/src/module/meta_data/mod.rs:111-117 | crates/core/src/resource/meta_data/mod.rs:72-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/plugin_html/src/deps_analyzer.rs:34 — crates/plugin_html/src/deps_analyzer.rs:34-40 | crates/plugin_script/src/deps_analyzer.rs:45-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) rust-ecosystem/tailwindcss/src/selector_parser.rs:242 — rust-ecosystem/tailwindcss/src/selector_parser.rs:242-248 | rust-ecosystem/tailwindcss/src/value_parser.rs:190-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) rust-plugins/vue-jsx/src/directive.rs:86 — rust-plugins/vue-jsx/src/directive.rs:86-92 | rust-plugins/vue-jsx/src/directive.rs:231-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC3 · Page structure · Page without a main landmark · ×4
  • Page without a main landmark .agents/skills/brainstorming/scripts/frame-template.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark .claude/skills/brainstorming/scripts/frame-template.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark crates/create-farm-rs/templates/lit/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark crates/create-farm-rs/templates/tauri/vanilla/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · farmfe_compiler · ×4
  • farmfe_compiler::update::diff_and_patch_module_graph::diff_module_deps (cyclomatic 34) crates/compiler/src/update/diff_and_patch_module_graph.rs:265 — farmfe_compiler::update::diff_and_patch_module_graph::diff_module_deps 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.
  • farmfe_compiler::generate::render_resource_pots::render_resource_pots_and_generate_resources (cyclomatic 30) crates/compiler/src/generate/render_resource_pots.rs:22 — farmfe_compiler::generate::render_resource_pots::render_resource_pots_and_generate_resources 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.
  • farmfe_compiler::update::handle_update_modules::handle_update_modules (cyclomatic 17) crates/compiler/src/update/handle_update_modules.rs:12 — farmfe_compiler::update::handle_update_modules::handle_update_modules 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.
  • farmfe_compiler::update::patch_module_group_graph::patch_removed_dynamic_import_and_dynamic_entry (cyclomatic 16) crates/compiler/src/update/patch_module_group_graph.rs:288 — farmfe_compiler::update::patch_module_group_graph::patch_removed_dynamic_import_and_dynamic_entry has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farmfe_plugin_mangle_exports · ×4
  • farmfe_plugin_mangle_exports::mangle_exports::update_exports_meta_and_module_decl (cyclomatic 27) crates/plugin_mangle_exports/src/mangle_exports.rs:251 — farmfe_plugin_mangle_exports::mangle_exports::update_exports_meta_and_module_decl 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.
  • farmfe_plugin_mangle_exports::mangle_exports::find_imports_to_rename (cyclomatic 22) crates/plugin_mangle_exports/src/mangle_exports.rs:153 — farmfe_plugin_mangle_exports::mangle_exports::find_imports_to_rename 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.
  • farmfe_plugin_mangle_exports::mangle_exports::mangle_exports (cyclomatic 17) crates/plugin_mangle_exports/src/mangle_exports.rs:26 — farmfe_plugin_mangle_exports::mangle_exports::mangle_exports has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • farmfe_plugin_mangle_exports::mangle_exports::find_idents_can_not_be_mangled (cyclomatic 16) crates/plugin_mangle_exports/src/mangle_exports.rs:482 — farmfe_plugin_mangle_exports::mangle_exports::find_idents_can_not_be_mangled has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · ImportGlobVisitor · ×4
  • ImportGlobVisitor::glob_and_filter_sources (cognitive 43) crates/swc_transformer_import_glob/src/lib.rs:463 — ImportGlobVisitor::glob_and_filter_sources has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (33 pts), match/switch 2 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ImportGlobVisitor::try_alias (cognitive 27) crates/swc_transformer_import_glob/src/lib.rs:315 — ImportGlobVisitor::try_alias has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ImportGlobVisitor::visit_mut_expr (cognitive 24) crates/swc_transformer_import_glob/src/lib.rs:677 — ImportGlobVisitor::visit_mut_expr has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ImportGlobVisitor::find_rel_source (cognitive 20) crates/swc_transformer_import_glob/src/lib.rs:399 — ImportGlobVisitor::find_rel_source has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farmfe_ecosystem_tailwindcss_node · ×4
  • farmfe_ecosystem_tailwindcss_node::resolve::resolve_with_extensions (cognitive 40) rust-ecosystem/tailwindcss-node/src/resolve.rs:105 — farmfe_ecosystem_tailwindcss_node::resolve::resolve_with_extensions has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss_node::urls::rewrite_image_set_inner (cognitive 20) rust-ecosystem/tailwindcss-node/src/urls.rs:184 — farmfe_ecosystem_tailwindcss_node::urls::rewrite_image_set_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 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.
  • farmfe_ecosystem_tailwindcss_node::compile::resolve_imports (cognitive 20) rust-ecosystem/tailwindcss-node/src/compile.rs:241 — farmfe_ecosystem_tailwindcss_node::compile::resolve_imports has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_ecosystem_tailwindcss_node::normalize_path::normalize_path_base (cognitive 20) rust-ecosystem/tailwindcss-node/src/normalize_path.rs:26 — farmfe_ecosystem_tailwindcss_node::normalize_path::normalize_path_base has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (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.
R10 · Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) · ×4
  • Duplicated block with local edits (17 matched lines × 2 locations) crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 — crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 · crates/create-farm-rs/templates/electron/solid/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 52 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 (17 matched lines × 2 locations) crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 — crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 · crates/create-farm-rs/templates/electron/svelte/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 51 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 (17 matched lines × 2 locations) crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 — crates/create-farm-rs/templates/electron/preact/farm.config.ts:3 · crates/create-farm-rs/templates/electron/vue/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 51 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 (17 matched lines × 2 locations) packages/core/src/plugin/index.ts:209 — packages/core/src/plugin/index.ts:209 · packages/core/src/plugin/index.ts:247 — the two spans are one implementation copied and then locally edited — 73 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.
D17 · Explicit Debt · XxxComment · ×3
  • XxxComment crates/toolkit/src/script/concatenate_modules/unique_idents.rs:356 — // // xxx — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment js-plugins/sass/src/index.ts:293 — // /xxx — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment js-plugins/sass/src/index.ts:294 — // ./xxx — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · farmfe_plugin_script_meta · ×3
  • farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_module_exports_dfs (cognitive 109) crates/plugin_script_meta/src/plugin_exports/expand_exports.rs:162 — farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_module_exports_dfs has cognitive complexity 109 (threshold 15). Drivers by points: if/else 23 (72 pts), loops 10 (21 pts), match/switch 3 (13 pts), boolean chains 3 (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.
  • farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_unresolved_import_dfs (cognitive 45) crates/plugin_script_meta/src/plugin_exports/expand_exports.rs:476 — farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_unresolved_import_dfs has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 3 (10 pts), boolean chains 4 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • farmfe_plugin_script_meta::plugin_exports::expand_exports::get_basic_module_export_ident (cognitive 34) crates/plugin_script_meta/src/plugin_exports/expand_exports.rs:97 — farmfe_plugin_script_meta::plugin_exports::expand_exports::get_basic_module_export_ident has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (10 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farmfe_plugin_auto_import · ×3
  • farmfe_plugin_auto_import::parser::scan_exports::scan_exports (cognitive 47) rust-plugins/auto-import/src/parser/scan_exports.rs:79 — farmfe_plugin_auto_import::parser::scan_exports::scan_exports has cognitive complexity 47 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 5 (19 pts), match/switch 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_plugin_auto_import::presets::parse_presets (cognitive 24) rust-plugins/auto-import/src/presets/mod.rs:48 — farmfe_plugin_auto_import::presets::parse_presets has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (14 pts), match/switch 3 (10 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • farmfe_plugin_auto_import::parser::inject_imports::inject_imports (cognitive 22) rust-plugins/auto-import/src/parser/inject_imports.rs:54 — farmfe_plugin_auto_import::parser::inject_imports::inject_imports has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceReplacer · ×3
  • SourceReplacer::visit_mut_url (cognitive 46) crates/plugin_css/src/source_replacer.rs:44 — SourceReplacer::visit_mut_url has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (37 pts), loops 1 (4 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 33). 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.
  • SourceReplacer::replace_source_with_id (cognitive 28) crates/plugin_runtime/src/render_resource_pot/source_replacer.rs:124 — SourceReplacer::replace_source_with_id has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (28 pts) (nesting depth added 15). 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.
  • SourceReplacer::visit_mut_stylesheet (cognitive 25) crates/plugin_css/src/source_replacer.rs:104 — SourceReplacer::visit_mut_stylesheet has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 2 (9 pts), boolean chains 1, loops 1 (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.
D2 · Cognitive Complexity · farmfe_plugin_partial_bundling · ×3
  • farmfe_plugin_partial_bundling::merge_module_pots::handle_enforce_target_min_size (cognitive 41) crates/plugin_partial_bundling/src/merge_module_pots.rs:336 — farmfe_plugin_partial_bundling::merge_module_pots::handle_enforce_target_min_size has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 6 (18 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_plugin_partial_bundling::merge_module_pots::merge_resource_pots_by_buckets (cognitive 33) crates/plugin_partial_bundling/src/merge_module_pots.rs:233 — farmfe_plugin_partial_bundling::merge_module_pots::merge_resource_pots_by_buckets has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 3 (6 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.
  • farmfe_plugin_partial_bundling::analyze_module_graph::module_group_from_entry (cognitive 30) crates/plugin_partial_bundling/src/analyze_module_graph.rs:88 — farmfe_plugin_partial_bundling::analyze_module_graph::module_group_from_entry has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (8 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Resolver · ×3
  • Resolver::try_alias (cognitive 38) crates/plugin_resolve/src/resolver.rs:426 — Resolver::try_alias has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (32 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Resolver::_try_node_modules_internal (cognitive 25) crates/plugin_resolve/src/resolver.rs:536 — Resolver::_try_node_modules_internal has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Resolver::try_package_entry (cognitive 24) crates/plugin_resolve/src/resolver.rs:705 — Resolver::try_package_entry has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farmfe_plugin_vue_jsx · ×3
  • farmfe_plugin_vue_jsx::directive::parse_directive (cognitive 36) rust-plugins/vue-jsx/src/directive.rs:37 — farmfe_plugin_vue_jsx::directive::parse_directive has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 4 (9 pts) (nesting depth added 21). 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.
  • farmfe_plugin_vue_jsx::directive::parse_v_model_directive (cognitive 36) rust-plugins/vue-jsx/src/directive.rs:209 — farmfe_plugin_vue_jsx::directive::parse_v_model_directive has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 3 (6 pts), boolean chains 3 (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.
  • farmfe_plugin_vue_jsx::util::dedupe_props (cognitive 21) rust-plugins/vue-jsx/src/util.rs:133 — farmfe_plugin_vue_jsx::util::dedupe_props has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (10 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.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: Compiler crates/compiler/src/lib.rs:31 — TooManyMethods — 44 methods, declared across 6 files: build/mod.rs (15), update/mod.rs (10), write/mod.rs (9), src/lib.rs (5), +2 more file(s). The bar is 30 methods; this is 14 over it, 1.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ModuleGraph crates/core/src/module/module_graph.rs:181 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Compiler packages/core/src/compiler/index.ts:42 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: REDACTED ↔ share.ts packages/core/src/config/index.ts — `packages/core/src/config/index.ts` and `packages/core/src/utils/share.ts` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `3085d644` fix: check different node environment (#1947); `49523be7` fix: resolve env file read environment variables error (#1483); `f0f42b27` chore: logger use from param & type compile (#1337) — run `git show` on any of them.
  • Change coupling: index.d.ts ↔ schema.ts packages/core/binding/index.d.ts — `packages/core/binding/index.d.ts` and `packages/core/src/config/schema.ts` change together 50% of the time (15 of the 30 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `91f897b2` chore: optimize js logic (#1334); `492353f8` Fix/lazy compilation (#1253); `5b75ec27` feat: support isolate runtime resource (#1200) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ binding.ts packages/core/src/config/index.ts — `packages/core/src/config/index.ts` and `packages/core/src/types/binding.ts` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `7e71514f` feat: support add and remove event for HMR (#2226); `e63b163a` feat: v1.5.0 (#1987); `36512446` feat: add assets mode for asset path generate (#1852) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×3
  • Duplicated block (17 lines × 2) crates/compiler/src/build/mod.rs:681 — crates/compiler/src/build/mod.rs:681-697 | crates/compiler/src/update/mod.rs:739-755 — `crates/compiler/src/build/mod.rs` and `crates/compiler/src/update/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (17 lines × 2) crates/toolkit/src/css.rs:131 — crates/toolkit/src/css.rs:131-147 | crates/toolkit/src/script/merge_swc_globals.rs:72-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (17 lines × 2) rust-plugins/vue-jsx/src/resolve_type.rs:201 — rust-plugins/vue-jsx/src/resolve_type.rs:201-217 | rust-plugins/vue-jsx/src/resolve_type.rs:233-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) crates/compiler/src/build/finalize_module_graph.rs:63 — crates/compiler/src/build/finalize_module_graph.rs:63-77 | crates/compiler/src/update/finalize_module_graph.rs:54-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) crates/testing_helpers/src/lib.rs:78 — crates/testing_helpers/src/lib.rs:78-92 | crates/testing_helpers/src/lib.rs:207-221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) rust-plugins/compress/src/utils.rs:43 — rust-plugins/compress/src/utils.rs:43-57 | rust-plugins/compress/src/utils.rs:61-75 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) crates/core/src/module/module_graph.rs:391 — crates/core/src/module/module_graph.rs:391-403 | crates/core/src/module/module_graph.rs:425-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/plugin_script_meta/src/find_async_modules.rs:20 — crates/plugin_script_meta/src/find_async_modules.rs:20-32 | crates/plugin_script_meta/src/find_async_modules.rs:71-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/toolkit/src/runtime.rs:74 — crates/toolkit/src/runtime.rs:74-86 | crates/toolkit/src/runtime.rs:107-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (18 lines × 6 locations) · ×3
  • Duplicated block (18 lines × 6 locations) crates/create-farm-rs/templates/electron/preact/electron/preload.ts:4 — crates/create-farm-rs/templates/electron/preact/electron/preload.ts:4 · crates/create-farm-rs/templates/electron/react/electron/preload.ts:4 · crates/create-farm-rs/templates/electron/solid/electron/preload.ts:4 · crates/create-farm-rs/templates/electron/svelte/electron/preload.ts:4 · +2 more site(s) not listed — the 6 copies are spread across 6 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 (18 lines × 6 locations) crates/create-farm-rs/templates/electron/preact/forge.config.cjs:13 — crates/create-farm-rs/templates/electron/preact/forge.config.cjs:13 · crates/create-farm-rs/templates/electron/react/forge.config.cjs:13 · crates/create-farm-rs/templates/electron/solid/forge.config.cjs:13 · crates/create-farm-rs/templates/electron/svelte/forge.config.cjs:13 · +2 more site(s) not listed — the 6 copies are spread across 6 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. There is one copy in each of 6 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
  • Duplicated block (18 lines × 6 locations) packages/core/src/plugin/js/js-plugin-schema.ts:256 — packages/core/src/plugin/js/js-plugin-schema.ts:256 · packages/core/src/plugin/js/js-plugin-schema.ts:275 · packages/core/src/plugin/js/js-plugin-schema.ts:294 · packages/core/src/plugin/js/js-plugin-schema.ts:313 · +2 more site(s) not listed — all 6 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.
R10 · Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (18 matched lines × 2 locations) crates/create-farm-rs/templates/electron/solid/farm.config.ts:3 — crates/create-farm-rs/templates/electron/solid/farm.config.ts:3 · crates/create-farm-rs/templates/electron/svelte/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 51 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 (18 matched lines × 2 locations) crates/create-farm-rs/templates/electron/solid/farm.config.ts:3 — crates/create-farm-rs/templates/electron/solid/farm.config.ts:3 · crates/create-farm-rs/templates/electron/vue/farm.config.ts:3 — the two spans are one implementation copied and then locally edited — 51 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 (18 matched lines × 2 locations) packages/core/src/server/index.ts:322 — packages/core/src/server/index.ts:322 · packages/core/src/watcher/index.ts:266 — the two spans are one implementation copied and then locally edited — 84 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.
D1 · Cyclomatic Complexity · farmfe_plugin_script_meta · ×2
  • farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_module_exports_dfs (cyclomatic 40) crates/plugin_script_meta/src/plugin_exports/expand_exports.rs:162 — farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_module_exports_dfs 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.
  • farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_unresolved_import_dfs (cyclomatic 20) crates/plugin_script_meta/src/plugin_exports/expand_exports.rs:476 — farmfe_plugin_script_meta::plugin_exports::expand_exports::expand_unresolved_import_dfs has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farmfe_plugin_tree_shake · ×2
  • farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_write_imported_idents_statements (cyclomatic 35) crates/plugin_tree_shake/src/tree_shake_modules.rs:309 — farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_write_imported_idents_statements 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.
  • farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_used_statements (cyclomatic 17) crates/plugin_tree_shake/src/tree_shake_modules.rs:206 — farmfe_plugin_tree_shake::tree_shake_modules::trace_and_mark_used_statements has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farmfe_svgr_rs · ×2
  • farmfe_svgr_rs::transform_svg_component::variables::get_variables (cyclomatic 28) rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:42 — farmfe_svgr_rs::transform_svg_component::variables::get_variables 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.
  • farmfe_svgr_rs::hast_to_swc_ast::decode_xml::decode_xml (cyclomatic 19) rust-ecosystem/svgr-rs/src/hast_to_swc_ast/decode_xml.rs:1 — farmfe_svgr_rs::hast_to_swc_ast::decode_xml::decode_xml has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Resolver · ×2
  • Resolver::try_alias (cyclomatic 16) crates/plugin_resolve/src/resolver.rs:426 — Resolver::try_alias 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.
  • Resolver::try_package_entry (cyclomatic 16) crates/plugin_resolve/src/resolver.rs:705 — Resolver::try_package_entry has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · Parser · ×2
  • Parser::parse (cognitive 121) rust-ecosystem/tailwindcss/src/parser.rs:116 — Parser::parse has cognitive complexity 121 (threshold 15). Drivers by points: if/else 35 (98 pts), boolean chains 18, match/switch 4, loops 1 (nesting depth added 63). 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.
  • Parser::consume_if (cognitive 21) crates/create-farm-rs/src/utils/lte.rs:301 — Parser::consume_if has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (5 pts), match/switch 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.
D2 · Cognitive Complexity · farmfe_swc_transformer_import_glob · ×2
  • farmfe_swc_transformer_import_glob::get_object_literal (cognitive 68) crates/swc_transformer_import_glob/src/lib.rs:821 — farmfe_swc_transformer_import_glob::get_object_literal has cognitive complexity 68 (threshold 15). Drivers by points: if/else 10 (35 pts), match/switch 7 (26 pts), loops 2 (7 pts) (nesting depth added 49). 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.
  • farmfe_swc_transformer_import_glob::transform_import_meta_glob (cognitive 29) crates/swc_transformer_import_glob/src/lib.rs:50 — farmfe_swc_transformer_import_glob::transform_import_meta_glob has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 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.
D2 · Cognitive Complexity · TracedUsedImportStatement · ×2
  • TracedUsedImportStatement::from_import_info_and_used_idents (cognitive 57) crates/plugin_tree_shake/src/statement_graph/traced_used_import.rs:60 — TracedUsedImportStatement::from_import_info_and_used_idents has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (40 pts), match/switch 3 (10 pts), loops 2 (7 pts) (nesting depth added 39). 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.
  • TracedUsedImportStatement::from_export_info_and_used_idents (cognitive 36) crates/plugin_tree_shake/src/statement_graph/traced_used_import.rs:136 — TracedUsedImportStatement::from_export_info_and_used_idents has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 2 (7 pts), match/switch 1 (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.
D2 · Cognitive Complexity · farmfe_svgr_rs · ×2
  • farmfe_svgr_rs::transform_svg_component::variables::get_variables (cognitive 56) rust-ecosystem/svgr-rs/src/transform_svg_component/variables.rs:42 — farmfe_svgr_rs::transform_svg_component::variables::get_variables has cognitive complexity 56 (threshold 15). Drivers by points: if/else 27 (48 pts), loops 1 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_svgr_rs::hast_to_swc_ast::decode_xml::decode_xml (cognitive 34) rust-ecosystem/svgr-rs/src/hast_to_swc_ast/decode_xml.rs:1 — farmfe_svgr_rs::hast_to_swc_ast::decode_xml::decode_xml has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 2 (6 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StatementGraph · ×2
  • StatementGraph::traverse_dependents_dfs (cognitive 38) crates/plugin_tree_shake/src/statement_graph.rs:542 — StatementGraph::traverse_dependents_dfs has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • StatementGraph::trace_and_mark_used_statements (cognitive 32) crates/plugin_tree_shake/src/statement_graph.rs:396 — StatementGraph::trace_and_mark_used_statements has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · farmfe_plugin_runtime · ×2
  • farmfe_plugin_runtime::render_resource_pot::transform_async_module::transform_async_module (cognitive 34) crates/plugin_runtime/src/render_resource_pot/transform_async_module.rs:32 — farmfe_plugin_runtime::render_resource_pot::transform_async_module::transform_async_module has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (25 pts), loops 3 (6 pts), match/switch 1 (3 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • farmfe_plugin_runtime::render_resource_pot::scope_hoisting::build_scope_hoisted_module_groups (cognitive 31) crates/plugin_runtime/src/render_resource_pot/scope_hoisting.rs:78 — farmfe_plugin_runtime::render_resource_pot::scope_hoisting::build_scope_hoisted_module_groups has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (12 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farmfe_plugin_html · ×2
  • farmfe_plugin_html::deps_analyzer::get_script_src_or_code (cognitive 20) crates/plugin_html/src/deps_analyzer.rs:109 — farmfe_plugin_html::deps_analyzer::get_script_src_or_code has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (20 pts) (nesting depth added 11). 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: one other method here (farmfe_plugin_html::deps_analyzer::get_href_link_or_code) 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.
  • farmfe_plugin_html::deps_analyzer::get_href_link_or_code (cognitive 20) crates/plugin_html/src/deps_analyzer.rs:168 — farmfe_plugin_html::deps_analyzer::get_href_link_or_code has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (20 pts) (nesting depth added 11). 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: one other method here (farmfe_plugin_html::deps_analyzer::get_script_src_or_code) 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.
D2 · Cognitive Complexity · farmfe_plugin_library · ×2
  • farmfe_plugin_library::replace_internal_import_sources_with_placeholders (cognitive 18) crates/plugin_library/src/lib.rs:437 — farmfe_plugin_library::replace_internal_import_sources_with_placeholders has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • farmfe_plugin_library::utils::strip_runtime_module_helper_import (cognitive 16) crates/plugin_library/src/utils.rs:107 — farmfe_plugin_library::utils::strip_runtime_module_helper_import has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyFunctions · ×2
  • TooManyFunctions: create_farm::utils::colors crates/create-farm-rs/src/utils/colors.rs:16 — TooManyFunctions — 37 free functions. The bar is 30 free functions; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: farmfe_ecosystem_tailwindcss::utils::infer_data_type rust-ecosystem/tailwindcss/src/utils/infer_data_type.rs:35 — TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) rust-ecosystem/tailwindcss-node/src/resolve.rs:122 — rust-ecosystem/tailwindcss-node/src/resolve.rs:122-144 | rust-ecosystem/tailwindcss-node/src/resolve.rs:156-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) rust-plugins/auto-import/src/parser/generate_dts.rs:71 — rust-plugins/auto-import/src/parser/generate_dts.rs:71-93 | rust-plugins/react-components/src/generate_dts.rs:74-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) rust-plugins/auto-import/src/lib.rs:57 — rust-plugins/auto-import/src/lib.rs:57-77 | rust-plugins/react-components/src/lib.rs:73-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (21 lines × 2) rust-plugins/icons/src/loader/svg_builder.rs:82 — rust-plugins/icons/src/loader/svg_builder.rs:82-102 | rust-plugins/svgr/src/svg_builder.rs:95-115 — before extracting anything, compare `rust-plugins/icons/src/loader/svg_builder.rs` and `rust-plugins/svgr/src/svg_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) rust-plugins/auto-import/src/parser/parse.rs:407 — rust-plugins/auto-import/src/parser/parse.rs:407-424 | rust-plugins/auto-import/src/parser/parse.rs:477-494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) rust-plugins/vue-jsx/src/resolve_type.rs:758 — rust-plugins/vue-jsx/src/resolve_type.rs:758-775 | rust-plugins/vue-jsx/src/resolve_type.rs:908-925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) rust-ecosystem/tailwindcss/src/design_system.rs:183 — rust-ecosystem/tailwindcss/src/design_system.rs:183-198 | rust-ecosystem/tailwindcss/src/design_system.rs:227-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) rust-plugins/vue-jsx/src/directive.rs:158 — rust-plugins/vue-jsx/src/directive.rs:158-173 | rust-plugins/vue-jsx/src/directive.rs:184-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) crates/plugin_runtime/src/render_resource_pot/source_replacer.rs:187 — crates/plugin_runtime/src/render_resource_pot/source_replacer.rs:187-194 | crates/plugin_runtime/src/render_resource_pot/source_replacer.rs:268-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) rust-ecosystem/tailwindcss/src/candidate.rs:381 — rust-ecosystem/tailwindcss/src/candidate.rs:381-389 | rust-ecosystem/tailwindcss/src/variants.rs:637-644 — 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.
R10 · Code Duplication · Duplicated block (28 lines × 2 locations) · ×2
  • Duplicated block (28 lines × 2 locations) crates/create-farm-rs/templates/electron/solid/src/App.tsx:6 — crates/create-farm-rs/templates/electron/solid/src/App.tsx:6 · crates/create-farm-rs/templates/solid/src/App.tsx:6 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (28 lines × 2 locations) packages/core/binding/resolve-binding.cjs:160 — packages/core/binding/resolve-binding.cjs:160 · packages/core/binding/resolve-binding.cjs:191 — 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.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — your Biome config enables no a11y rules and there's no axe/pa11y/Lighthouse in tests or CI. Start by turning on Biome's own a11y rule group to catch issues at author time. What was searched, so you can tell an absence from a miss: the 95 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · Parser · ×1
  • Parser::parse (cyclomatic 57) rust-ecosystem/tailwindcss/src/parser.rs:116 — Parser::parse 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.
D1 · Cyclomatic Complexity · index.farmPlugin (cyclomatic 38) · ×1
  • index.farmPlugin (cyclomatic 38) REDACTED:100 — index.farmPlugin has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · farm-to-vite-config.viteConfigToFarmConfig (cyclomatic 36) · ×1
  • farm-to-vite-config.viteConfigToFarmConfig (cyclomatic 36) packages/core/src/plugin/js/farm-to-vite-config.ts:321 — farm-to-vite-config.viteConfigToFarmConfig has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalize-persistent-cache.normalizePersistentCache (cyclomatic 35) · ×1
  • normalize-persistent-cache.normalizePersistentCache (cyclomatic 35) packages/core/src/config/normalize-config/normalize-persistent-cache.ts:21 — normalize-persistent-cache.normalizePersistentCache has cyclomatic complexity 35 (threshold 15). Of this number, 33 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.
D1 · Cyclomatic Complexity · ExportsVisitor · ×1
  • ExportsVisitor::visit_module_decl (cyclomatic 31) rust-plugins/auto-import/src/parser/parse.rs:169 — ExportsVisitor::visit_module_decl has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SideEffectsAnalyzer · ×1
  • SideEffectsAnalyzer::visit_expr (cyclomatic 30) crates/plugin_tree_shake/src/statement_graph/analyze_statement_side_effects.rs:302 — SideEffectsAnalyzer::visit_expr 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.
D1 · Cyclomatic Complexity · WsServer.createWebSocketServer (cyclomatic 27) · ×1
  • WsServer.createWebSocketServer (cyclomatic 27) packages/core/src/server/ws.ts:165 — WsServer.createWebSocketServer has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 245, 188, 285, …). 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.
D1 · Cyclomatic Complexity · build.buildExamples (cyclomatic 26) · ×1
  • build.buildExamples (cyclomatic 26) scripts/build.mjs:69 — build.buildExamples has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 94, 74, 133, …). 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.
D1 · Cyclomatic Complexity · proxy.proxyMiddleware (cyclomatic 25) · ×1
  • proxy.proxyMiddleware (cyclomatic 25) packages/core/src/server/middlewares/proxy.ts:22 — proxy.proxyMiddleware has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 96, 126, 44, …). 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.
D1 · Cyclomatic Complexity · index.farmPlugin (cyclomatic 24) · ×1
  • index.farmPlugin (cyclomatic 24) js-plugins/copy/src/index.ts:116 — index.farmPlugin has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 133, 217). 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.
D1 · Cyclomatic Complexity · create_farm · ×1
  • create_farm::run_cli (cyclomatic 23) crates/create-farm-rs/src/lib.rs:29 — create_farm::run_cli has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farmfe_swc_transformer_import_glob · ×1
  • farmfe_swc_transformer_import_glob::get_object_literal (cyclomatic 23) crates/swc_transformer_import_glob/src/lib.rs:821 — farmfe_swc_transformer_import_glob::get_object_literal has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.proxyContext (cyclomatic 23) · ×1
  • index.proxyContext (cyclomatic 23) packages/core/src/plugin/index.ts:163 — index.proxyContext has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 210, 248, 215, …). 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.
D1 · Cyclomatic Complexity · index.Tabs (cyclomatic 21) · ×1
  • index.Tabs (cyclomatic 21) website/src/theme/ManagerTabs/index.tsx:57 — index.Tabs has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 97, 114, 127, …). 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.
D1 · Cyclomatic Complexity · TreeShakeModule · ×1
  • TreeShakeModule::used_exports_idents_to_statement_idents (cyclomatic 20) crates/plugin_tree_shake/src/module.rs:335 — TreeShakeModule::used_exports_idents_to_statement_idents has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farmfe_plugin_icons · ×1
  • farmfe_plugin_icons::loader::icon_to_svg::icon_to_svg (cyclomatic 20) rust-plugins/icons/src/loader/icon_to_svg.rs:38 — farmfe_plugin_icons::loader::icon_to_svg::icon_to_svg has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HmrClient.applyHotUpdates (cyclomatic 20) · ×1
  • HmrClient.applyHotUpdates (cyclomatic 20) REDACTED:93 — HmrClient.applyHotUpdates 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.
D1 · Cyclomatic Complexity · module-system.farmRequire (cyclomatic 20) · ×1
  • module-system.farmRequire (cyclomatic 20) packages/runtime/src/module-system.ts:149 — module-system.farmRequire 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.
D1 · Cyclomatic Complexity · ImportMetaURLVisitor · ×1
  • ImportMetaURLVisitor::transform_url (cyclomatic 18) crates/plugin_script/src/transform_import_meta_url/mod.rs:95 — ImportMetaURLVisitor::transform_url has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farmfe_plugin_auto_import · ×1
  • farmfe_plugin_auto_import::parser::scan_exports::scan_exports (cyclomatic 18) rust-plugins/auto-import/src/parser/scan_exports.rs:79 — farmfe_plugin_auto_import::parser::scan_exports::scan_exports has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.convertPluginVite (cyclomatic 18) · ×1
  • index.convertPluginVite (cyclomatic 18) packages/core/src/plugin/js/index.ts:160 — index.convertPluginVite has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · module-helper.interopRequireWildcard (cyclomatic 18) · ×1
  • module-helper.interopRequireWildcard (cyclomatic 18) packages/runtime/src/modules/module-helper.ts:107 — module-helper.interopRequireWildcard has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.CodeBlockWrapper (cyclomatic 18) · ×1
  • index.CodeBlockWrapper (cyclomatic 18) REDACTED:11 — index.CodeBlockWrapper has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 4 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.
D1 · Cyclomatic Complexity · farmfe_plugin_resolve · ×1
  • farmfe_plugin_resolve::resolver::exports::walk (cyclomatic 17) crates/plugin_resolve/src/resolver/exports.rs:288 — farmfe_plugin_resolve::resolver::exports::walk has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farmfe_ecosystem_tailwindcss_node · ×1
  • farmfe_ecosystem_tailwindcss_node::resolve::resolve_with_extensions (cyclomatic 17) rust-ecosystem/tailwindcss-node/src/resolve.rs:105 — farmfe_ecosystem_tailwindcss_node::resolve::resolve_with_extensions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.getResolvedOptions (cyclomatic 17) · ×1
  • utils.getResolvedOptions (cyclomatic 17) js-plugins/dts/src/utils.ts:116 — utils.getResolvedOptions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.farmPostcssPlugin (cyclomatic 17) · ×1
  • index.farmPostcssPlugin (cyclomatic 17) js-plugins/postcss/src/index.ts:31 — index.farmPostcssPlugin has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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.
D1 · Cyclomatic Complexity · merge-config.mergeFarmCliConfig (cyclomatic 17) · ×1
  • merge-config.mergeFarmCliConfig (cyclomatic 17) packages/core/src/config/merge-config.ts:48 — merge-config.mergeFarmCliConfig has cyclomatic complexity 17 (threshold 15). Of this number, 15 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.
D1 · Cyclomatic Complexity · index.normalizeUserCompilationConfig (cyclomatic 17) · ×1
  • index.normalizeUserCompilationConfig (cyclomatic 17) packages/core/src/config/normalize-config/index.ts:43 — index.normalizeUserCompilationConfig has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalize-output.normalizeTargetEnv (cyclomatic 17) · ×1
  • normalize-output.normalizeTargetEnv (cyclomatic 17) packages/core/src/config/normalize-config/normalize-output.ts:141 — normalize-output.normalizeTargetEnv has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farm-to-vite-context.farmContextToViteContext (cyclomatic 17) · ×1
  • farm-to-vite-context.farmContextToViteContext (cyclomatic 17) packages/core/src/plugin/js/farm-to-vite-context.ts:10 — farm-to-vite-context.farmContextToViteContext has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 129, 49, 73, …). 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.
D1 · Cyclomatic Complexity · Lexer · ×1
  • Lexer::next (cyclomatic 16) crates/create-farm-rs/src/utils/lte.rs:116 — Lexer::next has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · farmfe_plugin_partial_bundling · ×1
  • farmfe_plugin_partial_bundling::merge_module_pots::handle_enforce_target_min_size (cyclomatic 16) crates/plugin_partial_bundling/src/merge_module_pots.rs:336 — farmfe_plugin_partial_bundling::merge_module_pots::handle_enforce_target_min_size has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TracedUsedImportStatement · ×1
  • TracedUsedImportStatement::from_import_info_and_used_idents (cyclomatic 16) crates/plugin_tree_shake/src/statement_graph/traced_used_import.rs:60 — TracedUsedImportStatement::from_import_info_and_used_idents has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImportGlobVisitor · ×1
  • ImportGlobVisitor::try_alias (cyclomatic 16) crates/swc_transformer_import_glob/src/lib.rs:315 — ImportGlobVisitor::try_alias has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RuntimeFeatureGuardRemover · ×1
  • RuntimeFeatureGuardRemover::handle_stmt (cyclomatic 16) crates/toolkit/src/runtime.rs:60 — RuntimeFeatureGuardRemover::handle_stmt has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.farmLessPlugin (cyclomatic 16) · ×1
  • index.farmLessPlugin (cyclomatic 16) js-plugins/less/src/index.ts:29 — index.farmLessPlugin has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Root.generate (cyclomatic 16) · ×1
  • Root.generate (cyclomatic 16) js-plugins/tailwindcss/src/index.ts:256 — Root.generate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D10 · Test Quality · No assertions · ×1
  • No assertions: Binding - should parse config to rust correctly packages/core/tests/binding.spec.ts:13 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · index.proxyContext (cognitive 80) · ×1
  • index.proxyContext (cognitive 80) packages/core/src/plugin/index.ts:163 — index.proxyContext has cognitive complexity 80 (threshold 15). Drivers by points: if/else 10 (54 pts), ternaries 3 (16 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 58). Of this number, 26 points are the body's own statements and 54 belong to 6 function literals 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.
D2 · Cognitive Complexity · farm-to-vite-config.viteConfigToFarmConfig (cognitive 74) · ×1
  • farm-to-vite-config.viteConfigToFarmConfig (cognitive 74) packages/core/src/plugin/js/farm-to-vite-config.ts:321 — farm-to-vite-config.viteConfigToFarmConfig has cognitive complexity 74 (threshold 15). Drivers by points: if/else 25 (50 pts), loops 3 (14 pts), ternaries 1 (6 pts), boolean chains 4 (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · normalize-persistent-cache.normalizePersistentCache (cognitive 59) · ×1
  • normalize-persistent-cache.normalizePersistentCache (cognitive 59) packages/core/src/config/normalize-config/normalize-persistent-cache.ts:21 — normalize-persistent-cache.normalizePersistentCache has cognitive complexity 59 (threshold 15). Drivers by points: if/else 22 (37 pts), loops 4 (10 pts), boolean chains 6, error handling 1 (4 pts), ternaries 1 (2 pts) (nesting depth added 25). Of this number, 58 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.
D2 · Cognitive Complexity · TreeShakeModule · ×1
  • TreeShakeModule::used_exports_idents_to_statement_idents (cognitive 55) crates/plugin_tree_shake/src/module.rs:335 — TreeShakeModule::used_exports_idents_to_statement_idents has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 3 (9 pts), match/switch 2 (6 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · proxy.proxyMiddleware (cognitive 52) · ×1
  • proxy.proxyMiddleware (cognitive 52) packages/core/src/server/middlewares/proxy.ts:22 — proxy.proxyMiddleware has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (47 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 28). Most of this is not in the body itself: 1 of the 52 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 96, 126, 44, …). 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.
D2 · Cognitive Complexity · HmrClient.applyHotUpdates (cognitive 49) · ×1
  • HmrClient.applyHotUpdates (cognitive 49) REDACTED:93 — HmrClient.applyHotUpdates has cognitive complexity 49 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 8 (17 pts), ternaries 2 (9 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 30). Of this number, 43 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · index.farmPlugin (cognitive 48) · ×1
  • index.farmPlugin (cognitive 48) js-plugins/copy/src/index.ts:116 — index.farmPlugin has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 3 (8 pts), boolean chains 5, ternaries 1 (5 pts) (nesting depth added 25). Most of this is not in the body itself: 0 of the 48 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 133, 217). 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.
D2 · Cognitive Complexity · ExportsVisitor · ×1
  • ExportsVisitor::visit_module_decl (cognitive 47) rust-plugins/auto-import/src/parser/parse.rs:169 — ExportsVisitor::visit_module_decl has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (29 pts), match/switch 7 (16 pts), loops 1 (2 pts) (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RuntimeFeatureGuardRemover · ×1
  • RuntimeFeatureGuardRemover::handle_stmt (cognitive 46) crates/toolkit/src/runtime.rs:60 — RuntimeFeatureGuardRemover::handle_stmt has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (37 pts), match/switch 2 (7 pts), boolean chains 2 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · build.buildExamples (cognitive 44) · ×1
  • build.buildExamples (cognitive 44) scripts/build.mjs:69 — build.buildExamples has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (29 pts), ternaries 3 (6 pts), loops 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 19). Of this number, 23 points are the body's own statements and 21 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SideEffectsAnalyzer · ×1
  • SideEffectsAnalyzer::visit_expr (cognitive 43) crates/plugin_tree_shake/src/statement_graph/analyze_statement_side_effects.rs:302 — SideEffectsAnalyzer::visit_expr has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (28 pts), match/switch 3 (6 pts), boolean chains 5, loops 1 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.farmPlugin (cognitive 40) · ×1
  • index.farmPlugin (cognitive 40) REDACTED:100 — index.farmPlugin has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 15, ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · farmfe_plugin_resolve · ×1
  • farmfe_plugin_resolve::resolver::exports::walk (cognitive 38) crates/plugin_resolve/src/resolver/exports.rs:288 — farmfe_plugin_resolve::resolver::exports::walk has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (34 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ImportMetaURLVisitor · ×1
  • ImportMetaURLVisitor::transform_url (cognitive 38) crates/plugin_script/src/transform_import_meta_url/mod.rs:95 — ImportMetaURLVisitor::transform_url has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (8 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · create_farm · ×1
  • create_farm::run_cli (cognitive 37) crates/create-farm-rs/src/lib.rs:29 — create_farm::run_cli has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 4 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). Of this number, 27 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.
D2 · Cognitive Complexity · normalize-output.normalizeTargetEnv (cognitive 37) · ×1
  • normalize-output.normalizeTargetEnv (cognitive 37) packages/core/src/config/normalize-config/normalize-output.ts:141 — normalize-output.normalizeTargetEnv has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · module-system.farmRequire (cognitive 35) · ×1
  • module-system.farmRequire (cognitive 35) packages/runtime/src/module-system.ts:149 — module-system.farmRequire has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (30 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeaturesAnalyzer · ×1
  • FeaturesAnalyzer::analyze (cognitive 31) crates/plugin_script_meta/src/plugin_features/features_analyzer.rs:21 — FeaturesAnalyzer::analyze has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (7 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.
D2 · Cognitive Complexity · index.farmPostcssPlugin (cognitive 31) · ×1
  • index.farmPostcssPlugin (cognitive 31) js-plugins/postcss/src/index.ts:31 — index.farmPostcssPlugin has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (6 pts), ternaries 1 (5 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 15). Of this number, 21 points are the body's own statements and 10 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.
D2 · Cognitive Complexity · HmrAcceptedVisitor · ×1
  • HmrAcceptedVisitor::visit_mut_expr (cognitive 30) crates/plugin_runtime/src/import_meta_visitor.rs:71 — HmrAcceptedVisitor::visit_mut_expr has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 1 (5 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.checkCompilationInputValue (cognitive 29) · ×1
  • index.checkCompilationInputValue (cognitive 29) packages/core/src/config/normalize-config/index.ts:180 — index.checkCompilationInputValue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 2 (7 pts), loops 1 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarmPluginScriptMetaExports · ×1
  • FarmPluginScriptMetaExports::is_import_ident_changed (cognitive 28) crates/plugin_script_meta/src/plugin_exports.rs:78 — FarmPluginScriptMetaExports::is_import_ident_changed has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WsServer.createWebSocketServer (cognitive 28) · ×1
  • WsServer.createWebSocketServer (cognitive 28) packages/core/src/server/ws.ts:165 — WsServer.createWebSocketServer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 10, error handling 1, ternaries 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 13 belong to 5 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FarmPluginCssResolve · ×1
  • FarmPluginCssResolve::resolve (cognitive 27) crates/plugin_css/src/lib.rs:83 — FarmPluginCssResolve::resolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (24 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.
D2 · Cognitive Complexity · InsertImportModifier · ×1
  • InsertImportModifier::visit_mut_module_items (cognitive 27) rust-plugins/react-components/src/insert_import.rs:104 — InsertImportModifier::visit_mut_module_items has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 5 (12 pts), loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer · ×1
  • Lexer::next (cognitive 25) crates/create-farm-rs/src/utils/lte.rs:116 — Lexer::next has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (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.
D2 · Cognitive Complexity · FarmPluginDefine · ×1
  • FarmPluginDefine::transform (cognitive 25) crates/plugin_define/src/lib.rs:68 — FarmPluginDefine::transform has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarmPluginScript · ×1
  • FarmPluginScript::process_resource_pots (cognitive 25) crates/plugin_script/src/lib.rs:308 — FarmPluginScript::process_resource_pots has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 3 (8 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · farmfe_plugin_script · ×1
  • farmfe_plugin_script::transform_import_meta_url::normalized_glob_pattern (cognitive 25) crates/plugin_script/src/transform_import_meta_url/mod.rs:16 — farmfe_plugin_script::transform_import_meta_url::normalized_glob_pattern has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · index.Tabs (cognitive 25) · ×1
  • index.Tabs (cognitive 25) website/src/theme/ManagerTabs/index.tsx:57 — index.Tabs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (6 pts), boolean chains 4 (nesting depth added 5). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 97, 114, 127, …). 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.
D2 · Cognitive Complexity · ResourcesInjector · ×1
  • ResourcesInjector::visit_mut_element (cognitive 24) crates/plugin_html/src/resources_injector.rs:212 — ResourcesInjector::visit_mut_element has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarmPluginStaticAssets · ×1
  • FarmPluginStaticAssets::transform (cognitive 24) crates/plugin_static_assets/src/lib.rs:169 — FarmPluginStaticAssets::transform has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 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.
D2 · Cognitive Complexity · RequireEsmReplacer · ×1
  • RequireEsmReplacer::visit_mut_expr (cognitive 24) crates/toolkit/src/script/transform_to_esm/transform_cjs.rs:316 — RequireEsmReplacer::visit_mut_expr has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · farmfe_plugin_icons · ×1
  • farmfe_plugin_icons::loader::icon_to_svg::icon_to_svg (cognitive 24) rust-plugins/icons/src/loader/icon_to_svg.rs:38 — farmfe_plugin_icons::loader::icon_to_svg::icon_to_svg has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 4 (7 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.normalizeUserCompilationConfig (cognitive 24) · ×1
  • index.normalizeUserCompilationConfig (cognitive 24) packages/core/src/config/normalize-config/index.ts:43 — index.normalizeUserCompilationConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · merge.merge (cognitive 24) · ×1
  • merge.merge (cognitive 24) packages/core/src/utils/merge.ts:63 — merge.merge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PersistentCacheConfig · ×1
  • PersistentCacheConfig::as_obj (cognitive 23) crates/core/src/config/persistent_cache.rs:67 — PersistentCacheConfig::as_obj has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 1 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Visitor · ×1
  • Visitor::visit_mut_jsx_opening_element (cognitive 23) rust-ecosystem/svgr-rs/src/add_jsx_attribute.rs:86 — Visitor::visit_mut_jsx_opening_element has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarmPluginCss · ×1
  • FarmPluginCss::transform (cognitive 22) crates/plugin_css/src/lib.rs:232 — FarmPluginCss::transform has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (7 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · module-helper.interopRequireWildcard (cognitive 22) · ×1
  • module-helper.interopRequireWildcard (cognitive 22) packages/runtime/src/modules/module-helper.ts:107 — module-helper.interopRequireWildcard has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Theme · ×1
  • Theme::resolve_key (cognitive 21) rust-ecosystem/tailwindcss/src/theme.rs:426 — Theme::resolve_key has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.convertPluginVite (cognitive 21) · ×1
  • index.convertPluginVite (cognitive 21) packages/core/src/plugin/js/index.ts:160 — index.convertPluginVite has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExportComponentsFinder · ×1
  • ExportComponentsFinder::visit_export_decl (cognitive 20) rust-plugins/react-components/src/find_local_components.rs:222 — ExportComponentsFinder::visit_export_decl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · farm-to-vite-context.farmContextToViteContext (cognitive 20) · ×1
  • farm-to-vite-context.farmContextToViteContext (cognitive 20) packages/core/src/plugin/js/farm-to-vite-context.ts:10 — farm-to-vite-context.farmContextToViteContext has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 2, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 49, 129, 73, …). 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.
D2 · Cognitive Complexity · dynamic-import.load (cognitive 20) · ×1
  • dynamic-import.load (cognitive 20) packages/runtime/src/modules/dynamic-import.ts:109 — dynamic-import.load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1 (nesting depth added 9). Of this number, 14 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · PluginDriver · ×1
  • PluginDriver::transform (cognitive 19) crates/core/src/plugin/plugin_driver.rs:309 — PluginDriver::transform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarmPluginResolve · ×1
  • FarmPluginResolve::resolve (cognitive 19) crates/plugin_resolve/src/lib.rs:44 — FarmPluginResolve::resolve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PackageJsonLoader · ×1
  • PackageJsonLoader::load (cognitive 19) crates/toolkit/src/resolve/package_json_loader.rs:68 — PackageJsonLoader::load has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farmfe_plugin_worker · ×1
  • farmfe_plugin_worker::resource_patch::patch_inline_worker_resources (cognitive 19) rust-plugins/worker/src/resource_patch.rs:13 — farmfe_plugin_worker::resource_patch::patch_inline_worker_resources has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarmPluginLazyCompilation · ×1
  • FarmPluginLazyCompilation::resolve (cognitive 18) crates/plugin_lazy_compilation/src/lib.rs:33 — FarmPluginLazyCompilation::resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModuleSystemAnalyzer · ×1
  • ModuleSystemAnalyzer::visit_member_expr (cognitive 18) crates/toolkit/src/script/module_system.rs:67 — ModuleSystemAnalyzer::visit_member_expr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarmPluginVue · ×1
  • FarmPluginVue::load (cognitive 18) rust-plugins/vue/src/lib.rs:427 — FarmPluginVue::load has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · utils.queryPublicPath (cognitive 18) · ×1
  • utils.queryPublicPath (cognitive 18) js-plugins/dts/src/utils.ts:284 — utils.queryPublicPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.transformAliasImport (cognitive 18) · ×1
  • utils.transformAliasImport (cognitive 18) js-plugins/dts/src/utils.ts:393 — utils.transformAliasImport has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 5 (8 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 401, 417). 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.
D2 · Cognitive Complexity · index.farmLessPlugin (cognitive 18) · ×1
  • index.farmLessPlugin (cognitive 18) js-plugins/less/src/index.ts:29 — index.farmLessPlugin has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · merge-config.mergeFarmCliConfig (cognitive 18) · ×1
  • merge-config.mergeFarmCliConfig (cognitive 18) packages/core/src/config/merge-config.ts:48 — merge-config.mergeFarmCliConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3 (nesting depth added 1). Of this number, 16 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.
D2 · Cognitive Complexity · HmrEngine.hmrUpdate (cognitive 18) · ×1
  • HmrEngine.hmrUpdate (cognitive 18) packages/core/src/server/hmr-engine.ts:129 — HmrEngine.hmrUpdate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 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.
D2 · Cognitive Complexity · ImmutableModulesMemoryStore · ×1
  • ImmutableModulesMemoryStore::write_cache (cognitive 17) crates/core/src/cache/module_cache/immutable_modules.rs:150 — ImmutableModulesMemoryStore::write_cache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PackageJsonInfo · ×1
  • PackageJsonInfo::analyze_parsed_side_effects (cognitive 17) crates/core/src/common/mod.rs:79 — PackageJsonInfo::analyze_parsed_side_effects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsedIdentsVisitor · ×1
  • UsedIdentsVisitor::visit_decl (cognitive 17) crates/plugin_tree_shake/src/statement_graph/analyze_deps_by_used_idents.rs:179 — UsedIdentsVisitor::visit_decl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farmfe_utils · ×1
  • farmfe_utils::relative (cognitive 17) crates/utils/src/lib.rs:102 — farmfe_utils::relative has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarmfePluginIcons · ×1
  • FarmfePluginIcons::load (cognitive 17) rust-plugins/icons/src/lib.rs:124 — FarmfePluginIcons::load has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.resolveDependency (cognitive 17) · ×1
  • index.resolveDependency (cognitive 17) js-plugins/sass/src/index.ts:189 — index.resolveDependency has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VitePluginAdapter.constructor (cognitive 17) · ×1
  • VitePluginAdapter.constructor (cognitive 17) REDACTED:129 — VitePluginAdapter.constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesignSystem · ×1
  • DesignSystem::register_theme_block (cognitive 16) rust-ecosystem/tailwindcss/src/design_system.rs:146 — DesignSystem::register_theme_block has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AstNode · ×1
  • AstNode::to_css (cognitive 16) rust-ecosystem/tailwindcss-node/src/compile.rs:108 — AstNode::to_css has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Instrumentation · ×1
  • Instrumentation::report (cognitive 16) rust-ecosystem/tailwindcss-node/src/instrumentation.rs:185 — Instrumentation::report has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpClient · ×1
  • HttpClient::fetch_data (cognitive 16) rust-plugins/icons/src/cache/mod.rs:73 — HttpClient::fetch_data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Root.generate (cognitive 16) · ×1
  • Root.generate (cognitive 16) js-plugins/tailwindcss/src/index.ts:256 — Root.generate has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5, loops 1 (2 pts), ternaries 2 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bump-create-farm-version.updatePackageJsonDependencies (cognitive 16) · ×1
  • bump-create-farm-version.updatePackageJsonDependencies (cognitive 16) scripts/bump-create-farm-version.mjs:18 — bump-create-farm-version.updatePackageJsonDependencies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 46, 26, 34, …). 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.
D2 · Cognitive Complexity · main (cognitive 16) · ×1
  • main (cognitive 16) .agents/skills/writing-skills/render-graphs.js:84 — main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D22 · Internal API Consistency · Redundant/Conflicting Logic for Error-to-ModuleId Conversion · ×1
  • Redundant/Conflicting Logic for Error-to-ModuleId Conversion: `Compiler` has a setter that takes errors, but a utility function exists to extract module IDs from those same errors. It is unclear if the setter calls the utility or if they are independent. The setter name implies it sets a single ID (`last_fail_module_ids` is singular type `ModuleId` but takes a slice), which is semantically confusing. — Remove `Compiler.set_last_fail_module_ids`. Expose a clear `Compiler.get_last_failed_module_id()` or ensure the utility function is the single source of truth and the Compiler property is updated via a dedicated, clearly named method like `Compiler.record_failure(module_id: ModuleId)`. (signatures: Compiler.set_last_fail_module_ids(errors: &[CompilationError]) | utils.get_module_ids_from_compilation_errors(errors: &[CompilationError]): ModuleId)
D22 · Internal API Consistency · Inconsistent Borrowing API · ×1
  • Inconsistent Borrowing API: `ModuleCacheManager` exposes multiple methods for accessing cached data (`get_cache`, `get_cache_ref`, `get_cache_mut_ref`, `get_cache_mut_option_ref`) with unclear distinctions in ownership/lifetime guarantees compared to the underlying `ModuleMemoryStore`. `get_cache_mut_option_ref` is particularly confusingly named (returns `RefMut` but name suggests Option?). — Unify accessors. Use standard Rust patterns: `get` (value), `get_ref` (borrow), `get_mut` (mutable borrow). Remove `get_cache_mut_option_ref` or rename to `get_mut` if it returns an Option, but the signature `RefMut` contradicts the name. (signatures: ModuleCacheManager.get_cache(key: ModuleId): CachedModule | ModuleCacheManager.get_cache_ref(key: ModuleId): Ref | ModuleCacheManager.get_cache_mut_ref(key: ModuleId): RefMut | ModuleCacheManager.get_cache_mut_option_ref(key: ModuleId): RefMut)
D22 · Internal API Consistency · Inconsistent Cache Persistence API · ×1
  • Inconsistent Cache Persistence API: `CacheManager` has `write_cache()`, but specific managers (`ModuleCacheManager`, etc.) also have `write_cache()`. It is unclear if calling the manager's write triggers the global write or if they are independent. Additionally, `PluginCacheManager` has `write_cache_to_disk()` which is distinct from `write_cache()`, creating confusion about when data is persisted. — Standardize on a single persistence entry point, e.g., `CacheManager.flush()` or `CacheManager.persist()`. Remove `write_cache` from sub-managers or make them private/internal. Unify `write_cache` and `write_cache_to_disk` naming. (signatures: CacheManager.write_cache() | ModuleCacheManager.write_cache() | ResourceCacheManager.write_cache() | PluginCacheManager.write_cache() | ResourceMemoryStore.write_cache() | ImmutableModulesMemoryStore.new(...) | MutableModulesMemoryStore.new(...))
D22 · Internal API Consistency · Confusing Constructor Naming · ×1
  • Confusing Constructor Naming: `new_without_internal_plugins` is a verbose and awkward name for a constructor variant. It suggests a special case rather than a standard builder pattern or factory method. — Use a builder pattern or a static factory method like `Compiler::with_plugins(config, plugins)` and `Compiler::default(config)` to avoid the awkward 'without' naming convention. (signatures: Compiler.new(config: Config, plugin_adapters: ThreadPool): Result | Compiler.new_without_internal_plugins(config: Config, plugins: ThreadPool): Result)
D22 · Internal API Consistency · Inconsistent Method Naming for Similar Operations · ×1
  • Inconsistent Method Naming for Similar Operations: `get_cache_mut_option_ref` and `get_cache_mut_ref` both return `RefMut` but have different names, implying different behavior (likely one returns Option internally or handles missing keys differently), but the naming is not self-evident from the signature. — Rename to `get_mut` and `get_mut_or_default` or `get_mut_option` (if it returns Option<RefMut>). The current names are inconsistent with standard Rust conventions. (signatures: ModuleCacheManager.get_cache_mut_option_ref(key: ModuleId): RefMut | ModuleCacheManager.get_cache_mut_ref(key: ModuleId): RefMut)
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) rust-plugins/compress/src/utils.rs:41 — rust-plugins/compress/src/utils.rs:41-57 | rust-plugins/compress/src/utils.rs:59-75 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) crates/toolkit/src/script/module2cjs.rs:942 — crates/toolkit/src/script/module2cjs.rs:942-966 | crates/toolkit/src/script/module2cjs.rs:992-1015 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) rust-ecosystem/tailwindcss/src/utils/is_valid_arbitrary.rs:27 — rust-ecosystem/tailwindcss/src/utils/is_valid_arbitrary.rs:27-50 | rust-ecosystem/tailwindcss/src/utils/segment.rs:49-71 — 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.
D4 · Code Duplication · Duplicated block (16–21 lines × 2) · ×1
  • Duplicated block (16–21 lines × 2) crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:673 — crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:673-693 | crates/toolkit/src/script/concatenate_modules/handle_external_modules.rs:705-720 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) crates/plugin_tree_shake/src/tree_shake_modules.rs:468 — crates/plugin_tree_shake/src/tree_shake_modules.rs:468-487 | crates/plugin_tree_shake/src/tree_shake_modules.rs:557-575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) rust-plugins/vue-jsx/src/resolve_type.rs:479 — rust-plugins/vue-jsx/src/resolve_type.rs:479-497 | rust-plugins/vue-jsx/src/resolve_type.rs:511-529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) crates/plugin_partial_bundling/src/merge_module_pots.rs:280 — crates/plugin_partial_bundling/src/merge_module_pots.rs:280-297 | crates/plugin_partial_bundling/src/merge_module_pots.rs:302-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) rust-plugins/react-components/src/lib.rs:193 — rust-plugins/react-components/src/lib.rs:193-208 | rust-plugins/strip/src/lib.rs:131-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) crates/plugin_runtime/src/render_resource_pot/external.rs:83 — crates/plugin_runtime/src/render_resource_pot/external.rs:83-97 | crates/plugin_runtime/src/render_resource_pot/external.rs:129-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) crates/plugin_resolve/src/resolver/exports.rs:137 — crates/plugin_resolve/src/resolver/exports.rs:137-150 | crates/plugin_resolve/src/resolver/exports.rs:183-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) rust-plugins/auto-import/src/parser/parse.rs:402 — rust-plugins/auto-import/src/parser/parse.rs:402-413 | rust-plugins/auto-import/src/parser/parse.rs:437-448 | rust-plugins/auto-import/src/parser/parse.rs:472-483 — 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.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) crates/core/src/module/module_graph.rs:474 — crates/core/src/module/module_graph.rs:474-482 | crates/core/src/module/module_group.rs:117-128 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) rust-plugins/auto-import/src/parser/parse.rs:411 — rust-plugins/auto-import/src/parser/parse.rs:411-421 | rust-plugins/auto-import/src/parser/parse.rs:481-491 | rust-plugins/react-components/src/find_local_components.rs:321-331 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) crates/core/src/module/watch_graph.rs:128 — crates/core/src/module/watch_graph.rs:128-134 | crates/core/src/module/watch_graph.rs:149-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.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) crates/plugin_css/src/lib.rs:669 — crates/plugin_css/src/lib.rs:669-678 | crates/plugin_script/src/lib.rs:580-587 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) rust-plugins/vue-jsx/src/resolve_type.rs:1008 — rust-plugins/vue-jsx/src/resolve_type.rs:1008-1017 | rust-plugins/vue-jsx/src/resolve_type.rs:1048-1056 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) crates/core/src/module/module_graph.rs:520 — crates/core/src/module/module_graph.rs:520-526 | crates/core/src/module/module_graph.rs:569-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) crates/plugin_library/src/formats/esm.rs:47 — crates/plugin_library/src/formats/esm.rs:47-53 | crates/plugin_library/src/formats/umd.rs:40-47 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) rust-plugins/dsv/src/lib.rs:69 — rust-plugins/dsv/src/lib.rs:69-74 | rust-plugins/image/src/lib.rs:46-51 | rust-plugins/react-components/src/lib.rs:157-162 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) rust-plugins/icons/src/lib.rs:138 — rust-plugins/icons/src/lib.rs:138-142 | rust-plugins/icons/src/lib.rs:212-216 | rust-plugins/svgr/src/lib.rs:85-89 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) crates/core/src/module/module_graph.rs:287 — crates/core/src/module/module_graph.rs:287-294 | crates/core/src/module/module_graph.rs:391-398 | crates/core/src/module/module_graph.rs:425-432 | crates/core/src/module/module_graph.rs:446-453 — 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.
D5 · Coupling · Unstable project farmfe_compiler · ×1
  • Unstable project farmfe_compiler — farmfe_compiler has instability 0.92 with 2 dependents.
D5 · Coupling · Unstable project farmfe_plugin_file_size · ×1
  • Unstable project farmfe_plugin_file_size — farmfe_plugin_file_size has instability 0.83 with 1 dependents.
D5 · Coupling · Unstable project farmfe_plugin_script · ×1
  • Unstable project farmfe_plugin_script — farmfe_plugin_script has instability 0.86 with 1 dependents.
P1 · CI/CD gates · CI formatting step cannot fail · ×1
  • CI formatting step cannot fail REDACTED:14 — `cargo fmt` invokes cargo fmt 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience rust-plugins/icons/src/cache/mod.rs:92 — `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (9 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (9 clone groups) crates/create-farm-rs/templates/tauri/react/src/App.tsx:7 — 9 duplicated blocks under crates/create-farm-rs/templates/ have copies in at least two of the sibling directories electron, preact, react, solid, tauri, tauri2 (+1 more sibling(s) not listed) — 6 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (8 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (8 clone groups) crates/create-farm-rs/templates/electron/preact/electron/main.ts:5 — 8 of the duplicated blocks reported below have copies in at least two of the sibling directories preact, react, solid, svelte, vanilla, vue under crates/create-farm-rs/templates/electron/. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (5 clone groups) js-plugins/less/src/index.ts:39 — 5 duplicated blocks under js-plugins/ have copies in at least two of the sibling directories babel, dts, less, postcss, react-compiler, sass — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Wholesale file copy (64 identical lines × 4 files) · ×1
  • Wholesale file copy (64 identical lines × 4 files) rust-plugins/dts/scripts/index.js:1 — rust-plugins/dts/scripts/index.js:1 · rust-plugins/replace-dirname/scripts/index.js:1 · rust-plugins/svgr/scripts/index.js:1 · rust-plugins/vue-jsx/scripts/index.js:1 — these 4 files are line-for-line copies of one another — 64 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (53 lines × 21 locations) · ×1
  • Duplicated block (53 lines × 21 locations) packages/create-farm-plugin/templates/rust/scripts/index.js:69 — packages/create-farm-plugin/templates/rust/scripts/index.js:69 · rust-plugins/auto-import/scripts/index.js:69 · rust-plugins/compress/scripts/index.js:69 · rust-plugins/dsv/scripts/index.js:69 · +17 more site(s) not listed — the 21 copies are spread across 21 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 (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) crates/create-farm-rs/templates/tauri/preact/src/App.tsx:7 — crates/create-farm-rs/templates/tauri/preact/src/App.tsx:7 · crates/create-farm-rs/templates/tauri/react/src/App.tsx:7 — 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 (45 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (45 matched lines × 2 locations) js-plugins/less/src/index.ts:39 — js-plugins/less/src/index.ts:39 · js-plugins/sass/src/index.ts:56 — the two spans are one implementation copied and then locally edited — 254 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 (43 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (43 matched lines × 2 locations) packages/core/src/server/type.ts:9 — packages/core/src/server/type.ts:9 · packages/runtime-plugin-hmr/src/types.ts:55 — the two spans are one implementation copied and then locally edited — 163 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 (40 lines × 2 locations) · ×1
  • Duplicated block (40 lines × 2 locations) crates/create-farm-rs/templates/tauri/react/src/App.tsx:7 — crates/create-farm-rs/templates/tauri/react/src/App.tsx:7 · crates/create-farm-rs/templates/tauri2/react/src/App.tsx:6 — 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 (36 lines × 2 locations) · ×1
  • Duplicated block (36 lines × 2 locations) crates/create-farm-rs/templates/tauri/solid/src/App.tsx:7 — crates/create-farm-rs/templates/tauri/solid/src/App.tsx:7 · crates/create-farm-rs/templates/tauri2/solid/src/App.tsx:6 — 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 (35 lines × 3 locations) · ×1
  • Duplicated block (35 lines × 3 locations) js-plugins/copy/farm.config.ts:4 — js-plugins/copy/farm.config.ts:4 · js-plugins/vuetify/farm.config.ts:4 · packages/create-farm-plugin/templates/js/farm.config.ts:4 — the 3 copies are spread across 3 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.
R10 · Code Duplication · Duplicated block (35 lines × 21 locations) · ×1
  • Duplicated block (35 lines × 21 locations) packages/create-farm-plugin/templates/rust/scripts/index.js:6 — packages/create-farm-plugin/templates/rust/scripts/index.js:6 · rust-plugins/auto-import/scripts/index.js:6 · rust-plugins/compress/scripts/index.js:6 · rust-plugins/dsv/scripts/index.js:6 · +17 more site(s) not listed — the 21 copies are spread across 21 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. There is one copy in each of 21 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (34 lines × 3 locations) · ×1
  • Duplicated block (34 lines × 3 locations) packages/core/src/types/ws.ts:148 — packages/core/src/types/ws.ts:148 · packages/core/src/types/ws.ts:184 · packages/core/src/types/ws.ts:219 — 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.
R10 · Code Duplication · Duplicated block (33 lines × 6 locations) · ×1
  • Duplicated block (33 lines × 6 locations) crates/create-farm-rs/templates/electron/preact/electron/main.ts:5 — crates/create-farm-rs/templates/electron/preact/electron/main.ts:5 · crates/create-farm-rs/templates/electron/react/electron/main.ts:5 · crates/create-farm-rs/templates/electron/solid/electron/main.ts:5 · crates/create-farm-rs/templates/electron/svelte/electron/main.ts:5 · +2 more site(s) not listed — the 6 copies are spread across 6 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. There is one copy in each of 6 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (33 matched lines × 2 locations) packages/core/src/server/index.ts:727 — packages/core/src/server/index.ts:727 · packages/core/src/server/preview.ts:273 — the two spans are one implementation copied and then locally edited — 197 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 (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) scripts/build.mjs:282 — scripts/build.mjs:282 · scripts/build.mjs:332 — 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 (28 lines × 3 locations) · ×1
  • Duplicated block (28 lines × 3 locations) crates/create-farm-rs/templates/tauri2/preact/src/App.tsx:17 — crates/create-farm-rs/templates/tauri2/preact/src/App.tsx:17 · crates/create-farm-rs/templates/tauri2/react/src/App.tsx:17 · crates/create-farm-rs/templates/tauri2/solid/src/App.tsx:17 — the 3 copies are spread across 3 files, and the CITED SPAN is a DECLARATION HEADER — the name, parameter list with its constraints and defaults, and base-type clause of a declaration — rather than statements inside a body. A header cannot be lifted into a helper: there is no expression position for a call to stand in, and the copies are frequently required to match, because one declaration passes its parameters straight through to the other. So the move is not extraction. Give the repeated pieces names — factor a long constraint or base-type expression into one named type both declarations refer to — and where the headers must stay identical, derive one from the other (a shared base declaration, or a single alias that spells the parameter set once) so that changing it once changes both. Where the language offers neither, treat the two as a pair that must be edited together: they drift apart the first time only one of them is changed, which is why this is reported.
R10 · Code Duplication · Duplicated block (27 lines × 2 locations) · ×1
  • Duplicated block (27 lines × 2 locations) packages/create-farm-plugin/templates/js/playground/src/main.tsx:5 — packages/create-farm-plugin/templates/js/playground/src/main.tsx:5 · packages/create-farm-plugin/templates/rust/playground/src/main.tsx:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×1
  • Duplicated block (26 lines × 2 locations) crates/create-farm-rs/templates/electron/react/src/main.tsx:5 — crates/create-farm-rs/templates/electron/react/src/main.tsx:5 · crates/create-farm-rs/templates/react/src/main.tsx:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (25 lines × 2 locations) · ×1
  • Duplicated block (25 lines × 2 locations) crates/create-farm-rs/templates/electron/preact/src/app.tsx:6 — crates/create-farm-rs/templates/electron/preact/src/app.tsx:6 · crates/create-farm-rs/templates/preact/src/app.tsx:6 — 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 (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) js-plugins/visualizer/src/client/src/components/CodeDiff.vue:25 — js-plugins/visualizer/src/client/src/components/CodeDiff.vue:25 · js-plugins/visualizer/src/client/src/components/CodeViewer.vue:24 — 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 (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) REDACTED:521 — REDACTED:521 · REDACTED:580 — 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 (23 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (23 matched lines × 2 locations) packages/runtime-plugin-hmr/src/overlay.ts:703 — packages/runtime-plugin-hmr/src/overlay.ts:703 · packages/runtime-plugin-hmr/src/overlay.ts:742 — the two spans are one implementation copied and then locally edited — 145 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 (22 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (22 matched lines × 2 locations) packages/core/src/plugin/js/apply-html-transform.ts:68 — packages/core/src/plugin/js/apply-html-transform.ts:68 · packages/core/src/plugin/js/apply-html-transform.ts:104 — the two spans are one implementation copied and then locally edited — 132 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 (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) packages/core/src/server/error.ts:5 — packages/core/src/server/error.ts:5 · packages/runtime-plugin-hmr/src/utils.ts:32 — 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.
R10 · Code Duplication · Duplicated block (20 lines × 4 locations) · ×1
  • Duplicated block (20 lines × 4 locations) crates/create-farm-rs/templates/tauri2/preact/farm.config.ts:5 — crates/create-farm-rs/templates/tauri2/preact/farm.config.ts:5 · crates/create-farm-rs/templates/tauri2/solid/farm.config.ts:5 · crates/create-farm-rs/templates/tauri2/svelte/farm.config.ts:5 · crates/create-farm-rs/templates/tauri2/vue/farm.config.ts:5 — the 4 copies are spread across 4 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. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×1
  • Duplicated block (19 lines × 2 locations) packages/core/src/types/ws.ts:257 — packages/core/src/types/ws.ts:257 · packages/core/src/types/ws.ts:278 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×1
  • Duplicated block (16 lines × 2 locations) packages/core/src/plugin/js/index.ts:182 — packages/core/src/plugin/js/index.ts:182 · packages/core/src/plugin/js/index.ts:201 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function normalizePersistentCache (cyclomatic 39, cognitive 68) · ×1
  • Complex function normalizePersistentCache (cyclomatic 39, cognitive 68) packages/core/src/config/normalize-config/normalize-persistent-cache.ts:21 — normalizePersistentCache has cyclomatic complexity 39 and cognitive complexity 68; 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 viteConfigToFarmConfig (cyclomatic 37, cognitive 83) · ×1
  • Complex function viteConfigToFarmConfig (cyclomatic 37, cognitive 83) packages/core/src/plugin/js/farm-to-vite-config.ts:321 — viteConfigToFarmConfig has cyclomatic complexity 37 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.
R2 · Cyclomatic Complexity · Complex function executor (cyclomatic 23, cognitive 48) · ×1
  • Complex function executor (cyclomatic 23, cognitive 48) js-plugins/copy/src/index.ts:133 — executor has cyclomatic complexity 23 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.
R2 · Cyclomatic Complexity · Complex function normalizeTargetEnv (cyclomatic 21, cognitive 39) · ×1
  • Complex function normalizeTargetEnv (cyclomatic 21, cognitive 39) packages/core/src/config/normalize-config/normalize-output.ts:141 — normalizeTargetEnv has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function normalizeUserCompilationConfig (cyclomatic 21, cognitive 29) · ×1
  • Complex function normalizeUserCompilationConfig (cyclomatic 21, cognitive 29) packages/core/src/config/normalize-config/index.ts:43 — normalizeUserCompilationConfig has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function cleanupStaleE2EProcesses (cyclomatic 21, cognitive 22) · ×1
  • Complex function cleanupStaleE2EProcesses (cyclomatic 21, cognitive 22) e2e/process-cleanup.mjs:278 — cleanupStaleE2EProcesses has cyclomatic complexity 21 and cognitive complexity 22; 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 normalizeRuntimeConfig (cyclomatic 21, cognitive 16) · ×1
  • Complex function normalizeRuntimeConfig (cyclomatic 21, cognitive 16) packages/core/src/config/normalize-config/normalize-runtime.ts:20 — normalizeRuntimeConfig has cyclomatic complexity 21 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function applyHotUpdates (cyclomatic 19, cognitive 43) · ×1
  • Complex function applyHotUpdates (cyclomatic 19, cognitive 43) REDACTED:93 — applyHotUpdates has cyclomatic complexity 19 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.
R2 · Cyclomatic Complexity · Complex function farmRequire (cyclomatic 19, cognitive 35) · ×1
  • Complex function farmRequire (cyclomatic 19, cognitive 35) packages/runtime/src/module-system.ts:149 — farmRequire has cyclomatic complexity 19 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 config (cyclomatic 19, cognitive 17) · ×1
  • Complex function config (cyclomatic 19, cognitive 17) crates/create-farm-rs/templates/nestjs/index.plugin.ts:6 — config has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function interopRequireWildcard (cyclomatic 18, cognitive 22) · ×1
  • Complex function interopRequireWildcard (cyclomatic 18, cognitive 22) packages/runtime/src/modules/module-helper.ts:107 — interopRequireWildcard has cyclomatic complexity 18 and cognitive complexity 22; 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 convertPluginVite (cyclomatic 18, cognitive 21) · ×1
  • Complex function convertPluginVite (cyclomatic 18, cognitive 21) packages/core/src/plugin/js/index.ts:160 — convertPluginVite has cyclomatic complexity 18 and cognitive complexity 21; 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 #resolveOptions (cyclomatic 18, cognitive 15) · ×1
  • Complex function #resolveOptions (cyclomatic 18, cognitive 15) packages/core/src/server/preview.ts:159 — #resolveOptions has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getResolvedOptions (cyclomatic 17, cognitive 25) · ×1
  • Complex function getResolvedOptions (cyclomatic 17, cognitive 25) js-plugins/dts/src/utils.ts:116 — getResolvedOptions has cyclomatic complexity 17 and cognitive complexity 25; 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 mergeFarmCliConfig (cyclomatic 16, cognitive 17) · ×1
  • Complex function mergeFarmCliConfig (cyclomatic 16, cognitive 17) packages/core/src/config/merge-config.ts:48 — mergeFarmCliConfig has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function farmUserConfigToViteConfig (cyclomatic 16, cognitive 15) · ×1
  • Complex function farmUserConfigToViteConfig (cyclomatic 16, cognitive 15) packages/core/src/plugin/js/farm-to-vite-config.ts:14 — farmUserConfigToViteConfig has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function htmlFallbackMiddleware (cyclomatic 16, cognitive 15) · ×1
  • Complex function htmlFallbackMiddleware (cyclomatic 16, cognitive 15) packages/core/src/server/middlewares/htmlFallback.ts:9 — htmlFallbackMiddleware has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleResolveOptions (cyclomatic 16, cognitive 14) · ×1
  • Complex function handleResolveOptions (cyclomatic 16, cognitive 14) js-plugins/dts/src/context.ts:40 — handleResolveOptions has cyclomatic complexity 16 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function checkCompilationInputValue (cyclomatic 15, cognitive 32) · ×1
  • Complex function checkCompilationInputValue (cyclomatic 15, cognitive 32) packages/core/src/config/normalize-config/index.ts:180 — checkCompilationInputValue has cyclomatic complexity 15 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.
R2 · Cyclomatic Complexity · Complex function parseArgs (cyclomatic 15, cognitive 23) · ×1
  • Complex function parseArgs (cyclomatic 15, cognitive 23) scripts/test-e2e.mjs:37 — parseArgs has cyclomatic complexity 15 and cognitive complexity 23; 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.
R4 · Test Coverage · No test rig can mount a component in this workspace · ×1
  • No test rig can mount a component in this workspace vitest.config.ts — vitest.config.ts declares environment "node", and no package here declares a DOM implementation (jsdom / happy-dom), a component testing library or a browser runner — so none of the 57 unreached component module(s) can be tested as written, however the suite is authored: js-plugins/visualizer/src/client/src/pages/analysis/Compilation.vue, js-plugins/visualizer/src/client/src/pages/analysis/Plugin.vue, js-plugins/visualizer/src/client/src/pages/analysis/Bundle.vue, js-plugins/visualizer/src/client/src/components/NavBar.vue, js-plugins/visualizer/src/client/src/components/AnalyzeDepsRecord.vue, js-plugins/visualizer/src/client/src/components/ResourcePots.vue and 51 more. Add a DOM environment and a component testing library (for example jsdom + @testing-library, or the runner's browser mode), then test the components. Reported once because these files share one cause, not one omission each.
R7 · Dead Code · Dead file (~258 LoC) · ×1
  • Dead file (~258 LoC) packages/core/binding/resolve-binding.cjs — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~85 LoC) · ×1
  • Dead file (~85 LoC) packages/core/src/server/error.ts — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~75 LoC) · ×1
  • Dead file (~75 LoC) js-plugins/visualizer/src/client/src/components/AnalyzeDepsRecord.vue — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~60 LoC) · ×1
  • Dead file (~60 LoC) js-plugins/visualizer/src/client/src/components/ModuleList.vue — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (js-plugins/visualizer/src/client/src/pages/analysis/Module.vue) — 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
R7 · Dead Code · Dead file (~48 LoC) · ×1
  • Dead file (~48 LoC) js-plugins/visualizer/src/client/src/components/ProcessRecord.vue — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~32 LoC) · ×1
  • Dead file (~32 LoC) scripts/github-matrix.mjs — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~26 LoC) · ×1
  • Dead file (~26 LoC) js-plugins/visualizer/src/client/src/pages/analysis/Module.vue — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~20 LoC) · ×1
  • Dead file (~20 LoC) scripts/clear-cache.mjs — no import path from any entry point (191 application, 163 tooling, 230 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Benchmark script nothing runs (~223 LoC) · ×1
  • Benchmark script nothing runs (~223 LoC) website/src/components/Benchmark/index.tsx — This script imports the product ('../Card'), so it is an authored benchmark, not measurement input — but nothing invokes it: no package.json script, no CI workflow or build recipe, no Dockerfile, no other file under website/src/components/Benchmark/, and no in-repo reference to its name at all. It runs only if someone remembers to type `node website/src/components/Benchmark/index.tsx`, and it silently rots against the API it measures. Wire it into a script or workflow the way its wired siblings are, or delete it.
R8 · Dependency Hygiene · Unlisted import 'react-router' · ×1
  • Unlisted import 'react-router' rust-plugins/auto-import/playground-vue/src/types/auto_import.d.ts:4 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unlisted import 'preact' · ×1
  • Unlisted import 'preact' rust-plugins/icons/types/preact.d.ts:2 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unlisted import 'react' · ×1
  • Unlisted import 'react' rust-plugins/icons/types/react.d.ts:2 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unlisted import 'solid-js' · ×1
  • Unlisted import 'solid-js' rust-plugins/icons/types/solid.d.ts:2 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unlisted import 'svelte' · ×1
  • Unlisted import 'svelte' rust-plugins/icons/types/svelte3.d.ts:6 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unlisted import 'vue' · ×1
  • Unlisted import 'vue' rust-plugins/icons/types/vue3.d.ts:2 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unused dependency '@codspeed/vitest-plugin' · ×1
  • Unused dependency '@codspeed/vitest-plugin' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'node-emoji' · ×1
  • Unused dependency 'node-emoji' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'source-map-support' · ×1
  • Unused dependency 'source-map-support' — Declared in crates/create-farm-rs/templates/nestjs/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Minor — 58 finding(s)
D30 · Dependency Vulnerabilities · Low CVE · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X10 · Duplicated predicate · Duplicated predicate · ×7
  • Duplicated predicate .agents/skills/brainstorming/scripts/server.cjs:277 — `!filename || !filename.endsWith('.html')` appears character-identically in 2 files — .agents/skills/brainstorming/scripts/server.cjs, .claude/skills/brainstorming/scripts/server.cjs. 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 .agents/skills/brainstorming/scripts/helper.js:68 — `el.closest('.options') || el.closest('.cards')` appears character-identically in 2 files — .agents/skills/brainstorming/scripts/helper.js, .claude/skills/brainstorming/scripts/helper.js. 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/core/src/server/index.ts:581 — `isObject(middlewareMode) && 'server' in middlewareMode` appears character-identically in 2 files — packages/core/src/server/index.ts, packages/core/src/server/preview.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 .agents/skills/brainstorming/scripts/server.cjs:145 — `req.method === 'GET' && req.url.startsWith('/files/')` appears character-identically in 2 files — .agents/skills/brainstorming/scripts/server.cjs, .claude/skills/brainstorming/scripts/server.cjs. 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 .agents/skills/brainstorming/scripts/helper.js:56 — `selected[0].querySelector('h3, .content h3, .card-body h3')?.textContent?.trim() || selected[0].dataset.choice` appears character-identically in 2 files — .agents/skills/brainstorming/scripts/helper.js, .claude/skills/brainstorming/scripts/helper.js. 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 .agents/skills/brainstorming/scripts/helper.js:51 — `target.closest('.options') || target.closest('.cards')` appears character-identically in 2 files — .agents/skills/brainstorming/scripts/helper.js, .claude/skills/brainstorming/scripts/helper.js. 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 .agents/skills/brainstorming/scripts/server.cjs:109 — `trimmed.startsWith('<!doctype') || trimmed.startsWith('<html')` appears character-identically in 2 files — .agents/skills/brainstorming/scripts/server.cjs, .claude/skills/brainstorming/scripts/server.cjs. 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.
X9 · Subsumed condition operand · Subsumed condition operand · ×2
  • Subsumed condition operand rust-ecosystem/tailwindcss-node/src/urls.rs:204 — `trimmed.starts_with("url(")` can never decide this `||` — every value satisfying `trimmed.starts_with("url(")` also satisfies `trimmed.contains("url(")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand rust-ecosystem/tailwindcss-node/tests/support/generated/urls.rs:200 — `trimmed.starts_with("url(")` can never decide this `||` — every value satisfying `trimmed.starts_with("url(")` also satisfies `trimmed.contains("url(")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: crates/core/src/cache/store/disk.rs. Pair on, review, or document these before any departure.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 71 project(s) overshoot their size bounds, lowering Project Cohesion to 9.8/10. The most over is `crates/core` (9385 LoC, 178 public types across 16 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low vulnerability · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 20 of 343 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 343 of the 732 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: crates/create-farm-rs/src/template.rs, crates/create-farm-rs/src/utils/lte.rs, js-plugins/dts/src/utils.ts, crates/core/src/cache/scope.rs, crates/create-farm-rs/src/utils/colors.rs, crates/create-farm-rs/src/utils/theme.rs, js-plugins/dts/src/context.ts, crates/create-farm-rs/src/lib.rs (and 12 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 5/23 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/create-farm-rs`, `crates/create-farm-rs/templates/tauri/preact/src-tauri`, `crates/create-farm-rs/templates/tauri/react/src-tauri`, `crates/create-farm-rs/templates/tauri/solid/src-tauri`, `crates/create-farm-rs/templates/tauri/svelte/src-tauri` and 13 more.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
R7 · Dead Code · Unused export 'warn' · ×1
  • Unused export 'warn' js-plugins/dts/src/utils.ts:28 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'error' · ×1
  • Unused export 'error' js-plugins/dts/src/utils.ts:33 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'parsePath' · ×1
  • Unused export 'parsePath' js-plugins/dts/src/utils.ts:37 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getHash' · ×1
  • Unused export 'getHash' js-plugins/dts/src/utils.ts:62 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'callWithErrorHandle' · ×1
  • Unused export 'callWithErrorHandle' js-plugins/dts/src/utils.ts:71 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isNativeObj' · ×1
  • Unused export 'isNativeObj' js-plugins/dts/src/utils.ts:84 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getResolvedOptions' · ×1
  • Unused export 'getResolvedOptions' js-plugins/dts/src/utils.ts:116 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'handleInclude' · ×1
  • Unused export 'handleInclude' js-plugins/dts/src/utils.ts:157 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'handleExclude' · ×1
  • Unused export 'handleExclude' js-plugins/dts/src/utils.ts:167 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'tryRead' · ×1
  • Unused export 'tryRead' js-plugins/dts/src/utils.ts:272 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'cleanScssBugUrl' · ×1
  • Unused export 'cleanScssBugUrl' js-plugins/sass/src/options.ts:23 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'createModuleGraph' · ×1
  • Unused export 'createModuleGraph' packages/core/src/plugin/js/vite-server-adapter.ts:94 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ERR_SYMLINK_IN_RECURSIVE_READDIR' · ×1
  • Unused export 'ERR_SYMLINK_IN_RECURSIVE_READDIR' packages/core/src/server/publicDir.ts:4 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'initPublicFiles' · ×1
  • Unused export 'initPublicFiles' packages/core/src/server/publicDir.ts:9 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getPublicFiles' · ×1
  • Unused export 'getPublicFiles' packages/core/src/server/publicDir.ts:30 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'loopbackHosts' · ×1
  • Unused export 'loopbackHosts' packages/core/src/utils/http.ts:28 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'handleErrorSync' · ×1
  • Unused export 'handleErrorSync' packages/runtime-plugin-hmr/src/utils.ts:1 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'prepareError' · ×1
  • Unused export 'prepareError' packages/runtime-plugin-hmr/src/utils.ts:32 — Nothing imports this binding — it is safe to review for removal.
R8 · Dependency Hygiene · Type-only dependency 'connect' in production deps · ×1
  • Type-only dependency 'connect' in production deps js-plugins/visualizer/src/dev.ts:2 — Every import is type-only — move it to devDependencies.
X7 · Silent fallback defaults · Silent fallback default on Err · ×1
  • Silent fallback default on Err rust-plugins/url/src/lib.rs:38 — `get_file_size` turns every `Err` into `0` — 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.
Minor — 23 finding(s)
D12 · Dependency Hygiene · Outdated · ×23
  • Outdated: anyhow — `anyhow` is locked at 1.0.102 but 1.0.104 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/create-farm-rs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p anyhow` and commit the updated REDACTED.
  • Outdated: bitflags — `bitflags` is locked at 2.11.1 but 2.13.2 is the current stable release on crates.io, and it already satisfies the `"2.4"` requirement declared in rust-plugins/vue-jsx/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bitflags` and commit the updated REDACTED.
  • Outdated: clap — `clap` is locked at 4.6.1 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.5.8"` requirement declared in crates/create-farm-rs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
  • Outdated: flate2 — `flate2` is locked at 1.1.9 but 1.1.10 is the current stable release on crates.io, and it already satisfies the `"1.0.35"` requirement declared in crates/plugin_file_size/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
  • Outdated: glob — `glob` is locked at 0.3.3 but 0.3.4 is the current stable release on crates.io, and it already satisfies the `"0.3.1"` requirement declared in crates/macro_testing/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p glob` and commit the updated REDACTED.
  • Outdated: globset — `globset` is locked at 0.4.18 but 0.4.20 is the current stable release on crates.io, and it already satisfies the `"0.4.14"` requirement declared in crates/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p globset` and commit the updated REDACTED.
  • Outdated: indexmap — `indexmap` is locked at 2.14.0 but 2.14.2 is the current stable release on crates.io, and it already satisfies the `"2.1"` requirement declared in rust-plugins/vue-jsx/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p indexmap` and commit the updated REDACTED.
  • Outdated: insta — `insta` is locked at 1.47.2 but 1.48.0 is the current stable release on crates.io, and it already satisfies the `"1.39.0"` requirement declared in crates/testing_helpers/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p insta` and commit the updated REDACTED.
  • Outdated: napi — `napi` is locked at 3.9.0 but 3.13.0 is the current stable release on crates.io, and it already satisfies the `"3.1.3"` requirement declared in crates/node/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi` and commit the updated REDACTED.
  • Outdated: napi-build — `napi-build` is locked at 2.3.2 but 2.5.0 is the current stable release on crates.io, and it already satisfies the `"2.2.3"` requirement declared in crates/node/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi-build` and commit the updated REDACTED.
  • Outdated: napi-derive — `napi-derive` is locked at 3.5.6 but 3.6.9 is the current stable release on crates.io, and it already satisfies the `"3.1.1"` requirement declared in crates/node/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: proc-macro2 — `proc-macro2` is locked at 1.0.106 but 1.0.107 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/macro_cache_item/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p proc-macro2` and commit the updated REDACTED.
  • Outdated: quote — `quote` is locked at 1.0.45 but 1.0.47 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/macro_cache_item/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p quote` and commit the updated REDACTED.
  • Outdated: regex — `regex` is locked at 1.12.3 but 1.13.1 is the current stable release on crates.io, and it already satisfies the `"1.7.3"` requirement declared in crates/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p regex` and commit the updated REDACTED.
  • Outdated: rkyv — `rkyv` is locked at 0.8.16 but 0.8.18 is the current stable release on crates.io, and it already satisfies the `"0.8.10"` requirement declared in rust-plugins/wasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rkyv` and commit the updated REDACTED.
  • Outdated: rust-embed — `rust-embed` is locked at 8.11.0 but 8.12.0 is the current stable release on crates.io, and it already satisfies the `"8.3"` requirement declared in crates/create-farm-rs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rust-embed` and commit the updated REDACTED.
  • Outdated: rustc-hash — `rustc-hash` is locked at 2.1.2 but 2.1.3 is the current stable release on crates.io, and it already satisfies the `"2.0.0"` requirement declared in crates/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustc-hash` and commit the updated REDACTED.
  • Outdated: serde_derive — `serde_derive` is locked at 1.0.228 but 1.0.229 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in patches/serde/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_derive` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.150 but 1.0.151 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in crates/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: serde_regex — `serde_regex` is locked at 1.1.0 but 1.2.0 is the current stable release on crates.io, and it already satisfies the `"1.1.0"` requirement declared in crates/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_regex` and commit the updated REDACTED.
  • Outdated: thiserror — `thiserror` is locked at 2.0.18 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2.0.12"` requirement declared in crates/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.52.3 but 1.53.1 is the current stable release on crates.io, and it already satisfies the `"1.38.0"` requirement declared in rust-plugins/icons/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: wasm-bindgen — `wasm-bindgen` is locked at 0.2.122 but 0.2.129 is the current stable release on crates.io, and it already satisfies the `"0.2.84"` requirement declared in rust-plugins/wasm/rust-wasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen` and commit the updated REDACTED.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-03594db56b8c4ee3b6a26183e953aacb/history.json --exit-code 0 --source .5artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-03594db56b8c4ee3b6a26183e953aacb/tree.json --exit-code 0 --source .5artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .187artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update220artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 12 file(s) — `crates/create-farm-rs/templates/electron/preact/electron/electron-env.d.ts`, `crates/create-farm-rs/templates/electron/react/electron/electron-env.d.ts`, `crates/create-farm-rs/templates/electron/solid/electron/electron-env.d.ts`, `crates/create-farm-rs/templates/electron/svelte/electron/electron-env.d.ts`, `crates/create-farm-rs/templates/electron/vanilla/electron/electron-env.d.ts`, … (+7 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a0efc4-a2b3-73fc-ab7b-0f741c196316 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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