Public report of Frieve-A/effetune, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 05:05 UTC · Survey ID cd_56b2180fb7264e8780f091f35345141f
Frieve-A/effetune
Measured 17 November 2026, 05:00 UTC, at code version 7de52ec
First survey, so nothing to compare with yet
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A very large codebase: 668,484 lines of product code in 15 projects, tests not counted · Estimated rebuild effort: about 5.8 person-years · Weakest lens: Code Health, 24.7
Findings by how serious they are
60 critical4041 serious305 minor
6 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 05:00 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
64of 64 dimensions measured by tools.
4344of 4406 findings point to an exact file and line, so you can open each one in the code. The other 62 concern the repository as a whole, such as missing documentation.
64dimensions across 7 lenses, read from 668,484 lines of product code in 15 projects.
Frieve-A/effetune falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 38.8 out of 100 and is rated Weak, and one of its 60 critical findings is a security problem in its code.
Code Health, at 24.7, is the weakest lens and counts most in the score. The best first steps are adding type checking and splitting the oversized files, each worth about 5.5 points. Raising Code Health to 70 would lift the score to about 50.7.
One place in the code runs text as code, which an attacker could use. Fifteen controls can't be used without a mouse. Replacing text run as code with direct calls and making the controls work with a keyboard would close both risks. The 15 labels or groups of fields with no name need connecting to their fields or naming.
The product code is 668,484 lines, about €850,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 24.7 to 70, the lowest score rated Strong, the score would rise from 38.8 to about 50.7.
Code composition: what the lines of code are
Business logic 0%Supporting code 0%Tests 100%
Rebuild cost: about €850,000 · Estimate
Cost to rebuild
€280,000 to €1,400,000, for 4,681 to 14,849 hours of work, about 5.8 person-years for 3 to 11 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 39. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Very large: 668,484 lines of product code
Comment lines
The estimate prices 668,483 lines. Comment lines count towards the size of 668,484 lines but aren't priced as work.
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 5.5 points · Medium effort · Type Safety
2
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 5.5 points · Medium effort · Large Files
3
Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Files that change often carry extra risk · Combined risk
64 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (140 files) · Code Coverage (310 files under half tested) · The files: REDACTED, audio-context-manager.js and note_spectrogram.js
What to do: Add tests to these files and have a second person review every change to them, starting with REDACTED, audio-context-manager.js and note_spectrogram.js.
Where the investment is most exposed · Value at risk
This code would cost about €850,000 to build again, about 5.8 person-years of work. Its weakest lens is Code Health, at 24.7 (Critical). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 10% to 23% on every change. The history of the code shows how much it changes: about 722,527 lines over the last 90 days, which is about 2,930,248 lines a year. At that pace, the extra work comes to an estimated 739.9 to 4439.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
If you do one thing first · First action
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. Of all the actions in this report, it raises the score most for the work it takes: about 5.5 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
479 modules, with 128 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 439 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
dsp.bindings.python.src.effetune uses dsp.bindings.python.src.effetune._base, so a change to dsp.bindings.python.src.effetune._base can break dsp.bindings.python.src.effetune, while a change to dsp.bindings.python.src.effetune can't break dsp.bindings.python.src.effetune._base.
Position
Below the diagonal: dsp.bindings.python.src.effetune uses a module listed above it, which is the healthy direction.
dsp.bindings.python.src.effetune uses dsp.bindings.python.src.effetune.assets, so a change to dsp.bindings.python.src.effetune.assets can break dsp.bindings.python.src.effetune, while a change to dsp.bindings.python.src.effetune can't break dsp.bindings.python.src.effetune.assets.
Position
Below the diagonal: dsp.bindings.python.src.effetune uses a module listed above it, which is the healthy direction.
dsp.bindings.python.src.effetune uses dsp.bindings.python.src.effetune.errors, so a change to dsp.bindings.python.src.effetune.errors can break dsp.bindings.python.src.effetune, while a change to dsp.bindings.python.src.effetune can't break dsp.bindings.python.src.effetune.errors.
Position
Below the diagonal: dsp.bindings.python.src.effetune uses a module listed above it, which is the healthy direction.
dsp.bindings.python.src.effetune uses dsp.bindings.python.src.effetune.soundfont, so a change to dsp.bindings.python.src.effetune.soundfont can break dsp.bindings.python.src.effetune, while a change to dsp.bindings.python.src.effetune can't break dsp.bindings.python.src.effetune.soundfont.
Position
Below the diagonal: dsp.bindings.python.src.effetune uses a module listed above it, which is the healthy direction.
112 pairs of types, where a type in dsp.bindings.python.src.effetune._generated_effects uses a type in dsp.bindings.python.src.effetune._base. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dsp.bindings.python.src.effetune._generated_effects uses dsp.bindings.python.src.effetune._base, so a change to dsp.bindings.python.src.effetune._base can break dsp.bindings.python.src.effetune._generated_effects, while a change to dsp.bindings.python.src.effetune._generated_effects can't break dsp.bindings.python.src.effetune._base.
Position
Below the diagonal: dsp.bindings.python.src.effetune._generated_effects uses a module listed above it, which is the healthy direction.
dsp.bindings.python.src.effetune.graph uses dsp.bindings.python.src.effetune._base, so a change to dsp.bindings.python.src.effetune._base can break dsp.bindings.python.src.effetune.graph, while a change to dsp.bindings.python.src.effetune.graph can't break dsp.bindings.python.src.effetune._base.
Position
Below the diagonal: dsp.bindings.python.src.effetune.graph uses a module listed above it, which is the healthy direction.
dsp.bindings.python.src.effetune.graph uses dsp.bindings.python.src.effetune.chain, so a change to dsp.bindings.python.src.effetune.chain can break dsp.bindings.python.src.effetune.graph, while a change to dsp.bindings.python.src.effetune.graph can't break dsp.bindings.python.src.effetune.chain.
Position
Below the diagonal: dsp.bindings.python.src.effetune.graph uses a module listed above it, which is the healthy direction.
features.effetune_bench_html uses js.plugin-manager, so a change to js.plugin-manager can break features.effetune_bench_html, while a change to features.effetune_bench_html can't break js.plugin-manager.
Position
Below the diagonal: features.effetune_bench_html uses a module listed above it, which is the healthy direction.
js.android.audio-manager uses js.audio-manager, so a change to js.audio-manager can break js.android.audio-manager, while a change to js.android.audio-manager can't break js.audio-manager.
Position
Below the diagonal: js.android.audio-manager uses a module listed above it, which is the healthy direction.
js.android.player-context uses js.audio.audio-context-manager, so a change to js.audio.audio-context-manager can break js.android.player-context, while a change to js.android.player-context can't break js.audio.audio-context-manager.
Position
Below the diagonal: js.android.player-context uses a module listed above it, which is the healthy direction.
plugins.analyzer.analog_meter uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.analog_meter, while a change to plugins.analyzer.analog_meter can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.analog_meter uses a module listed above it, which is the healthy direction.
plugins.analyzer.chroma_spiral uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.chroma_spiral, while a change to plugins.analyzer.chroma_spiral can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.chroma_spiral uses a module listed above it, which is the healthy direction.
plugins.analyzer.level_meter uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.level_meter, while a change to plugins.analyzer.level_meter can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.level_meter uses a module listed above it, which is the healthy direction.
plugins.analyzer.note_spectrogram uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.note_spectrogram, while a change to plugins.analyzer.note_spectrogram can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.note_spectrogram uses a module listed above it, which is the healthy direction.
plugins.analyzer.oscilloscope uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.oscilloscope, while a change to plugins.analyzer.oscilloscope can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.oscilloscope uses a module listed above it, which is the healthy direction.
plugins.analyzer.pitch_meter uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.pitch_meter, while a change to plugins.analyzer.pitch_meter can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.pitch_meter uses a module listed above it, which is the healthy direction.
plugins.analyzer.rhythm_analyzer uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.rhythm_analyzer, while a change to plugins.analyzer.rhythm_analyzer can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.rhythm_analyzer uses a module listed above it, which is the healthy direction.
plugins.analyzer.spectrogram uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.spectrogram, while a change to plugins.analyzer.spectrogram can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.spectrogram uses a module listed above it, which is the healthy direction.
plugins.analyzer.spectrum_analyzer uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.spectrum_analyzer, while a change to plugins.analyzer.spectrum_analyzer can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.spectrum_analyzer uses a module listed above it, which is the healthy direction.
plugins.analyzer.stereo_meter uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.analyzer.stereo_meter, while a change to plugins.analyzer.stereo_meter can't break plugins.plugin-base.
Position
Below the diagonal: plugins.analyzer.stereo_meter uses a module listed above it, which is the healthy direction.
plugins.basics.bass_management uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.bass_management, while a change to plugins.basics.bass_management can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.bass_management uses a module listed above it, which is the healthy direction.
plugins.basics.channel_divider uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.channel_divider, while a change to plugins.basics.channel_divider can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.channel_divider uses a module listed above it, which is the healthy direction.
plugins.basics.dc_offset uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.dc_offset, while a change to plugins.basics.dc_offset can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.dc_offset uses a module listed above it, which is the healthy direction.
plugins.basics.fir_crossover uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.fir_crossover, while a change to plugins.basics.fir_crossover can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.fir_crossover uses a module listed above it, which is the healthy direction.
plugins.basics.matrix uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.matrix, while a change to plugins.basics.matrix can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.matrix uses a module listed above it, which is the healthy direction.
plugins.basics.multi_channel_panel uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.multi_channel_panel, while a change to plugins.basics.multi_channel_panel can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.multi_channel_panel uses a module listed above it, which is the healthy direction.
plugins.basics.mute uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.mute, while a change to plugins.basics.mute can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.mute uses a module listed above it, which is the healthy direction.
plugins.basics.polarity_inversion uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.polarity_inversion, while a change to plugins.basics.polarity_inversion can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.polarity_inversion uses a module listed above it, which is the healthy direction.
plugins.basics.stereo_balance uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.stereo_balance, while a change to plugins.basics.stereo_balance can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.stereo_balance uses a module listed above it, which is the healthy direction.
plugins.basics.volume uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.basics.volume, while a change to plugins.basics.volume can't break plugins.plugin-base.
Position
Below the diagonal: plugins.basics.volume uses a module listed above it, which is the healthy direction.
plugins.control.network_receive uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.control.network_receive, while a change to plugins.control.network_receive can't break plugins.plugin-base.
Position
Below the diagonal: plugins.control.network_receive uses a module listed above it, which is the healthy direction.
plugins.control.network_send uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.control.network_send, while a change to plugins.control.network_send can't break plugins.plugin-base.
Position
Below the diagonal: plugins.control.network_send uses a module listed above it, which is the healthy direction.
plugins.control.section uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.control.section, while a change to plugins.control.section can't break plugins.plugin-base.
Position
Below the diagonal: plugins.control.section uses a module listed above it, which is the healthy direction.
plugins.sfz-instrument uses plugins.plugin-base, so a change to plugins.plugin-base can break plugins.sfz-instrument, while a change to plugins.sfz-instrument can't break plugins.plugin-base.
Position
Below the diagonal: plugins.sfz-instrument uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 24.7 · Critical · gated by D1, D2, R1, R3, X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
73
High / Critical
A03:2025 — Software Supply Chain Failures
3
Medium
Roadmap
Top priorities: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.
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.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
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 — 60
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 — 4041
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 — 305
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 6
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 64 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 64 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 4344 of 4406 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D4 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 6 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .c (129,088 lines, 24% of production source), .cpp (65,843 lines, 12% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication. Duplication in .js is measured by R10 Code Duplication and is not part of this gap.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 7,534 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 32 test source file(s) (.py, .java) 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.
D12 Dependency Hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Currency was graded against Maven Central, but whether an artifact is DEPRECATED is not: Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether one is UNMAINTAINED is not graded either — no registry publishes a maintenance status, and release age does not stand in for one. Two of this dimension's four signals are therefore unread on a Gradle tree, and its score reflects currency alone.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (10 contributor(s) across 491 commit(s) sampled, automation and bot accounts excluded). One of them holds 91% of the history; the other 9 hold 1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D28 Secrets (history) — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D28's config-credential rule (WD-SECRET-0002) parses each committed `.json` config as a document and reads credential-named values; `_includes/docs_search_index.json`, `docs/search.json` did not parse (JSON5, a template, several concatenated documents), so a credential bound there is UNMEASURED by that rule. gitleaks still scanned the same files as text.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `js/audio/dsp-params.generated.js`, `js/midi/musicxml-parser.js`, `REDACTED` 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.
AC2 Forms & labels — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 71 further occurrence(s) are not listed individually; the score already reflects all 111.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The dev server exited, and its output does not match a cause we recognise. (rule: unrecognised-exit). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (not identified): the dev server exited, and its output does not match a cause we recognise. Last output: "> effetune@2.18.1 dev / > node scripts/dev-server.mjs / Unable to start the development server: GitHub Pages 232 is required. Install Ruby, then run "gem install github-pages -v 232"." No runtime evidence was gathered.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P2 Observability — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 383 further occurrence(s) are not listed individually; the score already reflects all 423.
PF3 Async & latency hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 10 further occurrence(s) are not listed individually; the score already reflects all 50.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1072 further occurrence(s) are not listed individually; the score already reflects all 1112.
R11 Import Boundaries — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1968 further occurrence(s) are not listed individually; the score already reflects all 2008.
R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 174 further occurrence(s) are not listed individually; the score already reflects all 214.
R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 4 further occurrence(s) are not listed individually; the score already reflects all 44.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 424 further occurrence(s) are not listed individually; the score already reflects all 464.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
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.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
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.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
1733 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was modulation.compileRegion at 233. A further 57 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 web-sqlite-runtime.dispatchWebSqliteCommand at 100 — they are counted neither in the figure above nor in this dimension's score. 6 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: js/sf2/sample-reader.js (sample-reader.createSf2SampleReader at 22), js/audio/plugin-execution-capabilities.js (plugin-execution-capabilities.getPluginExecutionChannelMode at 20), js/audio/power-session-journal.js (power-session-journal.validatePowerSessionJournalRecord at 19), electron/network-output-live.cjs (network-output-live.readFeedbackRequest at 18), js/browser/browser-view.js (BrowserView.handleCommand at 16), and 1 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 1101 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 70 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with modulation.compileRegion (cyclomatic 233), processPipeline (cyclomatic 227), handleWorkletMessage (cyclomatic 183). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 70 together lifts Cyclomatic Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 1250 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 132 bodies over 60 down to 60 or less in Cognitive Complexity — start with processPipeline (cognitive 486), parseMusicXml (cognitive 402), compileRegion (cognitive 369). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 132 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes6.2 / 10Adequate✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 156 MethodTooLong finding(s) in God Classes — start with REDACTED (9), power-policy-controller.js (6), audio-context-manager.js (5). — One of this dimension's main actionable groups (156 warning-level).
Resolve the 123 FileTooLong finding(s) in God Classes — start with app.js (2), REDACTED, catalog-runtime-core.js. — One of this dimension's main actionable groups (123 warning-level).
Resolve the 98 ClassTooLong finding(s) in God Classes — start with REDACTED (3), room_eq.js (2), ui-manager.js (2). — One of this dimension's main actionable groups (98 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
6 duplicated block group(s) detected. 0.1 % of the production lines (324 of 353,036) are in a reported copy. A further 5 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 2 of the 11 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .c, .cpp (36% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count. Measured on part of this repository only: .js (50% 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.
Edited copy of a member (18 corresponding lines)android/app/src/main/java/sonic/Sonic.java:363
Edited copy of a member (15 corresponding lines)android/app/src/main/java/sonic/Sonic.java:811
Edited copy of a member (14 corresponding lines)android/app/src/main/java/sonic/Sonic.java:957
Edited copy of a member (11 corresponding lines)android/app/src/main/java/sonic/Sonic.java:294
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Edited copy of a member (18 corresponding lines) finding(s) in Code Duplication — start with Sonic.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Edited copy of a member (15 corresponding lines) finding(s) in Code Duplication — start with Sonic.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Edited copy of a member (14 corresponding lines) finding(s) in Code Duplication — start with Sonic.java. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ 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.
15 production modules (Gradle+npm+Python+CMake), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 0 module(s) off the main sequence, with abstractness counted on 4 of the 15 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 243 Low cohesion finding(s) in Cohesion (LCOM4) — start with designer.js (7), REDACTED (3), preset-manager.js (3). — One of this dimension's main actionable groups (243 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage4.6 / 10Weak✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 15.7% — 312 file(s) below 50%. Measured from the JavaScript/TypeScript suite (its `test` script (`node tools/run-tests.mjs`) under node's V8 coverage via `npm ci --ignore-scripts` in the repository root; node:test via `npm ci --ignore-scripts` in dsp/bindings/js/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in mcp/, the 3 run(s) test reliability made). Taken over 3 runs of the suite: a line counts as covered only when every run executed it.
Resolve the 312 Low coverage finding(s) in Code Coverage — start with index.js (2), cli.mjs (2), browser-controller.cjs. — One of this dimension's main actionable groups (312 warning-level).
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Stronggated by 12 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
16 skipped (16 with a documented reason), 7 zero-assertion, 5 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 7534 tests. Measured on the JavaScript/TypeScript suite only — at least 32 test source file(s) (.py, .java) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: Android bundled assets never register a PWA service worker · ×7tests/esm/android-host.test.mjs:420
Fixed-sleep synchronisation: live input manager keeps arrival spacing while an earlier batch awaits its render acknowledgement · ×5tests/esm/midi-device-input-wasm.test.mjs:146
Skipped (documented): generated Python classes import through the real package runtime · ×16tests/esm/dsp-library-codegen-import-smoke.test.mjs:43
What to do
Resolve the 7 No assertions finding(s) in Test Quality — start with assets.test.mjs (3), android-host.test.mjs, multires-spectrum.test.mjs. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 5 Fixed-sleep synchronisation finding(s) in Test Quality — start with midi-device-input-wasm.test.mjs (2), remote-ui-browser.test.mjs, electron-airplay-receiver.test.cjs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
0 flaky across 1 measured tier(s). JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in dsp/bindings/js/ (197 tests); node:test via `npm ci --ignore-scripts` in mcp/ (33 tests)): measured (0 flaky).
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
This repository's Gradle dependency graph was RESOLVED BY A BUILD, across every subproject rather than the root alone: 130 artifact(s) resolved, 89 of them gradable against Maven Central, and 55 behind a shipped release. Where a version was requested and a different one won conflict resolution, the RESOLVED version is what is graded — grading the request would recommend an upgrade already applied. Known CVEs in the same graph are a separate question again, reported under D30.
Outdated (compile): com.google.guava:guava · ×55
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 3 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 2 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. A further 3 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 143 Hotspot finding(s) in Churn × Complexity Hotspots — start with audio-context-manager.js (2), ui-manager.js (2), app.js (2). — One of this dimension's main actionable groups (143 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 14479 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 432 document(s) read across 3 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
4 naming inconsistencies among 73 declarations measured against a convention their peers follow.
`browserScrollbarCSS` spells `CSS` where 14 names in the project spell it `Css`electron/browser-controller.cjs:44
`calculateFFT` spells `FFT` where 22 names in the project spell it `Fft`features/measurement/audio-utils/signal-processing.js:15
`_processFilesWithJSZip` spells `JS` where 20 names in the project spell it `Js`js/ui/pipeline/file-processor.js:810
`BluetoothSBCSimulatorPlugin` spells `SBC` where 13 names in the project spell it `Sbc`plugins/lofi/bluetooth_sbc_simulator.js:18
What to do
Resolve the 1 `browserScrollbarCSS` spells `CSS` where 14 names in the project spell… finding(s) in Naming Consistency — start with browser-controller.cjs. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `calculateFFT` spells `FFT` where 22 names in the project spell it `Fft` finding(s) in Naming Consistency — start with signal-processing.js. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `_processFilesWithJSZip` spells `JS` where 20 names in the project spell… finding(s) in Naming Consistency — start with file-processor.js. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
doc comments repeat the names · ×2features/measurement/audio-utils/core.js:219
What to do
Resolve the 110 redundant comment finding(s) in Comment Value — start with preset-manager.js (5), app.js (4), devices.js (4). — One of this dimension's main actionable groups (110 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
73 finding(s): 0 critical, 1 high, 63 medium, 9 low. semgrep hit a parse error in 36 file(s) — `_config.yml`, `_data/site_ui.yml`, `_includes/docs_search_index.json`, `REDACTED` (lines 1–10, line 20), `_includes/site_head.html` (lines 1–10, lines 16–134), … (+31 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 33 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (18), REDACTED (8), REDACTED (5). — One of this dimension's main actionable groups (33 warning-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 2 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
1 of 652 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is plugins/resonator/horn_resonator_plus.js. Counted over 652 of the 828 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with horn_resonator_plus.js. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 17 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives3.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×16) — features/measurement/ui/analysis-plot.js:203, features/measurement/ui/graph-renderer.js:49, js/electron-integration.js:408, …
Video with no captions <track> offers no captions. Add a <track kind="captions"> pointing at a WebVTT file for this video (or confirm captions are provided another way). — js/ui/audio-player/audio-context-manager.js:199
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels5.1 / 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.
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×10) — features/measurement/ui/analysis-controller.js:245, js/electron/configIntegration.js:1270, js/electron/configIntegration.js:2297, …
This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×15) — js/electron/configIntegration.js:174, js/electron/configIntegration.js:184, js/electron/configIntegration.js:195, …
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). (×9) — js/electron/configIntegration.js:231, js/electron/configIntegration.js:248, js/electron/configIntegration.js:474, …
The fieldset's <legend> has no text, so the control group has no name. Put descriptive text in the <legend>. — js/electron/configIntegration.js:469
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. (×4) — js/electron/configIntegration.js:2288, js/ui/library/library-view-menus.js:29, js/ui/pipeline/pipeline-ai-dialog.js:118, …
This <canvas> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — js/visualizer/visualizer-feed.js:17
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.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×6) — 404.html:2, effetune.html:2, extension/editor.html:2, …
With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled. — REDACTED:31
An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — js/remote/remote-control-dialog.js:29
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether 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".
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — effetune.html:260
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×14) — features/measurement/ui/measurement-display.js:63, features/measurement/ui/measurement-display.js:504, features/measurement/ui/measurement-display.js:521, …
This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — js/ui/audio-player/audio-player-ui.js:1502
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×2) — js/ui/library/library-view-menus.js:488, js/ui/library/library-view-menus.js:24
This <form role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — js/ui/library/library-view-playlist-io.js:294
The repo's own CSS styles .plugin-item 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. — js/ui/plugin-list/preset-manager.js:182
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
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.
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.
`.preset-dialog:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — css/effetune.css:2846
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
BUILD.md names Node.js 22, but the repository declares engines `>=18`, engines `>=20`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — BUILD.md:1006
What to do
Reconcile the README with reality: BUILD.md names Node.js 22, but the repository declares engines `>=18`, engines `>=20`.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability5.3 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 3/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `dsp/bindings/js`, `experiments/dsp-library-phase0`, `mcp`.
`REDACTED` reports through `console.*` at line 2898 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:2898
`REDACTED` reports through `console.*` at line 2942 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:2942
`REDACTED` reports through `console.*` at line 3066 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:3066
`REDACTED` reports through `console.*` at line 3235 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:3235
`REDACTED` reports through `console.*` at line 4004 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:4004
`REDACTED` reports through `console.*` at line 4776 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:4776
`REDACTED` reports through `console.*` at line 4798 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:4798
`REDACTED` reports through `console.*` at line 5274 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:5274
`REDACTED` reports through `console.*` at line 5297 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:5297
`REDACTED` reports through `console.*` at line 5309 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:5309
`REDACTED` reports through `console.*` at line 5464 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:5464
`REDACTED` reports through `console.*` at line 5735 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:5735
`REDACTED` reports through `console.*` at line 6371 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:6371
`REDACTED` reports through `console.*` at line 6816 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:6816
`REDACTED` reports through `console.*` at line 6825 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:6825
`REDACTED` reports through `console.*` at line 6827 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:6827
`REDACTED` reports through `console.*` at line 7810 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:7810
`REDACTED` reports through `console.*` at line 7930 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:7930
`REDACTED` reports through `console.*` at line 8032 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:8032
`REDACTED` reports through `console.*` at line 8513 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:8513
`REDACTED` reports through `console.*` at line 8535 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:8535
`REDACTED` reports through `console.*` at line 8588 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:8588
`REDACTED` reports through `console.*` at line 8766 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:8766
`REDACTED` reports through `console.*` at line 8801 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:8801
`REDACTED` reports through `console.*` at line 8828 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:8828
`REDACTED` reports through `console.*` at line 9069 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:9069
`REDACTED` reports through `console.*` at line 9339 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:9339
`REDACTED` reports through `console.*` at line 9345 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:9345
`REDACTED` reports through `console.*` at line 9422 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:9422
`REDACTED` reports through `console.*` at line 9429 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:9429
`features/measurement/audioWorkletProcessors.js` reports through `console.*` at line 49 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/audioWorkletProcessors.js:49
`features/measurement/audioWorkletProcessors.js` reports through `console.*` at line 80 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/audioWorkletProcessors.js:80
`features/measurement/dataStorage.js` reports through `console.*` at line 294 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/dataStorage.js:294
`features/measurement/dataStorage.js` reports through `console.*` at line 304 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/dataStorage.js:304
`features/measurement/dataStorage.js` reports through `console.*` at line 313 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/dataStorage.js:313
`features/measurement/dataStorage.js` reports through `console.*` at line 327 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/dataStorage.js:327
`features/measurement/dataStorage.js` reports through `console.*` at line 357 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/dataStorage.js:357
`features/measurement/dataStorage.js` reports through `console.*` at line 432 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/dataStorage.js:432
`features/measurement/dataStorage.js` reports through `console.*` at line 441 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — features/measurement/dataStorage.js:441
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `pip`, `gradle`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — .github/dependabot.yml:3
What to do
Dependabot is configured but does not watch `pip`, `gradle` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · 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.
`fetch(` 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. (×8) — assets/js/site.js:350, electron/network-music-resource.cjs:20, electron/network-music-resource.cjs:38, …
What to do
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`existsSync` in `buildPackage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dsp/bindings/js/scripts/build.mjs:70
`fileSystem.mkdtempSync` in `reconcile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/airplay-receiver.cjs:223
`fs.writeFileSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/file-utils.js:36
`fs.fsyncSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/file-utils.js:37
`fs.closeSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — electron/file-utils.js:38, electron/file-utils.js:46
`fs.renameSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/file-utils.js:40
`fs.unlinkSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/file-utils.js:53
`fs.readFileSync` in `readFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/file-utils.js:68
`fs.existsSync` in `savePipelineStateToFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/file-utils.js:121
`fs.mkdirSync` in `savePipelineStateToFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/file-utils.js:122
`fs.writeFileSync` in `savePipelineStateToFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/file-utils.js:126
`fs.existsSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — electron/ipc-handlers.js:1032, electron/ipc-handlers.js:1073
`fs.readFileSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc-handlers.js:1034
`fs.mkdirSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc-handlers.js:1074
`fs.writeFileSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc-handlers.js:1077
`fs.existsSync` in `ipcMain.handle("load-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc-handlers.js:1105
`fs.readFileSync` in `ipcMain.handle("load-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc-handlers.js:1106
`fs.existsSync` in `ipcMain.handle("get-user-presets-for-tray")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc-handlers.js:1447
`fs.readFileSync` in `ipcMain.handle("get-user-presets-for-tray")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc-handlers.js:1452
`fs.mkdirSync` in `openLibraryCatalogServices` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/main.js:211
`fs.existsSync` in `app.on("open-file")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — electron/main.js:1630, electron/main.js:1652
`fs.existsSync` in `verifyWorklet` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:212
`fs.readdirSync` in `collectServiceWorkerResources` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:221
`fs.readFileSync` in `collectServiceWorkerResources` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:229
`fs.existsSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:619
`fs.statSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:620
`fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:623
`fs.mkdtempSync` in `verifyDocsAcceptance` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:989
`fs.writeFileSync` in `verifyDocsAcceptance` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:995
`fs.rmSync` in `verifyDocsAcceptance` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:1008
a busy-wait on `value` in `permute` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — js/library/repository/transport-shuffle.js:21
a busy-wait on `value` in `invert` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — js/library/repository/transport-shuffle.js:29
`fs.existsSync` in `runSetup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — mcp/src/setup.mjs:146
`fs.existsSync` in `registerDesktop` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — mcp/src/setup.mjs:204
`fs.readFileSync` in `registerDesktop` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — mcp/src/setup.mjs:205
`fs.mkdirSync` in `registerDesktop` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — mcp/src/setup.mjs:224
`fs.writeFileSync` in `registerDesktop` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — mcp/src/setup.mjs:225
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ 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.
0 typed · 1611 plain JS — the untyped files are assets/js/site.js, dsp/bindings/js/scripts/build.mjs, dsp/bindings/js/scripts/verify-install.mjs, dsp/bindings/js/scripts/verify-pack.mjs, dsp/bindings/js/src/artifacts.js, dsp/bindings/js/src/assets.js (+1605 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Do you agree with this assessment?
R10 · Code Duplication4.1 / 10Weak✓ Tool-verified
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
218 duplicated blocks under the repository root have copies in at least two of the sibling directories dsp, electron, experiments, extension, features, js (+4 more sibling(s) not listed) — 164 of them are reported below, and 54 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 218 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 218 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 218 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/audio/dsp-engine-binding.js:944
169 duplicated blocks under plugins/ have copies in at least two of the sibling directories analyzer, basics, control, delay, dynamics, eq (+8 more sibling(s) not listed) — 111 of them are reported below, and 58 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 169 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 169 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 169 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. — plugins/basics/fir_crossover.js:97
62 duplicated blocks under js/ have copies in at least two of the sibling directories android, audio, bass-management, browser, crosstalk-cancellation, electron (+15 more sibling(s) not listed) — 44 of them are reported below, and 18 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 62 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 62 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 62 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/group-delay-eq/design-core.js:141
9 duplicated blocks under js/library/ have copies in at least two of the sibling directories artwork, metadata, operations, playlists, repository, scan — 8 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 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. — js/library/operations/web-library-service-coordinator.js:401
7 duplicated blocks under js/ui/ have copies in at least two of the sibling directories audio-player, library — 6 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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/ui/audio-player/audio-player-ui.js:1927
plugins/dynamics/multiband_compressor.js:8 · plugins/dynamics/multiband_expander.js:8 — these 2 files are line-for-line copies of one another — 557 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. — plugins/dynamics/multiband_compressor.js:8
js/audio/dsp-engine-binding.js:944 · REDACTED:950 — 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. — js/audio/dsp-engine-binding.js:944
js/audio/dsp-engine-binding.js:207 · REDACTED:213 — 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/audio/dsp-engine-binding.js:207
plugins/basics/fir_crossover.js:97 · plugins/eq/five_band_fir_peq.js:107 — the two spans are one implementation copied and then locally edited — 2048 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. — plugins/basics/fir_crossover.js:97
electron/library-service-coordinator.cjs:565 · js/library/operations/web-library-service-coordinator.js:436 — the two spans are one implementation copied and then locally edited — 2017 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. — electron/library-service-coordinator.cjs:565
plugins/dynamics/auto_leveler.js:26 · plugins/dynamics/transient_shaper.js:18 — the two spans are one implementation copied and then locally edited — 2279 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. — plugins/dynamics/auto_leveler.js:26
js/midi/smf-scheduler.js:109 · REDACTED:1647 — 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/midi/smf-scheduler.js:109
plugins/dynamics/compressor.js:6 · plugins/dynamics/expander.js:6 — these 2 files are line-for-line copies of one another — 284 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. — plugins/dynamics/compressor.js:6
plugins/dynamics/compressor.js:6 · plugins/dynamics/gate.js:6 — these 2 files are line-for-line copies of one another — 272 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. — plugins/dynamics/compressor.js:6
plugins/eq/band_pass_filter.js:250 · plugins/eq/hi_pass_filter.js:318 · plugins/eq/lo_pass_filter.js:318 — these 3 files are line-for-line copies of one another — 228 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. — plugins/eq/band_pass_filter.js:250
plugins/dynamics/auto_leveler.js:320 · plugins/dynamics/power_amp_sag.js:243 — the two spans are one implementation copied and then locally edited — 1485 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. — plugins/dynamics/auto_leveler.js:320
plugins/eq/five_band_peq.js:416 · plugins/eq/room_eq.js:224 — the two spans are one implementation copied and then locally edited — 1360 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. — plugins/eq/five_band_peq.js:416
electron/library-catalog-worker.cjs:3 · electron/library-catalog-worker.cjs:518 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — electron/library-catalog-worker.cjs:3
electron/library-catalog-worker.cjs:310 · js/library/repository/web-sqlite-runtime.js:409 — 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. — electron/library-catalog-worker.cjs:310
js/midi/smf-scheduler.js:460 · REDACTED:1998 — 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. — js/midi/smf-scheduler.js:460
plugins/saturation/harmonic_distortion.js:148 · plugins/saturation/saturation.js:123 — the two spans are one implementation copied and then locally edited — 1228 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. — plugins/saturation/harmonic_distortion.js:148
plugins/eq/group_delay_eq.js:183 · plugins/eq/group_delay_peq.js:269 — 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. — plugins/eq/group_delay_eq.js:183
electron/library-catalog-worker.cjs:172 · js/library/repository/web-sqlite-runtime.js:274 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — electron/library-catalog-worker.cjs:172
plugins/restoration/click_remover.js:29 · plugins/restoration/clip_restorer.js:29 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — plugins/restoration/click_remover.js:29
electron/library-artwork-worker-pool.cjs:8 · electron/library-metadata-worker-pool.cjs:9 — the two spans are one implementation copied and then locally edited — 993 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. — electron/library-artwork-worker-pool.cjs:8
js/audio/dsp-engine-binding.js:1 · REDACTED: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. — js/audio/dsp-engine-binding.js:1
plugins/basics/channel_divider.js:937 · plugins/eq/band_pass_filter.js:497 — 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. — plugins/basics/channel_divider.js:937
plugins/analyzer/level_meter.js:137 · plugins/basics/multi_channel_panel.js:632 — the two spans are one implementation copied and then locally edited — 670 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. — plugins/analyzer/level_meter.js:137
electron/ir-library-ipc.js:84 · electron/measurement-backup-ipc.cjs:39 — the two spans are one implementation copied and then locally edited — 800 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. — electron/ir-library-ipc.js:84
js/ui/pipeline/pipeline-ai-dialog.js:26 · js/ui/pipeline/pipeline-routing-dialog.js:28 — the two spans are one implementation copied and then locally edited — 657 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/ui/pipeline/pipeline-ai-dialog.js:26
plugins/dynamics/expander.js:776 · plugins/dynamics/gate.js:846 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — plugins/dynamics/expander.js:776
js/group-delay-eq/design-core.js:141 · js/group-delay-peq/design-core.js:240 — 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. — js/group-delay-eq/design-core.js:141
js/ui/audio-player/playback-sequence.js:105 · js/ui/audio-player/playback-sequence.js:336 — the two spans are one implementation copied and then locally edited — 744 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. — js/ui/audio-player/playback-sequence.js:105
dsp/bindings/js/src/telemetry.js:107 · plugins/analyzer/oscilloscope.js:697 — the two spans are one implementation copied and then locally edited — 862 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. — dsp/bindings/js/src/telemetry.js:107
plugins/eq/fifteen_band_peq.js:18 · plugins/eq/five_band_peq.js:8 — the two spans are one implementation copied and then locally edited — 921 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. — plugins/eq/fifteen_band_peq.js:18
js/audio/dsp-engine-binding.js:672 · REDACTED:678 — 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/audio/dsp-engine-binding.js:672
electron/library-catalog-worker.cjs:1842 · js/library/repository/web-sqlite-runtime.js:1908 — 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. — electron/library-catalog-worker.cjs:1842
electron/library-catalog-worker.cjs:1431 · js/library/repository/web-sqlite-runtime.js:1374 — 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. — electron/library-catalog-worker.cjs:1431
plugins/eq/tilt_eq.js:369 · plugins/eq/tone_control.js:371 — 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. — plugins/eq/tilt_eq.js:369
plugins/lofi/am_radio_simulator.js:2030 · plugins/lofi/sw_radio_simulator.js:1756 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — plugins/lofi/am_radio_simulator.js:2030
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
dsp/bindings/js/src/artifacts.js:1 reaches into another package with a relative path (./internal/dsp-wasm-loader.js) — import the package by name instead. — dsp/bindings/js/src/artifacts.js:1
dsp/bindings/js/src/artifacts.js:2 reaches into another package with a relative path (./internal/dsp-engine-binding.js) — import the package by name instead. — dsp/bindings/js/src/artifacts.js:2
dsp/bindings/js/src/assets.js:1 reaches into another package with a relative path (./internal/ir-asset-payload.js) — import the package by name instead. — dsp/bindings/js/src/assets.js:1
dsp/bindings/js/src/assets.js:7 reaches into another package with a relative path (./internal/ir-plugin-contract.js) — import the package by name instead. — dsp/bindings/js/src/assets.js:7
dsp/bindings/js/src/engine.js:1 reaches into another package with a relative path (./internal/dsp-engine-binding.js) — import the package by name instead. — dsp/bindings/js/src/engine.js:1
dsp/bindings/js/src/graph-engine.js:1 reaches into another package with a relative path (./internal/dsp-engine-binding.js) — import the package by name instead. — dsp/bindings/js/src/graph-engine.js:1
dsp/bindings/js/src/soundfont.js:4 reaches into another package with a relative path (./internal/js/sfz/limits.js) — import the package by name instead. — dsp/bindings/js/src/soundfont.js:4
dsp/bindings/js/src/soundfont.js:5 reaches into another package with a relative path (./internal/js/sfz/sample-bank-source.js) — import the package by name instead. — dsp/bindings/js/src/soundfont.js:5
dsp/bindings/js/src/soundfont.js:6 reaches into another package with a relative path (./internal/js/sfz/sample-stream.js) — import the package by name instead. — dsp/bindings/js/src/soundfont.js:6
dsp/bindings/js/src/soundfont.js:8 reaches into another package with a relative path (./internal/js/sfz/storage-plan.js) — import the package by name instead. — dsp/bindings/js/src/soundfont.js:8
dsp/bindings/js/src/soundfont.js:9 reaches into another package with a relative path (./internal/js/sfz/streamed-bank.js) — import the package by name instead. — dsp/bindings/js/src/soundfont.js:9
dsp/bindings/js/test/runtime.test.mjs:5 reaches past another workspace package's public entry into its internals with a relative path (../../../../tools/dsp-parity/stimuli.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — dsp/bindings/js/test/runtime.test.mjs:5
js/electron/menuIntegration.js:6 imports js/ui/double-blind-test/pipeline-availability.js, 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. — js/electron/menuIntegration.js:6
mcp/test/server.test.mjs:15 reaches past another workspace package's public entry into its internals with a relative path (../../js/remote/sync-ops.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — mcp/test/server.test.mjs:15
scripts/derive-tube-circuit-design.mjs:54 imports tests/tools/tube-simulator-lineamp/derive-phase-b-anchors.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/derive-tube-circuit-design.mjs:54
scripts/generate-tube-fir-coefficients.mjs:6 imports tests/tools/tube-simulator-lineamp/fir-coefficient-contract.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/generate-tube-fir-coefficients.mjs:6
scripts/generate-tube-fir-coefficients.mjs:13 imports tests/tools/tube-simulator-lineamp/generate-stability-manifests.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/generate-tube-fir-coefficients.mjs:13
tests/esm/dsp-denormal-protection.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/dsp-denormal-protection.test.mjs:6
tests/esm/dsp-oscilloscope-wasm-integration.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/dsp-oscilloscope-wasm-integration.test.mjs:8
tests/esm/dsp-pipeline-wasm-integration.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/dsp-pipeline-wasm-integration.test.mjs:8
tests/esm/dsp-spectrogram-wasm-telemetry-v1.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/dsp-spectrogram-wasm-telemetry-v1.test.mjs:8
tests/esm/dsp-volume-offline-integration.test.mjs:7 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/dsp-volume-offline-integration.test.mjs:7
tests/esm/dsp-worklet-glue.test.mjs:15 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/telemetry.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/dsp-worklet-glue.test.mjs:15
tests/esm/ir-reverb-offline-integration.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/ir-reverb-offline-integration.test.mjs:8
tests/esm/sfz-extended-wasm.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/telemetry.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/sfz-extended-wasm.test.mjs:8
tests/esm/sfz-keyswitch-telemetry.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/telemetry.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/sfz-keyswitch-telemetry.test.mjs:6
tests/esm/sfz-script-telemetry.test.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/telemetry.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/esm/sfz-script-telemetry.test.mjs:4
tools/dsp-parity/runners.mjs:9 reaches into another package with a relative path (../../REDACTED) — import the package by name instead. — tools/dsp-parity/runners.mjs:9
tools/generate-sf2-native-fixture.mjs:5 imports tests/helpers/sf2-fixture.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. — tools/generate-sf2-native-fixture.mjs:5
tools/generate-sfz-effects-fixture.mjs:5 imports tests/helpers/sfz-effects-asset-fixture.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. — tools/generate-sfz-effects-fixture.mjs:5
tools/generate-sfz-future-main-fixture.mjs:5 imports tests/helpers/sfz-native-acceptance.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. — tools/generate-sfz-future-main-fixture.mjs:5
tools/generate-sfz-future-main-fixture.mjs:8 imports tests/helpers/sfz-effects-asset-fixture.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. — tools/generate-sfz-future-main-fixture.mjs:8
REDACTED:5 imports tests/helpers/browser-test-display.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. — REDACTED:5
REDACTED:7 imports tests/helpers/browser-test-display.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. — REDACTED:7
REDACTED:6 imports tests/helpers/browser-test-display.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. — REDACTED:6
REDACTED:6 imports tests/helpers/browser-test-display.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. — REDACTED:6
REDACTED:1017 imports tests/browser/power-policy-smoke.spec.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. — REDACTED:1017
REDACTED:1018 imports tests/browser/cue-region-smoke.spec.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. — REDACTED:1018
REDACTED:1019 imports tests/browser/ir-reverb-wasm-smoke.spec.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. — REDACTED:1019
REDACTED:1020 imports tests/browser/g726-resume-wasm-smoke.spec.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. — REDACTED:1020
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 (25 rows); move the shared test helper into a source directory production code may depend on (24 rows).
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
compileRegion has cyclomatic complexity 231 and cognitive complexity 369; 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/sfz/modulation.js:127
processPipeline has cyclomatic complexity 227 and cognitive complexity 486; 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:8315
handleWorkletMessage has cyclomatic complexity 181 and cognitive complexity 218; 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/audio-manager.js:2619
parseMusicXml has cyclomatic complexity 149 and cognitive complexity 388; 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/midi/musicxml-parser.js:156
packSfzAsset has cyclomatic complexity 140 and cognitive complexity 183; 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/sfz/asset.js:137
typeOf has cyclomatic complexity 128 and cognitive complexity 188; 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/sfz/script-compiler.js:430
drawFrame has cyclomatic complexity 115 and cognitive complexity 189; 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/visualizer/visualizer-renderer.js:130
rebindCurrentPlayback has cyclomatic complexity 113 and cognitive complexity 155; 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/ui/audio-player/audio-context-manager.js:1407
parseSmf has cyclomatic complexity 110 and cognitive complexity 202; 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/midi/smf-parser.js:47
applyPortMessage has cyclomatic complexity 110 and cognitive complexity 136; 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:2992
decidePowerTarget has cyclomatic complexity 105 and cognitive complexity 170; 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/audio/power-policy.js:721
update has cyclomatic complexity 97 and cognitive complexity 107; 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/visualizer/visualizer-analyzer-display.js:209
parseSfz has cyclomatic complexity 94 and cognitive complexity 121; 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/sfz/parser.js:218
decodeRhythmAnalyzer has cyclomatic complexity 94 and cognitive complexity 84; 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. — dsp/bindings/js/src/telemetry.js:596
apply has cyclomatic complexity 90 and cognitive complexity 159; 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/visualizer/visualizer-effects.js:246
showConfigDialog has cyclomatic complexity 89 and cognitive complexity 88; 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/electron/configIntegration.js:55
initializeAndBuildPipeline has cyclomatic complexity 88 and cognitive complexity 143; 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/app.js:929
renderLibrary has cyclomatic complexity 87 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — js/network-music/view.js:557
createPagedRow has cyclomatic complexity 84 and cognitive complexity 105; 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/ui/library/library-view.js:2746
serve has cyclomatic complexity 82 and cognitive complexity 144; 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:327
handleWorkletPowerEvent has cyclomatic complexity 82 and cognitive complexity 118; 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/audio/power-policy-controller.js:2057
hasValidImportedScalars has cyclomatic complexity 80 and cognitive complexity 79; 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. — features/measurement/dataStorage.js:130
drawGraph has cyclomatic complexity 79 and cognitive complexity 96; 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. — plugins/analyzer/note_spectrogram.js:2076
prepare has cyclomatic complexity 79 and cognitive complexity 79; 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/ui/audio-player/rolling-pcm-transport.js:134
readSnapshot has cyclomatic complexity 79 and cognitive complexity 75; 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. — plugins/analyzer/rhythm_analyzer.js:387
prepareLegacyParametersV1 has cyclomatic complexity 78 and cognitive complexity 113; 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. — dsp/bindings/js/src/preset.js:416
(anonymous) has cyclomatic complexity 76 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/esm/visualizer-layout-browser.test.mjs:1179
command has cyclomatic complexity 75 and cognitive complexity 116; 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. — electron/network-music-av-player.cjs:99
drawGraph has cyclomatic complexity 73 and cognitive complexity 92; 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/visualizer/visualizer-guitar.js:346
drawGroove has cyclomatic complexity 73 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — plugins/analyzer/rhythm_analyzer.js:1475
processInstance has cyclomatic complexity 72 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — js/midi/smf-scheduler.js:460, REDACTED:1998
verifyDesignInvariants has cyclomatic complexity 72 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/derive-tube-circuit-design.mjs:3351
drawCellContent has cyclomatic complexity 71 and cognitive complexity 105; 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. — plugins/analyzer/analog_meter.js:842
advanceSfzSampleForecast has cyclomatic complexity 71 and cognitive complexity 62; 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. — REDACTED:5589
designRoomEq has cyclomatic complexity 70 and cognitive complexity 149; 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/room-eq/design-core.js:2492
renderWindow has cyclomatic complexity 70 and cognitive complexity 86; 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/ui/library/library-view.js:1935
getSnapshot has cyclomatic complexity 70 and cognitive complexity 65; 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/ui/audio-player/openhome-playback-adapter.js:1134
isValidReadyMessage has cyclomatic complexity 69 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. — js/ui/audio-player/rolling-pcm-transport.js:1304
parameters has cyclomatic complexity 68 and cognitive complexity 99; 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/visualizer/visualizer-editor.js:803
Do you agree with this assessment?
R3 · Large Files0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
REDACTED has 8957 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
plugins/saturation/tube_simulator.js has 7402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/saturation/tube_simulator.js:1
js/library/repository/catalog-runtime-core.js has 6870 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/library/repository/catalog-runtime-core.js:1
js/ui/audio-player/audio-context-manager.js has 6037 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/ui/audio-player/audio-context-manager.js:1
js/audio-manager.js has 4677 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/audio-manager.js:1
js/ui/library/library-view.js has 3869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/ui/library/library-view.js:1
js/audio/power-policy-controller.js has 3524 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/audio/power-policy-controller.js:1
plugins/lofi/cassette_artifacts.js has 3345 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/lofi/cassette_artifacts.js:1
plugins/eq/room_eq.js has 3203 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/eq/room_eq.js:1
js/room-eq/design-core.js has 2773 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/room-eq/design-core.js:1
js/ui-manager.js has 2708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/ui-manager.js:1
js/ui/audio-player/playback-manager.js has 2706 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/ui/audio-player/playback-manager.js:1
js/library/repository/web-sqlite-runtime.js has 2530 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/library/repository/web-sqlite-runtime.js:1
plugins/analyzer/note_spectrogram.js has 2447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/analyzer/note_spectrogram.js:1
js/electron/configIntegration.js has 2413 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/electron/configIntegration.js:1
electron/library-catalog-worker.cjs has 2388 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/library-catalog-worker.cjs:1
plugins/lofi/am_radio_simulator.js has 2263 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/lofi/am_radio_simulator.js:1
plugins/analyzer/rhythm_analyzer.js has 2178 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/analyzer/rhythm_analyzer.js:1
plugins/reverb/ir_reverb.js has 2108 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/reverb/ir_reverb.js:1
REDACTED has 2067 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
plugins/lofi/sw_radio_simulator.js has 2062 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/lofi/sw_radio_simulator.js:1
js/ui/audio-player/audio-player-ui.js has 2046 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/ui/audio-player/audio-player-ui.js:1
plugins/lofi/tv_audio_simulator.js has 1998 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/lofi/tv_audio_simulator.js:1
js/visualizer/visualizer-editor.js has 1791 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/visualizer/visualizer-editor.js:1
js/app.js has 1702 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/app.js:1
plugins/lofi/vinyl_simulator.js has 1668 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/lofi/vinyl_simulator.js:1
electron/main.js has 1613 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/main.js:1
plugins/spatial/phase_select_eq.js has 1593 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/spatial/phase_select_eq.js:1
electron/library-service-coordinator.cjs has 1542 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/library-service-coordinator.cjs:1
tools/verify-dsp-library-goldens.mjs has 1514 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tools/verify-dsp-library-goldens.mjs:1
plugins/dynamics/multiband_compressor.js has 1507 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/dynamics/multiband_compressor.js:1
js/pipeline-analyzer/ui.js has 1498 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/pipeline-analyzer/ui.js:1
js/audio/offline-processor.js has 1471 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/audio/offline-processor.js:1
js/ui/audio-player/openhome-playback-adapter.js has 1467 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/ui/audio-player/openhome-playback-adapter.js:1
plugins/lofi/fm_radio_simulator.js has 1453 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/lofi/fm_radio_simulator.js:1
plugins/eq/five_band_dynamic_eq.js has 1426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/eq/five_band_dynamic_eq.js:1
features/measurement/dataStorage.js has 1420 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — features/measurement/dataStorage.js:1
electron/ipc-handlers.js has 1419 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/ipc-handlers.js:1
js/audio/dsp-engine-binding.js has 1412 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/audio/dsp-engine-binding.js:1
js/ui/audio-player/rolling-pcm-transport.js has 1391 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — js/ui/audio-player/rolling-pcm-transport.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.4 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — plugins/dynamics/multiband_transient.js:1, plugins/lofi/digital_error_emulator.js:1, plugins/dynamics/gate.js:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling6.7 / 10Adequate✓ 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.
test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code9.5 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
422 file(s) (~155251 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: js/android/remote.js imports './remote-music-protocol.js', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — js
Unreachable from the 842 application, 32 tooling and 841 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (842 application, 32 tooling, 841 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 (×8) — scripts/generate-tube-phase-c-tables.mjs, scripts/generate-tube-fir-coefficients.mjs, tools/verify-airplay-startup.mjs, …
Nothing imports this binding — it is safe to review for removal. (×3) — dsp/bindings/js/src/artifacts.js:183, tools/dsp-parity/mp3-conformance.mjs:1048, tools/library-scale/reference-fixture.mjs:3
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×6) — js/room-eq/design-core.js:705, js/room-eq/design-core.js:780, js/ui/double-blind-test/double-blind-test.js:38, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — scripts/pack-msix-win.mjs:139, scripts/build-airplay-receiver.mjs:394
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
features/measurement/measurement-controller/index.js → features/measurement/measurement-controller/level-adjustment.js → features/measurement/ui/ui-manager.js → features/measurement/measurement-controller/index.js (one verified cycle inside a mutually-dependent group of 4 files) — features/measurement/measurement-controller/index.js:10
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.2 / 10Adequate✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`ICONS.add` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — extension/mobile-shell.js:33, js/remote/remote-ui-manager.js:94
`ICONS.close` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — extension/mobile-shell.js:45, js/remote/remote-ui-manager.js:105
`t('dialog.audioConfig.title')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:244
`t('dialog.audioConfig.inputDevice')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:248
`t('dialog.audioConfig.useInputWithPlayer')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:253
`t('dialog.audioConfig.outputDevice')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:257
`t('dialog.audioConfig.outputChannels')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:262
`t('dialog.audioConfig.useWasmDsp')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:266
`t('dialog.audioConfig.gaplessPlayback')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:270
`t('dialog.audioConfig.sampleRate')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:274
`t('dialog.audioConfig.latency')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:278
`t('dialog.audioConfig.midiInput')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:284
`t('dialog.audioConfig.midiOutput')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:286
`t('dialog.audioConfig.midiDevices.refresh')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:288
`t('dialog.audioConfig.replayGain')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:292
`t('dialog.audioConfig.replayGainPreamp')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:294
`audioPreferences.replayGainPreampDb` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:295
`t('dialog.audioConfig.replayGainPreventClipping')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:298
`t('dialog.audioConfig.cancel')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:304
`t('dialog.audioConfig.apply')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:305
`t('dialog.audioConfig.updatedTitle')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/electron/audioIntegration.js:772
`category` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — js/electron/configIntegration.js:492, js/electron/configIntegration.js:496
`window.uiManager?window.uiManager.t('ui.title.miniPlayer'):'Mini player'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:452
`window.uiManager?window.uiManager.t('ui.title.exitMiniPlayer'):'Exit mini player'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:453
`window.uiManager?window.uiManager.t('ui.title.alwaysOnTop'):'Always on top'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:454
`window.uiManager?window.uiManager.t('ui.title.playPause'):'Play or pause'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:471
`window.uiManager?window.uiManager.t('ui.title.stop'):'Stop'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:472
`window.uiManager?window.uiManager.t('ui.title.prevTrack'):'Previous track'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:473
`window.uiManager?window.uiManager.t('ui.title.nextTrack'):'Next track'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:474
`window.uiManager?window.uiManager.t('ui.title.repeat'):'Toggle repeat mode'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:475
`window.uiManager?window.uiManager.t('ui.title.shuffle'):'Toggle shuffle'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:476
`window.uiManager?window.uiManager.t('ui.title.playbackSpeed'):'Playback speed'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:477
`window.uiManager?window.uiManager.t('ui.title.expandPlayer'):'Expand player'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:479
`window.uiManager?window.uiManager.t('ui.title.closePlayer'):'Close player'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/audio-player/audio-player-ui.js:480
`count??'…'` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/library/library-view-components.js:41
`columns` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/library/library-view-components.js:144
`specifyAudioText` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — js/ui/pipeline/file-processor.js:75
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/1 C# file(s) are in a nullable-enabled context. This repository commits no project file, so nothing sets <Nullable>enable</Nullable> for it: a file is enabled only by its own `#nullable enable`, by a Unity `csc.rsp` with `-nullable:enable` for its assembly, or as a file-based app (`#:` directives) whose `#:property Nullable` does not turn it off. NRTs catch a whole class of null-deref bugs at compile time.
What to do
Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
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).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 14 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 63 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 — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
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 — no public interfaces
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility (rendered) — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — Most of this repository's production source (.c, .cpp, .cs, .java, .py) was not read by navigability analysis, so tracing effort was not assessed — whatever else resolved (another language's projects) is not this repository's navigability. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
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) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (27 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
IC1 Incompleteness & stubs — IC1 reached only 0% of this repository's production lines — javascript (338,557 lines), c (248,833 lines), cpp (66,615 lines), python (9,746 lines), java (4,686 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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 — coverage data present for 481 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — javascript (338,557 lines), c (248,833 lines), cpp (66,615 lines), python (9,746 lines), java (4,686 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — X18 reached only 0% of this repository's production lines — javascript (338,557 lines), c (248,833 lines), cpp (66,615 lines), python (9,746 lines), java (4,686 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no async method does work a token could cancel
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 60 finding(s)
AC2 · Forms & labels· <label> that labels no control · ×15
<label> that labels no control js/electron/configIntegration.js:174— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:184— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:195— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:204— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:215— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:238— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:303— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:309— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:362— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/electron/configIntegration.js:384— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/ui/pipeline/pipeline-routing-dialog.js:107— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/ui/pipeline/pipeline-routing-dialog.js:168— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control js/ui/pipeline/pipeline-routing-dialog.js:211— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control plugins/analyzer/oscilloscope.js:347— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control plugins/analyzer/oscilloscope.js:402— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels· <input> without a programmatic label · ×12
<input> without a programmatic label features/measurement/ui/analysis-controller.js:245— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label js/electron/configIntegration.js:1270— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label js/electron/configIntegration.js:2288— 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 js/ui/audio-player/audio-player-ui.js:469— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label js/ui/library/library-view-menus.js:29— 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 js/ui/pipeline/plugin-preset-dialog.js:208— 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 js/ui/pipeline/plugin-preset-dialog.js:565— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label js/visualizer/visualizer-editor.js:414— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label plugins/analyzer/note_spectrogram.js:1439— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label plugins/analyzer/pitch_meter.js:373— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label plugins/analyzer/spectrogram.js:749— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label plugins/analyzer/spectrum_analyzer.js:579— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×10
Click handler on a non-interactive <div> features/measurement/ui/measurement-display.js:504— 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> features/measurement/ui/measurement-display.js:521— 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/ui/pipeline/pipeline-item-builder.js:33— 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/ui/pipeline/pipeline-item-builder.js:326— 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/ui/pipeline/pipeline-item-builder.js:304— 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/ui/plugin-list-manager.js:143— 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/ui/plugin-list/preset-manager.js:198— 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> plugins/dynamics/multiband_compressor.js:1520— 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> plugins/dynamics/multiband_expander.js:1365— 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> plugins/saturation/multiband_saturation.js:854— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels· <button> with no accessible text · ×9
<button> with no accessible text js/electron/configIntegration.js:231— 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 js/electron/configIntegration.js:248— 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 js/electron/configIntegration.js:474— 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 js/electron/configIntegration.js:475— 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 js/electron/configIntegration.js:476— 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 js/electron/configIntegration.js:2310— 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 js/remote/remote-control-dialog.js:56— 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 js/remote/remote-control-dialog.js:61— 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 js/ui/mobile-nav.js:74— 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).
AC4 · Keyboard semantics· Click handler on a non-interactive <h3> · ×2
Click handler on a non-interactive <h3> js/ui/plugin-list-manager.js:59— 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 <h3> js/ui/plugin-list/preset-manager.js:129— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels· <select> without a programmatic label · ×1
<select> without a programmatic label js/electron/configIntegration.js:2297— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <textarea> without a programmatic label · ×1
<textarea> without a programmatic label js/ui/pipeline/pipeline-ai-dialog.js:118— 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.
AC2 · Forms & labels· Custom control with no accessible name on <canvas> · ×1
Custom control with no accessible name on <canvas> js/visualizer/visualizer-feed.js:17— This <canvas> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC4 · Keyboard semantics· Click handler on a non-interactive <li> · ×1
Click handler on a non-interactive <li> features/measurement/ui/measurement-display.js:63— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics· Clickable element isn't keyboard-operable · ×1
Clickable element isn't keyboard-operable js/ui/plugin-list/preset-manager.js:182— The repo's own CSS styles .plugin-item 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 <canvas> · ×1
Click handler on a non-interactive <canvas> js/visualizer/visualizer-feed.js:17— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Orphaned knowledge plugins/resonator/horn_resonator_plus.js:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Unlisted import '@electron/asar' scripts/pack-msix-win.mjs:139— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'app-builder-lib' scripts/build-airplay-receiver.mjs:394— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Low cohesion: PluginProcessor (LCOM4 141) REDACTED:2556— PluginProcessor's methods fall into 141 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 141 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: AudioContextManager (LCOM4 136) js/ui/audio-player/audio-context-manager.js:92— AudioContextManager's methods fall into 136 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 136 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: AudioManager (LCOM4 133) js/audio-manager.js:150— AudioManager's methods fall into 133 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 133 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: LibraryView (LCOM4 103) js/ui/library/library-view.js:128— LibraryView's methods fall into 103 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 103 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: UIManager (LCOM4 88) js/ui-manager.js:193— UIManager's methods fall into 88 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 88 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: PlaybackManager (LCOM4 68) js/ui/audio-player/playback-manager.js:17— PlaybackManager's methods fall into 68 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 68 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: PluginBase (LCOM4 64) REDACTED:10— PluginBase's methods fall into 64 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 64 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: DspEngineBinding (LCOM4 62) REDACTED:213— DspEngineBinding's methods fall into 62 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 62 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: RoomEqPlugin (LCOM4 58) plugins/eq/room_eq.js:920— RoomEqPlugin's methods fall into 58 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 58 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: VisualizerView (LCOM4 50) REDACTED:24— VisualizerView's methods fall into 50 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 50 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: PowerPolicyController (LCOM4 50) js/audio/power-policy-controller.js:110— PowerPolicyController's methods fall into 50 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 50 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: TubeSimulatorPlugin (LCOM4 47) plugins/saturation/tube_simulator.js:5976— TubeSimulatorPlugin's methods fall into 47 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 47 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: AudioPlayerUI (LCOM4 43) js/ui/audio-player/audio-player-ui.js:78— AudioPlayerUI's methods fall into 43 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 43 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: PipelineAnalyzerUI (LCOM4 41) js/pipeline-analyzer/ui.js:236— PipelineAnalyzerUI's methods fall into 41 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 41 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: RhythmAnalyzerPlugin (LCOM4 41) plugins/analyzer/rhythm_analyzer.js:95— RhythmAnalyzerPlugin's methods fall into 41 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 41 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: DataStorage (LCOM4 40) features/measurement/dataStorage.js:248— DataStorage's methods fall into 40 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 40 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: VisualizerEditor (LCOM4 40) js/visualizer/visualizer-editor.js:94— VisualizerEditor's methods fall into 40 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 40 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: PhaseSelectEqPlugin (LCOM4 40) plugins/spatial/phase_select_eq.js:301— PhaseSelectEqPlugin's methods fall into 40 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 40 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: IRReverbPlugin (LCOM4 39) plugins/reverb/ir_reverb.js:24— IRReverbPlugin's methods fall into 39 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 39 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: OpenHomePlaybackAdapter (LCOM4 37) js/ui/audio-player/openhome-playback-adapter.js:29— OpenHomePlaybackAdapter's methods fall into 37 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 37 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: NetworkMusicView (LCOM4 32) js/network-music/view.js:48— NetworkMusicView's methods fall into 32 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 32 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: BassManagementPlugin (LCOM4 31) plugins/basics/bass_management.js:14— BassManagementPlugin's methods fall into 31 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 31 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: ExtensionEditor (LCOM4 30) extension/editor.js:307— ExtensionEditor's methods fall into 30 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 30 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: RemoteControl (LCOM4 30) js/remote/remote-control.js:56— RemoteControl's methods fall into 30 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 30 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: MultiChannelPanelPlugin (LCOM4 30) plugins/basics/multi_channel_panel.js:6— MultiChannelPanelPlugin's methods fall into 30 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 30 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.
MethodTooLong: PluginProcessor.processPipeline REDACTED:8315— MethodTooLong — processPipeline runs 730 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 630 over it, 7.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: MultibandCompressorPlugin.getProcessorCode plugins/dynamics/multiband_compressor.js:57— MethodTooLong — getProcessorCode runs 501 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 401 over it, 5.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.
MethodTooLong: MultibandExpanderPlugin.getProcessorCode plugins/dynamics/multiband_expander.js:46— MethodTooLong — getProcessorCode runs 470 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 370 over it, 4.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BrickwallLimiterPlugin.constructor plugins/dynamics/brickwall_limiter.js:2— MethodTooLong — constructor runs 425 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 325 over it, 4.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: AudioContextManager.rebindCurrentPlayback js/ui/audio-player/audio-context-manager.js:1407— MethodTooLong — rebindCurrentPlayback runs 372 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 272 over it, 3.72× 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: VisualizerEditor.parameters js/visualizer/visualizer-editor.js:803— MethodTooLong — parameters runs 353 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 253 over it, 3.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ChannelDividerPlugin.constructor plugins/basics/channel_divider.js:9— MethodTooLong — constructor runs 338 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 238 over it, 3.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FifteenBandPEQPlugin.createUI plugins/eq/fifteen_band_peq.js:457— MethodTooLong — createUI runs 334 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 234 over it, 3.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DSD64IMDSimulatorPlugin.constructor plugins/lofi/dsd64_imd_simulator.js:7— MethodTooLong — constructor runs 326 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 226 over it, 3.26× 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: GatePlugin.getProcessorCode plugins/dynamics/gate.js:34— MethodTooLong — getProcessorCode runs 316 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CompressorPlugin.getProcessorCode plugins/dynamics/compressor.js:37— MethodTooLong — getProcessorCode runs 313 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 213 over it, 3.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NoteSpectrogramPlugin.drawGraph plugins/analyzer/note_spectrogram.js:2076— MethodTooLong — drawGraph runs 306 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 206 over it, 3.06× 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: VinylArtifactsPlugin.constructor plugins/lofi/vinyl_artifacts.js:33— MethodTooLong — constructor runs 299 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 199 over it, 2.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MultibandBalancePlugin.getProcessorCode plugins/spatial/multiband_balance.js:24— MethodTooLong — getProcessorCode runs 291 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 191 over it, 2.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PowerPolicyController.beginUserGestureResume js/audio/power-policy-controller.js:2649— MethodTooLong — beginUserGestureResume runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PluginProcessor.applyPortMessage REDACTED:2992— MethodTooLong — applyPortMessage runs 287 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 187 over it, 2.87× 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: AudioManager.handleWorkletMessage js/audio-manager.js:2619— MethodTooLong — handleWorkletMessage runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExpanderPlugin.getProcessorCode plugins/dynamics/expander.js:33— MethodTooLong — getProcessorCode runs 280 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 180 over it, 2.80× 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: MultibandTransientPlugin.getProcessorCode plugins/dynamics/multiband_transient.js:54— MethodTooLong — getProcessorCode runs 280 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 180 over it, 2.80× 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: FrequencyShifterPlugin.constructor plugins/modulation/frequency_shifter.js:25— MethodTooLong — constructor runs 275 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 175 over it, 2.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HornResonatorPlusPlugin.constructor plugins/resonator/horn_resonator_plus.js:40— MethodTooLong — constructor runs 268 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 168 over it, 2.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: App.initializeAndBuildPipeline js/app.js:929— MethodTooLong — initializeAndBuildPipeline runs 255 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 155 over it, 2.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FiveBandDynamicEQ.constructor plugins/eq/five_band_dynamic_eq.js:7— MethodTooLong — constructor runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RotarySpeakerPlugin.constructor plugins/modulation/rotary_speaker.js:21— MethodTooLong — constructor runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× 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: HornResonatorPlugin.constructor plugins/resonator/horn_resonator.js:40— MethodTooLong — constructor runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Hotspot: js/electron/configIntegration.js js/electron/configIntegration.js:55— js/electron/configIntegration.js changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 428 in configIntegration.showConfigDialog at line 55. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/electron/configIntegration.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:8315— REDACTED changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 225 in PluginProcessor.processPipeline at line 8315. 3 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: js/audio-manager.js js/audio-manager.js:2619— js/audio-manager.js changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 173 in AudioManager.handleWorkletMessage at line 2619. 3 of those changes were fix/bug commits, and the other 21 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/audio-manager.js`: 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: electron/ipc-handlers.js electron/ipc-handlers.js:639— electron/ipc-handlers.js changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 138 in ipc-handlers.registerIpcHandlers at line 639. 1 of those changes was a fix/bug commit, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- electron/ipc-handlers.js`: 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: js/ui/audio-player/audio-context-manager.js js/ui/audio-player/audio-context-manager.js:1407— js/ui/audio-player/audio-context-manager.js changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in AudioContextManager.rebindCurrentPlayback at line 1407. 3 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/ui/audio-player/audio-context-manager.js`: 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: plugins/analyzer/note_spectrogram.js plugins/analyzer/note_spectrogram.js:2076— plugins/analyzer/note_spectrogram.js changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in NoteSpectrogramPlugin.drawGraph at line 2076. 2 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- plugins/analyzer/note_spectrogram.js`: 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: js/visualizer/visualizer-renderer.js js/visualizer/visualizer-renderer.js:130— js/visualizer/visualizer-renderer.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in VisualizerRenderer.drawFrame at line 130. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/visualizer/visualizer-renderer.js`: 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: js/visualizer/visualizer-editor.js js/visualizer/visualizer-editor.js:803— js/visualizer/visualizer-editor.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in VisualizerEditor.parameters at line 803. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/visualizer/visualizer-editor.js`: 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: js/ui/library/library-view.js js/ui/library/library-view.js:1814— js/ui/library/library-view.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 141 in LibraryView.renderPagedCommitted at line 1814. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/ui/library/library-view.js`: 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: js/visualizer/visualizer-analyzer-display.js js/visualizer/visualizer-analyzer-display.js:209— js/visualizer/visualizer-analyzer-display.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 155 in AnalyzerDisplay.update at line 209. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/visualizer/visualizer-analyzer-display.js`: 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: js/electron/audioIntegration.js js/electron/audioIntegration.js:186— js/electron/audioIntegration.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 105 in audioIntegration.showAudioConfigDialog at line 186. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/electron/audioIntegration.js`: 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: dsp/bindings/js/src/telemetry.js dsp/bindings/js/src/telemetry.js:596— dsp/bindings/js/src/telemetry.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in telemetry.decodeRhythmAnalyzer at line 596. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- dsp/bindings/js/src/telemetry.js`: 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: plugins/eq/room_eq.js plugins/eq/room_eq.js:1183— plugins/eq/room_eq.js changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in RoomEqPlugin.setParameters at line 1183. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- plugins/eq/room_eq.js`: 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: js/ui-manager.js js/ui-manager.js:1317— js/ui-manager.js changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in UIManager.updateUITexts at line 1317. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/ui-manager.js`: 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: electron/main.js electron/main.js:570— electron/main.js changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in main.createWindow at line 570. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- electron/main.js`: 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: tools/dsp-parity/runners.mjs tools/dsp-parity/runners.mjs:620— tools/dsp-parity/runners.mjs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in runners.runWasmCase at line 620. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- tools/dsp-parity/runners.mjs`: 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: features/measurement/dataStorage.js features/measurement/dataStorage.js:130— features/measurement/dataStorage.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in dataStorage.hasValidImportedScalars at line 130. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- features/measurement/dataStorage.js`: 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: js/audio/power-policy-controller.js js/audio/power-policy-controller.js:2649— js/audio/power-policy-controller.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in PowerPolicyController.beginUserGestureResume at line 2649. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/audio/power-policy-controller.js`: 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: scripts/gen-dsp-library-bindings.mjs scripts/gen-dsp-library-bindings.mjs:696— scripts/gen-dsp-library-bindings.mjs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in gen-dsp-library-bindings.validateEffectOverlay at line 696. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- scripts/gen-dsp-library-bindings.mjs`: 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: js/ui/audio-player/playback-manager.js js/ui/audio-player/playback-manager.js:2514— js/ui/audio-player/playback-manager.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in PlaybackManager.initKeyboardShortcuts at line 2514. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- js/ui/audio-player/playback-manager.js`: 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: dsp/bindings/js/src/preset.js dsp/bindings/js/src/preset.js:416— dsp/bindings/js/src/preset.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in preset.prepareLegacyParametersV1 at line 416. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- dsp/bindings/js/src/preset.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:440— REDACTED changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in VisualizerView.playback at line 440. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: plugins/analyzer/spectrogram.js plugins/analyzer/spectrogram.js:1239— plugins/analyzer/spectrogram.js changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in SpectrogramPlugin.drawGraph at line 1239. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- plugins/analyzer/spectrogram.js`: 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: dsp/bindings/python/src/effetune/presets.py dsp/bindings/python/src/effetune/presets.py:291— dsp/bindings/python/src/effetune/presets.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in presets._prepare_legacy_parameters_v1 at line 291. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- dsp/bindings/python/src/effetune/presets.py`: 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: tools/verify-dsp-library-goldens.mjs tools/verify-dsp-library-goldens.mjs:999— tools/verify-dsp-library-goldens.mjs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in verify-dsp-library-goldens.runWorkletAcceptance at line 999. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:09:02 +09:00' --until='2026-11-12 20:09:02 +09:00' --full-history --no-merges -- tools/verify-dsp-library-goldens.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FileTooLong: REDACTED REDACTED— FileTooLong — 7275 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 73% of them inside a single declaration: PluginProcessor (2556-9402). The bar is 500 significant lines; this is 6775 over it, 14.55× 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: repository/catalog-runtime-core.js js/library/repository/catalog-runtime-core.js— FileTooLong — 5966 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 5466 over it, 11.93× 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: saturation/tube_simulator.js plugins/saturation/tube_simulator.js— FileTooLong — 5786 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 5286 over it, 11.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: audio-player/audio-context-manager.js js/ui/audio-player/audio-context-manager.js— FileTooLong — 4906 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 96% of them inside a single declaration: AudioContextManager (92-6335). The bar is 500 significant lines; this is 4406 over it, 9.81× 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: js/audio-manager.js js/audio-manager.js— FileTooLong — 3481 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 97% of them inside a single declaration: AudioManager (150-4986). The bar is 500 significant lines; this is 2981 over it, 6.96× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: library/library-view.js js/ui/library/library-view.js— FileTooLong — 3265 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 2765 over it, 6.53× 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: audio/power-policy-controller.js js/audio/power-policy-controller.js— FileTooLong — 2927 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 97% of them inside a single declaration: PowerPolicyController (110-3632). The bar is 500 significant lines; this is 2427 over it, 5.85× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: eq/room_eq.js plugins/eq/room_eq.js— FileTooLong — 2673 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 72% of them inside a single declaration: RoomEqPlugin (920-3359). The bar is 1500 significant lines; this is 1173 over it, 1.78× 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: room-eq/design-core.js js/room-eq/design-core.js— FileTooLong — 2248 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1748 over it, 4.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: repository/web-sqlite-runtime.js js/library/repository/web-sqlite-runtime.js— FileTooLong — 2223 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1723 over it, 4.45× 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: audio-player/playback-manager.js js/ui/audio-player/playback-manager.js— FileTooLong — 2154 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 94% of them inside a single declaration: PlaybackManager (17-2814). The bar is 500 significant lines; this is 1654 over it, 4.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: electron/library-catalog-worker.cjs electron/library-catalog-worker.cjs— FileTooLong — 2098 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1598 over it, 4.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: electron/configIntegration.js js/electron/configIntegration.js— FileTooLong — 2083 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 583 over it, 1.39× 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: analyzer/note_spectrogram.js plugins/analyzer/note_spectrogram.js— FileTooLong — 2066 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 93% of them inside a single declaration: NoteSpectrogramPlugin (173-2555). The bar is 500 significant lines; this is 1566 over it, 4.13× 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: lofi/am_radio_simulator.js plugins/lofi/am_radio_simulator.js— FileTooLong — 2032 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 532 over it, 1.35× 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: js/ui-manager.js js/ui-manager.js— FileTooLong — 1977 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 92% of them inside a single declaration: UIManager (193-2996). The bar is 500 significant lines; this is 1477 over it, 3.95× 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: reverb/ir_reverb.js plugins/reverb/ir_reverb.js— FileTooLong — 1834 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 99% of them inside a single declaration: IRReverbPlugin (24-2204). The bar is 1500 significant lines; this is 334 over it, 1.22× 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: analyzer/rhythm_analyzer.js plugins/analyzer/rhythm_analyzer.js— FileTooLong — 1773 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 96% of them inside a single declaration: RhythmAnalyzerPlugin (95-2256). The bar is 500 significant lines; this is 1273 over it, 3.55× 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: lofi/tv_audio_simulator.js plugins/lofi/tv_audio_simulator.js— FileTooLong — 1716 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 216 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: lofi/sw_radio_simulator.js plugins/lofi/sw_radio_simulator.js— FileTooLong — 1695 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 195 over it, 1.13× 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: lofi/cassette_artifacts.js plugins/lofi/cassette_artifacts.js— FileTooLong — 1647 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 74% of them inside a single declaration: CASSETTE_ARTIFACTS_HISS_OFF_DB (702-2924). The bar is 500 significant lines; this is 1147 over it, 3.29× 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: audio-player/audio-player-ui.js js/ui/audio-player/audio-player-ui.js— FileTooLong — 1636 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1136 over it, 3.27× 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: visualizer/visualizer-editor.js js/visualizer/visualizer-editor.js— FileTooLong — 1530 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 96% of them inside a single declaration: VisualizerEditor (94-1809). The bar is 500 significant lines; this is 1030 over it, 3.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1530 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 100% of them inside a single declaration: PluginBase (10-2262). The bar is 1500 significant lines; this is 30 over it, 1.02× 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: lofi/vinyl_simulator.js plugins/lofi/vinyl_simulator.js— FileTooLong — 1453 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 953 over it, 2.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.
ClassTooLong: PluginProcessor REDACTED:2556— ClassTooLong — 5295 significant lines (blank, comment-only and punctuation-only lines excluded), 180 methods. The bar is 400 significant lines; this is 4895 over it, 13.24× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AudioContextManager js/ui/audio-player/audio-context-manager.js:92— ClassTooLong — 4719 significant lines (blank, comment-only and punctuation-only lines excluded), 221 methods. The bar is 400 significant lines; this is 4319 over it, 11.80× 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: AudioManager js/audio-manager.js:150— ClassTooLong — 3366 significant lines (blank, comment-only and punctuation-only lines excluded), 201 methods. The bar is 400 significant lines; this is 2966 over it, 8.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: PowerPolicyController js/audio/power-policy-controller.js:110— ClassTooLong — 2830 significant lines (blank, comment-only and punctuation-only lines excluded), 98 methods. The bar is 400 significant lines; this is 2430 over it, 7.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PlaybackManager js/ui/audio-player/playback-manager.js:17— ClassTooLong — 2032 significant lines (blank, comment-only and punctuation-only lines excluded), 103 methods. The bar is 400 significant lines; this is 1632 over it, 5.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: NoteSpectrogramPlugin plugins/analyzer/note_spectrogram.js:173— ClassTooLong — 1928 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods. The bar is 400 significant lines; this is 1528 over it, 4.82× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RoomEqPlugin plugins/eq/room_eq.js:920— ClassTooLong — 1925 significant lines (blank, comment-only and punctuation-only lines excluded), 98 methods. The bar is 400 significant lines; this is 1525 over it, 4.81× 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: UIManager js/ui-manager.js:193— ClassTooLong — 1820 significant lines (blank, comment-only and punctuation-only lines excluded), 130 methods. The bar is 400 significant lines; this is 1420 over it, 4.55× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IRReverbPlugin plugins/reverb/ir_reverb.js:24— ClassTooLong — 1814 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 1414 over it, 4.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RhythmAnalyzerPlugin plugins/analyzer/rhythm_analyzer.js:95— ClassTooLong — 1710 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 400 significant lines; this is 1310 over it, 4.28× 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: PluginBase REDACTED:10— ClassTooLong — 1529 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 400 significant lines; this is 1129 over it, 3.82× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: VisualizerEditor js/visualizer/visualizer-editor.js:94— ClassTooLong — 1462 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 400 significant lines; this is 1062 over it, 3.66× 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: TubeSimulatorPlugin plugins/saturation/tube_simulator.js:5976— ClassTooLong — 1154 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 754 over it, 2.89× 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: AudioService android/app/src/main/java/com/frieve/effetune/AudioService.java:45— ClassTooLong — 1130 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 400 significant lines; this is 730 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OfflineProcessor js/audio/offline-processor.js:23— ClassTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 727 over it, 2.82× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MultibandCompressorPlugin plugins/dynamics/multiband_compressor.js:7— ClassTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 727 over it, 2.82× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PhaseSelectEqPlugin plugins/spatial/phase_select_eq.js:301— ClassTooLong — 1119 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 719 over it, 2.80× 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: PipelineAnalyzerUI js/pipeline-analyzer/ui.js:236— ClassTooLong — 1109 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 709 over it, 2.77× 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: MultibandExpanderPlugin plugins/dynamics/multiband_expander.js:7— ClassTooLong — 1098 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 698 over it, 2.75× 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: SpectrogramPlugin plugins/analyzer/spectrogram.js:29— ClassTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 689 over it, 2.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BassManagementPlugin plugins/basics/bass_management.js:14— ClassTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 689 over it, 2.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FiveBandFIRPEQPlugin plugins/eq/five_band_fir_peq.js:1— ClassTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 682 over it, 2.71× 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: FiveBandDynamicEQ plugins/eq/five_band_dynamic_eq.js:6— ClassTooLong — 1067 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 667 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SpectrumAnalyzerPlugin plugins/analyzer/spectrum_analyzer.js:15— ClassTooLong — 1033 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 633 over it, 2.58× 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: RollingPcmTransport js/ui/audio-player/rolling-pcm-transport.js:33— ClassTooLong — 1014 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 614 over it, 2.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AudioContextManager js/ui/audio-player/audio-context-manager.js:92— TooManyMethods — 221 methods. The bar is 30 methods; this is 191 over it, 7.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AudioManager js/audio-manager.js:150— TooManyMethods — 201 methods. The bar is 30 methods; this is 171 over it, 6.70× 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: PluginProcessor REDACTED:2556— TooManyMethods — 180 methods. The bar is 30 methods; this is 150 over it, 6.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LibraryView js/ui/library/library-view.js:128— TooManyMethods — 156 methods. The bar is 30 methods; this is 126 over it, 5.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: UIManager js/ui-manager.js:193— TooManyMethods — 130 methods. The bar is 30 methods; this is 100 over it, 4.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: WebSqliteCatalogRepository js/library/repository/web-catalog-repository.js:18— TooManyMethods — 107 methods. The bar is 30 methods; this is 77 over it, 3.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PlaybackManager js/ui/audio-player/playback-manager.js:17— TooManyMethods — 103 methods. The bar is 30 methods; this is 73 over it, 3.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LibraryCatalogHost electron/library-catalog-host.cjs:55— TooManyMethods — 101 methods. The bar is 30 methods; this is 71 over it, 3.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PowerPolicyController js/audio/power-policy-controller.js:110— TooManyMethods — 98 methods. The bar is 30 methods; this is 68 over it, 3.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RoomEqPlugin plugins/eq/room_eq.js:920— TooManyMethods — 98 methods. The bar is 30 methods; this is 68 over it, 3.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DspEngineBinding js/audio/dsp-engine-binding.js:207— TooManyMethods — 94 methods. The bar is 30 methods; this is 64 over it, 3.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DspEngineBinding REDACTED:213— TooManyMethods — 94 methods. The bar is 30 methods; this is 64 over it, 3.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PluginBase REDACTED:10— TooManyMethods — 92 methods. The bar is 30 methods; this is 62 over it, 3.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IRReverbPlugin plugins/reverb/ir_reverb.js:24— TooManyMethods — 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NoteSpectrogramPlugin plugins/analyzer/note_spectrogram.js:173— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AudioService android/app/src/main/java/com/frieve/effetune/AudioService.java:45— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NativeEngine android/app/src/main/java/com/frieve/effetune/NativeEngine.java:4— TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AudioPlayerUI js/ui/audio-player/audio-player-ui.js:78— TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TubeSimulatorPlugin plugins/saturation/tube_simulator.js:5976— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: VisualizerView REDACTED:24— TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RhythmAnalyzerPlugin plugins/analyzer/rhythm_analyzer.js:95— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: VisualizerEditor js/visualizer/visualizer-editor.js:94— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.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: GroupDelayPEQPlugin plugins/eq/group_delay_peq.js:3— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: OpenHomePlaybackAdapter js/ui/audio-player/openhome-playback-adapter.js:29— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PhaseSelectEqPlugin plugins/spatial/phase_select_eq.js:301— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FunctionTooLong: browser-controller.createBrowserController electron/browser-controller.cjs:177— FunctionTooLong — createBrowserController runs 592 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 492 over it, 5.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ipc-handlers.registerIpcHandlers electron/ipc-handlers.js:639— FunctionTooLong — registerIpcHandlers runs 568 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 468 over it, 5.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: dialog.openUserDataBackupDialog js/user-data-backup/dialog.js:99— FunctionTooLong — openUserDataBackupDialog runs 500 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 400 over it, 5.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: asset-library-browser.openAssetLibraryBrowser js/ui/asset-library-browser.js:37— FunctionTooLong — openAssetLibraryBrowser runs 469 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 369 over it, 4.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: script-compiler.compileSfzScript js/sfz/script-compiler.js:276— FunctionTooLong — compileSfzScript runs 400 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 300 over it, 4.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: design-core.designRoomEq js/room-eq/design-core.js:2492— FunctionTooLong — designRoomEq runs 295 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 195 over it, 2.95× 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: power-policy.decidePowerTarget js/audio/power-policy.js:721— FunctionTooLong — decidePowerTarget runs 294 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 194 over it, 2.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: design-core.synthesizeFilter js/room-eq/design-core.js:1747— FunctionTooLong — synthesizeFilter runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× 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: library-catalog-worker.initialize electron/library-catalog-worker.cjs:516— FunctionTooLong — initialize runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: sfz-library-ipc.registerSfzLibraryIpc electron/sfz-library-ipc.js:64— FunctionTooLong — registerSfzLibraryIpc runs 242 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 142 over it, 2.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: visualizer-model.normalizeParams js/visualizer/visualizer-model.js:335— FunctionTooLong — normalizeParams runs 239 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 139 over it, 2.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: modulation.compileRegion js/sfz/modulation.js:127— FunctionTooLong — compileRegion runs 230 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 130 over it, 2.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: remote-client.startRemoteClient js/remote/remote-client.js:126— FunctionTooLong — startRemoteClient runs 225 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ipc-handlers.createApplicationMenuTemplate electron/ipc-handlers.js:338— FunctionTooLong — createApplicationMenuTemplate runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.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.
FunctionTooLong: brand-animation.startBrandAnimation js/ui/brand-animation.js:52— FunctionTooLong — startBrandAnimation runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: musicxml-parser.parseMusicXml js/midi/musicxml-parser.js:156— FunctionTooLong — parseMusicXml runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× 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: graph-readout.attach plugins/graph-readout.js:273— FunctionTooLong — attach runs 207 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 107 over it, 2.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: asset.packSfzAsset js/sfz/asset.js:137— FunctionTooLong — packSfzAsset runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: effetune_bench.html.runBenchmarks features/effetune_bench.html:937— FunctionTooLong — runBenchmarks runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: design-utils.designPEQ features/measurement/peq-calculator/design-utils.js:139— FunctionTooLong — designPEQ runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: server.createServer mcp/src/server.mjs:90— FunctionTooLong — createServer runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smf-parser.parseSmf js/midi/smf-parser.js:47— FunctionTooLong — parseSmf runs 199 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: main.createWindow electron/main.js:570— FunctionTooLong — createWindow runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: parser.parseSfz js/sfz/parser.js:218— FunctionTooLong — parseSfz runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: app.setupEventConnections features/measurement/app.js:329— FunctionTooLong — setupEventConnections runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Sync-over-async blocking dsp/bindings/js/scripts/build.mjs:70— `existsSync` in `buildPackage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/airplay-receiver.cjs:223— `fileSystem.mkdtempSync` in `reconcile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:36— `fs.writeFileSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:37— `fs.fsyncSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:38— `fs.closeSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:40— `fs.renameSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:46— `fs.closeSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:53— `fs.unlinkSync` in `saveFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:68— `fs.readFileSync` in `readFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:121— `fs.existsSync` in `savePipelineStateToFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:122— `fs.mkdirSync` in `savePipelineStateToFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/file-utils.js:126— `fs.writeFileSync` in `savePipelineStateToFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1032— `fs.existsSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1034— `fs.readFileSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1073— `fs.existsSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1074— `fs.mkdirSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1077— `fs.writeFileSync` in `ipcMain.handle("save-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1105— `fs.existsSync` in `ipcMain.handle("load-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1106— `fs.readFileSync` in `ipcMain.handle("load-audio-preferences")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1447— `fs.existsSync` in `ipcMain.handle("get-user-presets-for-tray")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc-handlers.js:1452— `fs.readFileSync` in `ipcMain.handle("get-user-presets-for-tray")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/main.js:211— `fs.mkdirSync` in `openLibraryCatalogServices` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/main.js:1630— `fs.existsSync` in `app.on("open-file")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/main.js:1652— `fs.existsSync` in `app.on("open-file")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:212— `fs.existsSync` in `verifyWorklet` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/artifacts.js:1— dsp/bindings/js/src/artifacts.js:1 reaches into another package with a relative path (./internal/dsp-wasm-loader.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/artifacts.js:2— dsp/bindings/js/src/artifacts.js:2 reaches into another package with a relative path (./internal/dsp-engine-binding.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/assets.js:1— dsp/bindings/js/src/assets.js:1 reaches into another package with a relative path (./internal/ir-asset-payload.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/assets.js:7— dsp/bindings/js/src/assets.js:7 reaches into another package with a relative path (./internal/ir-plugin-contract.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/engine.js:1— dsp/bindings/js/src/engine.js:1 reaches into another package with a relative path (./internal/dsp-engine-binding.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/graph-engine.js:1— dsp/bindings/js/src/graph-engine.js:1 reaches into another package with a relative path (./internal/dsp-engine-binding.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/soundfont.js:4— dsp/bindings/js/src/soundfont.js:4 reaches into another package with a relative path (./internal/js/sfz/limits.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/soundfont.js:5— dsp/bindings/js/src/soundfont.js:5 reaches into another package with a relative path (./internal/js/sfz/sample-bank-source.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/soundfont.js:6— dsp/bindings/js/src/soundfont.js:6 reaches into another package with a relative path (./internal/js/sfz/sample-stream.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/soundfont.js:8— dsp/bindings/js/src/soundfont.js:8 reaches into another package with a relative path (./internal/js/sfz/storage-plan.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dsp/bindings/js/src/soundfont.js:9— dsp/bindings/js/src/soundfont.js:9 reaches into another package with a relative path (./internal/js/sfz/streamed-bank.js) — import the package by name instead.
Boundary violation [package:test-cross-package-internals] dsp/bindings/js/test/runtime.test.mjs:5— dsp/bindings/js/test/runtime.test.mjs:5 reaches past another workspace package's public entry into its internals with a relative path (../../../../tools/dsp-parity/stimuli.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-suite-dependency] js/electron/menuIntegration.js:6— js/electron/menuIntegration.js:6 imports js/ui/double-blind-test/pipeline-availability.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-cross-package-internals] mcp/test/server.test.mjs:15— mcp/test/server.test.mjs:15 reaches past another workspace package's public entry into its internals with a relative path (../../js/remote/sync-ops.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-suite-dependency] scripts/derive-tube-circuit-design.mjs:54— scripts/derive-tube-circuit-design.mjs:54 imports tests/tools/tube-simulator-lineamp/derive-phase-b-anchors.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:test-suite-dependency] scripts/generate-tube-fir-coefficients.mjs:6— scripts/generate-tube-fir-coefficients.mjs:6 imports tests/tools/tube-simulator-lineamp/fir-coefficient-contract.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:test-suite-dependency] scripts/generate-tube-fir-coefficients.mjs:13— scripts/generate-tube-fir-coefficients.mjs:13 imports tests/tools/tube-simulator-lineamp/generate-stability-manifests.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:test-cross-package-internals] tests/esm/dsp-denormal-protection.test.mjs:6— tests/esm/dsp-denormal-protection.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/esm/dsp-oscilloscope-wasm-integration.test.mjs:8— tests/esm/dsp-oscilloscope-wasm-integration.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/esm/dsp-pipeline-wasm-integration.test.mjs:8— tests/esm/dsp-pipeline-wasm-integration.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/esm/dsp-spectrogram-wasm-telemetry-v1.test.mjs:8— tests/esm/dsp-spectrogram-wasm-telemetry-v1.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/esm/dsp-volume-offline-integration.test.mjs:7— tests/esm/dsp-volume-offline-integration.test.mjs:7 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/esm/dsp-worklet-glue.test.mjs:15— tests/esm/dsp-worklet-glue.test.mjs:15 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/telemetry.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/esm/ir-reverb-offline-integration.test.mjs:8— tests/esm/ir-reverb-offline-integration.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/denormal-noise.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/esm/sfz-extended-wasm.test.mjs:8— tests/esm/sfz-extended-wasm.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../dsp/bindings/js/src/telemetry.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
+ 15 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file plugins/dynamics/multiband_transient.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/lofi/digital_error_emulator.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/dynamics/gate.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/saturation/multiband_saturation.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/dynamics/brickwall_limiter.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/dynamics/auto_leveler.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/eq/narrow_range.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/spatial/multiband_balance.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/eq/hi_pass_filter.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/eq/lo_pass_filter.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/eq/band_pass_filter.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/saturation/sub_synth.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/eq/tilt_eq.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/eq/loudness_equalizer.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/reverb/dattorro_plate_reverb.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/eq/tone_control.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/saturation/exciter.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/resonator/horn_resonator_plus.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/dynamics/transient_shaper.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/resonator/horn_resonator.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/lofi/vinyl_artifacts.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/eq/comb_filter.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/reverb/fdn_reverb.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/saturation/hard_clipping.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file plugins/lofi/hum_generator.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
+ 15 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×40
Untrusted text written into markup unescaped extension/mobile-shell.js:33— `ICONS.add` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped extension/mobile-shell.js:45— `ICONS.close` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:244— `t('dialog.audioConfig.title')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:248— `t('dialog.audioConfig.inputDevice')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:253— `t('dialog.audioConfig.useInputWithPlayer')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:257— `t('dialog.audioConfig.outputDevice')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:262— `t('dialog.audioConfig.outputChannels')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:266— `t('dialog.audioConfig.useWasmDsp')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:270— `t('dialog.audioConfig.gaplessPlayback')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:274— `t('dialog.audioConfig.sampleRate')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:278— `t('dialog.audioConfig.latency')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:284— `t('dialog.audioConfig.midiInput')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:286— `t('dialog.audioConfig.midiOutput')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:288— `t('dialog.audioConfig.midiDevices.refresh')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:292— `t('dialog.audioConfig.replayGain')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:294— `t('dialog.audioConfig.replayGainPreamp')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:295— `audioPreferences.replayGainPreampDb` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:298— `t('dialog.audioConfig.replayGainPreventClipping')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:304— `t('dialog.audioConfig.cancel')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:305— `t('dialog.audioConfig.apply')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/audioIntegration.js:772— `t('dialog.audioConfig.updatedTitle')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/configIntegration.js:492— `category` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/electron/configIntegration.js:496— `category` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/remote/remote-ui-manager.js:94— `ICONS.add` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped js/remote/remote-ui-manager.js:105— `ICONS.close` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
AC1 · Text alternatives· <canvas> without a text alternative · ×16
<canvas> without a text alternative features/measurement/ui/analysis-plot.js:203— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative features/measurement/ui/graph-renderer.js:49— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative js/electron-integration.js:408— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative js/visualizer/visualizer-effects.js:8— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative js/visualizer/visualizer-feed.js:17— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative REDACTED:43— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/analyzer/level_meter.js:372— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/basics/multi_channel_panel.js:831— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/dynamics/compressor.js:830— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/dynamics/expander.js:778— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/dynamics/gate.js:848— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/eq/five_band_dynamic_eq.js:700— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/saturation/dynamic_saturation.js:377— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/saturation/hard_clipping.js:399— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/saturation/harmonic_distortion.js:338— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative plugins/saturation/saturation.js:285— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
Outbound HTTP without resilience assets/js/site.js:350— `fetch(` 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.
Outbound HTTP without resilience electron/network-music-resource.cjs:20— `fetch(` 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.
Outbound HTTP without resilience electron/network-music-resource.cjs:38— `fetch(` 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.
Outbound HTTP without resilience experiments/dsp-library-phase0/worklet/compressor-worklet.js:76— `fetch(` 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.
Outbound HTTP without resilience sw.js:45— `fetch(` 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.
Outbound HTTP without resilience sw.js:114— `fetch(` 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.
Outbound HTTP without resilience sw.js:120— `fetch(` 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.
Outbound HTTP without resilience sw.js:141— `fetch(` 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.
No assertions: Android bundled assets never register a PWA service worker tests/esm/android-host.test.mjs:420— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: all Points and high rates finish jobs with preallocated storage through mode switches tests/esm/multires-spectrum.test.mjs:102— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: OpenHome build handshake smoke accepts a clean provider snapshot tests/esm/openhome-handshake-smoke.test.mjs:9— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: normal, minimized, and non-Windows startup leave native presentation unchanged tests/cjs/electron-window-state.test.cjs:115— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: resolver Response accepts exact declared length from tiny stream chunks dsp/bindings/js/test/assets.test.mjs:575— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: resolver Response accepts many reused tiny chunks without a declared length dsp/bindings/js/test/assets.test.mjs:589— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: non-bundle resolvers infer ETA1 metadata from common binary response types dsp/bindings/js/test/assets.test.mjs:734— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
script-compiler.compileSfzScript::typeOf (cognitive 192) js/sfz/script-compiler.js:430— script-compiler.compileSfzScript::typeOf has cognitive complexity 192 (threshold 15). Drivers by points: if/else 63 (119 pts), boolean chains 37, ternaries 13 (31 pts), loops 3 (5 pts) (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::block (cognitive 80) js/sfz/script-compiler.js:653— script-compiler.compileSfzScript::block has cognitive complexity 80 (threshold 15). Drivers by points: if/else 22 (54 pts), boolean chains 11, loops 4 (11 pts), ternaries 2 (4 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::expression (cognitive 68) js/sfz/script-compiler.js:582— script-compiler.compileSfzScript::expression has cognitive complexity 68 (threshold 15). Drivers by points: if/else 22 (33 pts), ternaries 8 (21 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::staticCoefficient (cognitive 41) js/sfz/script-compiler.js:312— script-compiler.compileSfzScript::staticCoefficient has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 4 (10 pts), boolean chains 8 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::collect, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::collect (cognitive 23) js/sfz/script-compiler.js:371— script-compiler.compileSfzScript::collect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::initialize (cognitive 17) js/sfz/script-compiler.js:638— script-compiler.compileSfzScript::initialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::literal (cognitive 16) js/sfz/script-compiler.js:288— script-compiler.compileSfzScript::literal has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 5, boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: 7 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::staticCoefficient, script-compiler.compileSfzScript::collect, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
AC3 · Page structure· Page without a main landmark · ×6
Page without a main landmark 404.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 effetune.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 extension/editor.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 features/effetune_bench.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 features/measurement/measurement.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 remote.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
configIntegration.showConfigDialog::renderDialogTexts (cyclomatic 51) js/electron/configIntegration.js:1739— configIntegration.showConfigDialog::renderDialogTexts has cyclomatic complexity 51 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 6 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderNetworkStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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.
configIntegration.showConfigDialog::renderNetworkStatus (cyclomatic 24) js/electron/configIntegration.js:1403— configIntegration.showConfigDialog::renderNetworkStatus has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 6 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderAirPlayStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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.
configIntegration.showConfigDialog::syncConfigControls (cyclomatic 24) js/electron/configIntegration.js:1932— configIntegration.showConfigDialog::syncConfigControls has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 6 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderNetworkStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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.
configIntegration.showConfigDialog::renderAirPlayStatus (cyclomatic 20) js/electron/configIntegration.js:1448— configIntegration.showConfigDialog::renderAirPlayStatus has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderNetworkStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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.
configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation (cyclomatic 19) js/electron/configIntegration.js:1362— configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 6 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::renderNetworkStatus, configIntegration.showConfigDialog::renderAirPlayStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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.
configIntegration.showConfigDialog::applyPowerSettings (cyclomatic 18) js/electron/configIntegration.js:2034— configIntegration.showConfigDialog::applyPowerSettings has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderNetworkStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×5
Modal dialog does not manage focus effetune.html:260— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus js/ui/audio-player/audio-player-ui.js:1502— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus js/ui/library/library-view-menus.js:488— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus js/ui/library/library-view-menus.js:24— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus js/ui/library/library-view-playlist-io.js:294— This <form role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
script-compiler.compileSfzScript::typeOf (cyclomatic 128) js/sfz/script-compiler.js:430— script-compiler.compileSfzScript::typeOf has cyclomatic complexity 128 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::block (cyclomatic 43) js/sfz/script-compiler.js:653— script-compiler.compileSfzScript::block has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::expression (cyclomatic 41) js/sfz/script-compiler.js:582— script-compiler.compileSfzScript::expression has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::staticCoefficient (cyclomatic 28) js/sfz/script-compiler.js:312— script-compiler.compileSfzScript::staticCoefficient 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. This shape REPEATS in the file: 5 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::typeOf, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
script-compiler.compileSfzScript::literal (cyclomatic 16) js/sfz/script-compiler.js:288— script-compiler.compileSfzScript::literal has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (script-compiler.compileSfzScript, script-compiler.compileSfzScript::staticCoefficient, script-compiler.compileSfzScript::typeOf, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
D10 · Test Quality· Fixed-sleep synchronisation · ×5
Fixed-sleep synchronisation: live input manager keeps arrival spacing while an earlier batch awaits its render acknowledgement tests/esm/midi-device-input-wasm.test.mjs:146— This test starts work it did not wait for (`f`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 4))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: live input manager retains the selected source after queue overflow tests/esm/midi-device-input-wasm.test.mjs:164— This test starts work it did not wait for (`f`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: remote sliders send one operation per drag and flush pending values before undo tests/esm/remote-ui-browser.test.mjs:525— This test starts work it did not wait for (`slider`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 1100))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: AirPlay replays actual sender, receiver format and complete progress records without an elapsed-time clock tests/cjs/electron-airplay-receiver.test.cjs:171— This test starts work it did not wait for (`h`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 30))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: Browser MIDI files open in Music Player only when enabled, skip immediate repeats, and mute the page tests/cjs/electron-browser-controller.test.cjs:991— This test starts work it did not wait for (`h`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 20))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
configIntegration.showConfigDialog::renderDialogTexts (cognitive 56) js/electron/configIntegration.js:1739— configIntegration.showConfigDialog::renderDialogTexts has cognitive complexity 56 (threshold 15). Drivers by points: if/else 45 (50 pts), loops 6 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 4 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderAirPlayStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
configIntegration.showConfigDialog::renderAirPlayStatus (cognitive 38) js/electron/configIntegration.js:1448— configIntegration.showConfigDialog::renderAirPlayStatus has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 10 (33 pts), boolean chains 4, if/else 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 4 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderDialogTexts, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
configIntegration.showConfigDialog::syncConfigControls (cognitive 24) js/electron/configIntegration.js:1932— configIntegration.showConfigDialog::syncConfigControls has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19 (20 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 4 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderAirPlayStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation (cognitive 19) js/electron/configIntegration.js:1362— configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, ternaries 5 (6 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 4 other methods here (configIntegration.showConfigDialog, configIntegration.showConfigDialog::renderAirPlayStatus, configIntegration.showConfigDialog::renderDialogTexts, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
showConfigDialog::applyPowerSettings (cognitive 26) js/electron/configIntegration.js:2034— showConfigDialog::applyPowerSettings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
showConfigDialog::renderNetworkOutput (cognitive 24) js/electron/configIntegration.js:1557— showConfigDialog::renderNetworkOutput has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 3 (6 pts), other 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
showConfigDialog::renderNetworkStatus (cognitive 18) js/electron/configIntegration.js:1403— showConfigDialog::renderNetworkStatus has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, ternaries 3 (5 pts), if/else 3 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MidiFrameScheduler.processInstance (cyclomatic 72) js/midi/smf-scheduler.js:460— MidiFrameScheduler.processInstance has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MidiFrameScheduler.processInstance (cyclomatic 72) REDACTED:1998— MidiFrameScheduler.processInstance has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_writeMidiEvents (cyclomatic 52) REDACTED:661— _writeMidiEvents has cyclomatic complexity 52 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_writeMidiEvents (cyclomatic 52) js/audio/dsp-engine-binding.js:655— _writeMidiEvents has cyclomatic complexity 52 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
processInputInstance (cyclomatic 42) REDACTED:1662— processInputInstance has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
processInputInstance (cyclomatic 42) js/midi/smf-scheduler.js:124— processInputInstance has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createUI (cyclomatic 25) plugins/dynamics/multiband_compressor.js:1322— createUI has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 21 function items inside it that branch (createControl, a function literal at line 1486, a function literal at line 1541, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
createUI (cyclomatic 25) plugins/dynamics/multiband_expander.js:1173— createUI has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 21 function items inside it that branch (createControl, a function literal at line 1332, a function literal at line 1382, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
prepareLiveJoin (cyclomatic 23) REDACTED:1951— prepareLiveJoin 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.
prepareLiveJoin (cyclomatic 23) js/midi/smf-scheduler.js:413— prepareLiveJoin 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.
DspEngineBinding.instanceProcessSpan (cyclomatic 20) js/audio/dsp-engine-binding.js:1096— DspEngineBinding.instanceProcessSpan has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
DspEngineBinding.instanceProcessSpan (cyclomatic 20) REDACTED:1102— DspEngineBinding.instanceProcessSpan has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
publishSfzSamplePage (cyclomatic 19) REDACTED:832— publishSfzSamplePage has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
publishSfzSamplePage (cyclomatic 19) js/audio/dsp-engine-binding.js:826— publishSfzSamplePage has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
beginScanFolder (cyclomatic 19) js/library/repository/web-sqlite-runtime.js:2269— beginScanFolder has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 2279). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
beginScanFolder (cyclomatic 19) electron/library-catalog-worker.cjs:2176— beginScanFolder has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 2186). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
MidiFrameScheduler.commitInstances (cyclomatic 17) js/midi/smf-scheduler.js:311— MidiFrameScheduler.commitInstances has cyclomatic complexity 17 (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.
MidiFrameScheduler.commitInstances (cyclomatic 17) REDACTED:1849— MidiFrameScheduler.commitInstances has cyclomatic complexity 17 (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. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
DspEngineBinding.estimateSfzEffectPreparation (cyclomatic 16) js/audio/dsp-engine-binding.js:243— DspEngineBinding.estimateSfzEffectPreparation has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
DspEngineBinding.estimateSfzEffectPreparation (cyclomatic 16) REDACTED:249— DspEngineBinding.estimateSfzEffectPreparation has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
MidiFrameScheduler.configure (cyclomatic 16) js/midi/smf-scheduler.js:66— MidiFrameScheduler.configure has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MidiFrameScheduler.configure (cyclomatic 16) REDACTED:1604— MidiFrameScheduler.configure has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
resolvePlaybackSource (cyclomatic 16) js/library/repository/web-sqlite-runtime.js:2429— resolvePlaybackSource has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
resolvePlaybackSource (cyclomatic 16) electron/library-catalog-scan-runtime.cjs:502— resolvePlaybackSource 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.
processInstance (cognitive 118) REDACTED:1998— processInstance has cognitive complexity 118 (threshold 15). Drivers by points: if/else 36 (53 pts), ternaries 20 (44 pts), boolean chains 15, loops 3 (6 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
processInstance (cognitive 118) js/midi/smf-scheduler.js:460— processInstance has cognitive complexity 118 (threshold 15). Drivers by points: if/else 36 (53 pts), ternaries 20 (44 pts), boolean chains 15, loops 3 (6 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiFrameScheduler.processInputInstance (cognitive 71) js/midi/smf-scheduler.js:124— MidiFrameScheduler.processInputInstance has cognitive complexity 71 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 5 (19 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 34). 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.
MidiFrameScheduler.processInputInstance (cognitive 71) REDACTED:1662— MidiFrameScheduler.processInputInstance has cognitive complexity 71 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 5 (19 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 34). 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.
createUI (cognitive 43) plugins/dynamics/multiband_compressor.js:1322— createUI has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 9 (17 pts), loops 3, boolean chains 2, other 1 (nesting depth added 18). Most of this is not in the body itself: 8 of the 43 points are its own statements and the rest belongs to 21 function items inside it that branch (createControl, a function literal at line 1576, a function literal at line 1486, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
createUI (cognitive 43) plugins/dynamics/multiband_expander.js:1173— createUI has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 9 (17 pts), loops 3, boolean chains 2, other 1 (nesting depth added 18). Most of this is not in the body itself: 8 of the 43 points are its own statements and the rest belongs to 21 function items inside it that branch (createControl, a function literal at line 1415, a function literal at line 1332, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
setParameters (cognitive 40) plugins/reverb/ir_reverb.js:230— setParameters has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 10, ternaries 3 (6 pts), loops 1 (2 pts), other 1 (nesting depth added 7). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
setParameters (cognitive 40) plugins/basics/bass_management.js:142— setParameters has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 12, ternaries 5 (6 pts), loops 1 (nesting depth added 6). Of this number, 35 points are the body's own statements and 5 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.
drawHud (cognitive 37) plugins/lofi/sw_radio_simulator.js:2056— drawHud has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (14 pts), other 13, if/else 6 (7 pts), boolean chains 3 (nesting depth added 4). Of this number, 23 points are the body's own statements and 14 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
drawHud (cognitive 37) plugins/lofi/vinyl_simulator.js:1670— drawHud has cognitive complexity 37 (threshold 15). Drivers by points: other 15, ternaries 12 (13 pts), if/else 5, boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 15 of the 37 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 1735, clamp01). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_writeMidiEvents (cognitive 29) REDACTED:661— _writeMidiEvents has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 15, other 10, if/else 2 (3 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_writeMidiEvents (cognitive 29) js/audio/dsp-engine-binding.js:655— _writeMidiEvents has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 15, other 10, if/else 2 (3 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MidiFrameScheduler.prepareLiveJoin (cognitive 28) js/midi/smf-scheduler.js:413— MidiFrameScheduler.prepareLiveJoin has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 7 (9 pts), boolean chains 7, 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.
MidiFrameScheduler.prepareLiveJoin (cognitive 28) REDACTED:1951— MidiFrameScheduler.prepareLiveJoin has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 7 (9 pts), boolean chains 7, 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.
createUI (cognitive 26) plugins/eq/five_band_dynamic_eq.js:585— createUI has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (7 pts), loops 4, boolean chains 3 (nesting depth added 9). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 726, a function literal at line 710, a function literal at line 664, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
createUI (cognitive 26) plugins/eq/five_band_peq.js:364— createUI has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (7 pts), boolean chains 6, loops 2 (nesting depth added 8). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 27 function items inside it that branch (onTap, updateQControlsState, a function literal at line 646, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
update::spiralFillStyle (cognitive 23) js/visualizer/visualizer-analyzer-display.js:416— update::spiralFillStyle has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (10 pts), loops 2 (6 pts), if/else 3 (4 pts), boolean chains 3 (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.
update::sampleStyle (cognitive 20) js/visualizer/visualizer-analyzer-display.js:455— update::sampleStyle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (8 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.
constructor (cognitive 22) js/audio/power-policy-controller.js:111— constructor has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, other 6, ternaries 4, if/else 1. Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
constructor (cognitive 22) REDACTED:25— constructor has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), loops 2, other 2, error handling 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 31 function items inside it that branch (a function literal at line 31, a function literal at line 86, a function literal at line 115, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
beginScanFolder (cognitive 22) js/library/repository/web-sqlite-runtime.js:2269— beginScanFolder has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), other 7, ternaries 5, boolean chains 2 (nesting depth added 3). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 2279). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
beginScanFolder (cognitive 22) electron/library-catalog-worker.cjs:2176— beginScanFolder has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), other 7, ternaries 5, boolean chains 2 (nesting depth added 3). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 2186). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
instanceProcessSpan (cognitive 19) REDACTED:1102— instanceProcessSpan has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 7). 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.
instanceProcessSpan (cognitive 19) js/audio/dsp-engine-binding.js:1096— instanceProcessSpan has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 7). 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.
executeContextPage (cognitive 19) js/library/repository/web-sqlite-runtime.js:1046— executeContextPage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 7, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
executeContextPage (cognitive 19) electron/library-catalog-worker.cjs:1157— executeContextPage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 7, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
executePlaylistContextPage (cognitive 19) js/library/repository/web-sqlite-runtime.js:1097— executePlaylistContextPage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 7, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
executePlaylistContextPage (cognitive 19) electron/library-catalog-worker.cjs:1207— executePlaylistContextPage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 7, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
prepareAutomaticPlaylistImport (cognitive 19) js/library/repository/web-sqlite-runtime.js:1908— prepareAutomaticPlaylistImport has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (9 pts) (nesting depth added 1). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 1926). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
prepareAutomaticPlaylistImport (cognitive 19) electron/library-catalog-worker.cjs:1842— prepareAutomaticPlaylistImport has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (9 pts) (nesting depth added 1). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 1860). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
createControls::add (cognitive 19) features/measurement/ui/analysis-controller.js:215— createControls::add has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (5 pts), loops 2 (4 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.
createControls::add::apply (cognitive 17) features/measurement/ui/analysis-controller.js:234— createControls::add::apply has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5, boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commitInstances (cognitive 18) REDACTED:1849— commitInstances has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 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.
commitInstances (cognitive 18) js/midi/smf-scheduler.js:311— commitInstances has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 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.
clock (cognitive 18) REDACTED:1905— clock has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (5 pts), other 3, 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.
clock (cognitive 18) js/midi/smf-scheduler.js:367— clock has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (5 pts), other 3, 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.
_syncBandControls (cognitive 18) plugins/dynamics/multiband_compressor.js:1009— _syncBandControls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_syncBandControls (cognitive 18) plugins/dynamics/multiband_expander.js:876— _syncBandControls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateResponse (cognitive 17) plugins/eq/fifteen_band_peq.js:1123— updateResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, loops 4, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 11 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.
updateResponse (cognitive 17) plugins/eq/five_band_peq.js:846— updateResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, loops 4, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 11 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.
_designAndStage (cognitive 16) plugins/eq/group_delay_peq.js:328— _designAndStage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
_designAndStage (cognitive 16) plugins/eq/group_delay_eq.js:244— _designAndStage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
R10 · Code Duplication· Duplicated block with local edits (104 matched lines × 2 locations) · ×2
Duplicated block with local edits (104 matched lines × 2 locations) electron/ir-library-ipc.js:84— electron/ir-library-ipc.js:84 · electron/measurement-backup-ipc.cjs:39 — the two spans are one implementation copied and then locally edited — 800 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 (104 matched lines × 2 locations) js/ui/pipeline/pipeline-ai-dialog.js:26— js/ui/pipeline/pipeline-ai-dialog.js:26 · js/ui/pipeline/pipeline-routing-dialog.js:28 — the two spans are one implementation copied and then locally edited — 657 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function processInstance (cyclomatic 72, cognitive 118) js/midi/smf-scheduler.js:460— processInstance has cyclomatic complexity 72 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function processInstance (cyclomatic 72, cognitive 118) REDACTED:1998— processInstance has cyclomatic complexity 72 and cognitive complexity 118; 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.
AC1 · Text alternatives· <video> without a captions track · ×1
<video> without a captions track js/ui/audio-player/audio-context-manager.js:199— Video with no captions <track> offers no captions. Add a <track kind="captions"> pointing at a WebVTT file for this video (or confirm captions are provided another way).
AC2 · Forms & labels· <fieldset> with an empty <legend> · ×1
<fieldset> with an empty <legend> js/electron/configIntegration.js:469— The fieldset's <legend> has no text, so the control group has no name. Put descriptive text in the <legend>.
Multiple navigation landmarks without distinguishing labels REDACTED:31— With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled.
Empty <h2> heading js/remote/remote-control-dialog.js:29— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×1
Focus outline removed in CSS without a :focus replacement css/effetune.css:2846— `.preset-dialog:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
modulation.compileRegion (cyclomatic 233) js/sfz/modulation.js:127— modulation.compileRegion has cyclomatic complexity 233 (threshold 15). Of this number, 231 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.
processPipeline (cyclomatic 227) REDACTED:8315— processPipeline has cyclomatic complexity 227 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
handleWorkletMessage (cyclomatic 183) js/audio-manager.js:2619— handleWorkletMessage has cyclomatic complexity 183 (threshold 15). Of this number, 181 points are the body's own statements and 2 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
parseMusicXml (cyclomatic 160) js/midi/musicxml-parser.js:156— parseMusicXml has cyclomatic complexity 160 (threshold 15). Of this number, 149 points are the body's own statements and 11 belong to 22 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
update (cyclomatic 158) js/visualizer/visualizer-analyzer-display.js:209— update has cyclomatic complexity 158 (threshold 15). Of this number, 97 points are the body's own statements and 61 belong to 36 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
registerIpcHandlers (cyclomatic 149) electron/ipc-handlers.js:639— registerIpcHandlers has cyclomatic complexity 149 (threshold 15). Most of this is not in the body itself: 1 of the 149 points is its own statement and the rest belongs to 69 function items inside it that branch (a function literal at line 1168, a function literal at line 1027, a function literal at line 1290, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
sfz-library-ipc.registerSfzLibraryIpc (cyclomatic 142) electron/sfz-library-ipc.js:64— sfz-library-ipc.registerSfzLibraryIpc has cyclomatic complexity 142 (threshold 15). Most of this is not in the body itself: 4 of the 142 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 206, a function literal at line 238, a function literal at line 130, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
asset.packSfzAsset (cyclomatic 137) js/sfz/asset.js:137— asset.packSfzAsset has cyclomatic complexity 137 (threshold 15). Of this number, 136 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.
AudioService.command (cyclomatic 132) android/app/src/main/java/com/frieve/effetune/AudioService.java:278— AudioService.command has cyclomatic complexity 132 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rebindCurrentPlayback (cyclomatic 123) js/ui/audio-player/audio-context-manager.js:1407— rebindCurrentPlayback has cyclomatic complexity 123 (threshold 15). Of this number, 113 points are the body's own statements and 10 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smf-parser.parseSmf (cyclomatic 120) js/midi/smf-parser.js:47— smf-parser.parseSmf has cyclomatic complexity 120 (threshold 15). Of this number, 108 points are the body's own statements and 12 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawFrame (cyclomatic 119) js/visualizer/visualizer-renderer.js:130— drawFrame has cyclomatic complexity 119 (threshold 15). Of this number, 115 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
beginUserGestureResume (cyclomatic 116) js/audio/power-policy-controller.js:2649— beginUserGestureResume has cyclomatic complexity 116 (threshold 15). Of this number, 18 points are the body's own statements and 98 belong to 11 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawGraph (cyclomatic 114) plugins/analyzer/note_spectrogram.js:2076— drawGraph has cyclomatic complexity 114 (threshold 15). Of this number, 79 points are the body's own statements and 35 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
parser.parseSfz (cyclomatic 110) js/sfz/parser.js:218— parser.parseSfz has cyclomatic complexity 110 (threshold 15). Of this number, 93 points are the body's own statements and 17 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
applyPortMessage (cyclomatic 110) REDACTED:2992— applyPortMessage has cyclomatic complexity 110 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
decidePowerTarget (cyclomatic 105) js/audio/power-policy.js:721— decidePowerTarget has cyclomatic complexity 105 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawGraph (cyclomatic 103) js/visualizer/visualizer-guitar.js:346— drawGraph has cyclomatic complexity 103 (threshold 15). Of this number, 73 points are the body's own statements and 30 belong to 19 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
App.initializeAndBuildPipeline (cyclomatic 102) js/app.js:929— App.initializeAndBuildPipeline has cyclomatic complexity 102 (threshold 15). Of this number, 91 points are the body's own statements and 11 belong to 4 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.
renderLibrary (cyclomatic 101) js/network-music/view.js:557— renderLibrary has cyclomatic complexity 101 (threshold 15). Of this number, 87 points are the body's own statements and 14 belong to 44 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dataStorage.hasValidImportedScalars (cyclomatic 97) features/measurement/dataStorage.js:130— dataStorage.hasValidImportedScalars has cyclomatic complexity 97 (threshold 15). Of this number, 82 points are the body's own statements and 15 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
serve (cyclomatic 95) REDACTED:327— serve has cyclomatic complexity 95 (threshold 15). Of this number, 82 points are the body's own statements and 13 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
telemetry.decodeRhythmAnalyzer (cyclomatic 94) dsp/bindings/js/src/telemetry.js:596— telemetry.decodeRhythmAnalyzer has cyclomatic complexity 94 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
drawGroove (cyclomatic 94) plugins/analyzer/rhythm_analyzer.js:1475— drawGroove has cyclomatic complexity 94 (threshold 15). Of this number, 73 points are the body's own statements and 21 belong to 24 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
apply (cyclomatic 92) js/visualizer/visualizer-effects.js:246— apply has cyclomatic complexity 92 (threshold 15). Of this number, 90 points are the body's own statements and 2 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createPagedRow (cyclomatic 90) js/ui/library/library-view.js:2746— createPagedRow has cyclomatic complexity 90 (threshold 15). Of this number, 84 points are the body's own statements and 6 belong to 41 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
configIntegration.showConfigDialog (cyclomatic 89) js/electron/configIntegration.js:55— configIntegration.showConfigDialog has cyclomatic complexity 89 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 6 other methods here (configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderNetworkStatus, configIntegration.showConfigDialog::renderAirPlayStatus, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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.
advanceSfzSampleForecast (cyclomatic 85) REDACTED:5589— advanceSfzSampleForecast has cyclomatic complexity 85 (threshold 15). Of this number, 71 points are the body's own statements and 14 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
prepare (cyclomatic 84) js/ui/audio-player/rolling-pcm-transport.js:134— prepare has cyclomatic complexity 84 (threshold 15). Of this number, 79 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
createBrowserController (cyclomatic 83) electron/browser-controller.cjs:177— createBrowserController has cyclomatic complexity 83 (threshold 15). Most of this is not in the body itself: 5 of the 83 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 900, 760, 882, …). 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.
handleWorkletPowerEvent (cyclomatic 82) js/audio/power-policy-controller.js:2057— handleWorkletPowerEvent has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawCellContent (cyclomatic 81) plugins/analyzer/analog_meter.js:842— drawCellContent has cyclomatic complexity 81 (threshold 15). Of this number, 71 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RhythmAnalyzerPlugin.readSnapshot (cyclomatic 79) plugins/analyzer/rhythm_analyzer.js:387— RhythmAnalyzerPlugin.readSnapshot has cyclomatic complexity 79 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
preset.prepareLegacyParametersV1 (cyclomatic 78) dsp/bindings/js/src/preset.js:416— preset.prepareLegacyParametersV1 has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MidiMappings.apply (cyclomatic 77) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:254— MidiMappings.apply has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawGraph (cyclomatic 77) plugins/analyzer/spectrogram.js:1239— drawGraph has cyclomatic complexity 77 (threshold 15). Of this number, 59 points are the body's own statements and 18 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AvTransportPlayers.command (cyclomatic 76) electron/network-music-av-player.cjs:99— AvTransportPlayers.command has cyclomatic complexity 76 (threshold 15). Of this number, 72 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
handlePortMessage (cyclomatic 76) REDACTED:2830— handlePortMessage has cyclomatic complexity 76 (threshold 15). Of this number, 68 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawMeter (cyclomatic 76) plugins/analyzer/stereo_meter.js:548— drawMeter has cyclomatic complexity 76 (threshold 15). Of this number, 49 points are the body's own statements and 27 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createControls (cyclomatic 75) features/measurement/ui/analysis-controller.js:211— createControls has cyclomatic complexity 75 (threshold 15). Of this number, 16 points are the body's own statements and 59 belong to 13 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
design-core.designRoomEq (cyclomatic 74) js/room-eq/design-core.js:2492— design-core.designRoomEq has cyclomatic complexity 74 (threshold 15). Of this number, 70 points are the body's own statements and 4 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.
LibraryView.renderPagedCommitted::renderWindow (cyclomatic 70) js/ui/library/library-view.js:1935— LibraryView.renderPagedCommitted::renderWindow has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OscilloscopePlugin.parseDspScopeTelemetryFrame (cyclomatic 70) plugins/analyzer/oscilloscope.js:682— OscilloscopePlugin.parseDspScopeTelemetryFrame has cyclomatic complexity 70 (threshold 15). Of this number, 68 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
presets._prepare_legacy_parameters_v1 (cyclomatic 70) dsp/bindings/python/src/effetune/presets.py:291— presets._prepare_legacy_parameters_v1 has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
getSnapshot (cyclomatic 70) js/ui/audio-player/openhome-playback-adapter.js:1134— getSnapshot has cyclomatic complexity 70 (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.
playAndRecordSweep (cyclomatic 70) features/measurement/measurement-controller/audio-processing.js:168— playAndRecordSweep has cyclomatic complexity 70 (threshold 15). Most of this is not in the body itself: 3 of the 70 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 190, (anonymous)::onmessage, (anonymous)::finishRecording, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
parser.normalizeRegion (cyclomatic 69) js/sfz/parser.js:116— parser.normalizeRegion has cyclomatic complexity 69 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
rolling-pcm-transport.isValidReadyMessage (cyclomatic 69) js/ui/audio-player/rolling-pcm-transport.js:1304— rolling-pcm-transport.isValidReadyMessage has cyclomatic complexity 69 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MidiMappingStore.validateMapping (cyclomatic 68) js/midi/midi-mapping-store.js:203— MidiMappingStore.validateMapping has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
parameters (cyclomatic 68) js/visualizer/visualizer-editor.js:803— parameters has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
renderPagedCommitted (cyclomatic 67) js/ui/library/library-view.js:1814— renderPagedCommitted has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MainActivity.dispatch (cyclomatic 66) android/app/src/main/java/com/frieve/effetune/MainActivity.java:172— MainActivity.dispatch has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_handleMessage (cyclomatic 66) REDACTED:181— _handleMessage has cyclomatic complexity 66 (threshold 15). Of this number, 65 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.
processAudioFile (cyclomatic 66) js/audio/offline-processor.js:55— processAudioFile has cyclomatic complexity 66 (threshold 15). Of this number, 61 points are the body's own statements and 5 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
executeCommand (cyclomatic 66) electron/network-music-host.cjs:338— executeCommand has cyclomatic complexity 66 (threshold 15). Of this number, 65 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LevelMeterPlugin.updateMeter (cyclomatic 65) plugins/analyzer/level_meter.js:521— LevelMeterPlugin.updateMeter has cyclomatic complexity 65 (threshold 15). Of this number, 53 points are the body's own statements and 12 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.
commitPreparedTrackCandidate (cyclomatic 65) js/ui/audio-player/audio-context-manager.js:5838— commitPreparedTrackCandidate has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MidiMixerDisplay.draw (cyclomatic 64) js/visualizer/visualizer-midi-mixer.js:31— MidiMixerDisplay.draw has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
design-utils.designPEQ (cyclomatic 64) features/measurement/peq-calculator/design-utils.js:139— design-utils.designPEQ has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PlaybackManager.initKeyboardShortcuts (cyclomatic 64) js/ui/audio-player/playback-manager.js:2514— PlaybackManager.initKeyboardShortcuts has cyclomatic complexity 64 (threshold 15). Most of this is not in the body itself: 10 of the 64 points are its own statements and the rest belongs to one function literal inside it that branches (line 2517). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
configurePowerPolicy (cyclomatic 64) REDACTED:4123— configurePowerPolicy has cyclomatic complexity 64 (threshold 15). Of this number, 61 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Discovery.receive (cyclomatic 63) electron/network-music-upnp.cjs:311— Discovery.receive has cyclomatic complexity 63 (threshold 15). Of this number, 62 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.
initKeyboardShortcuts::keydownHandler (cyclomatic 63) js/ui/audio-player/playback-manager.js:2517— initKeyboardShortcuts::keydownHandler has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawWaveform (cyclomatic 63) plugins/analyzer/oscilloscope.js:1018— drawWaveform has cyclomatic complexity 63 (threshold 15). Of this number, 60 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
telemetry.decodeOscilloscope (cyclomatic 62) dsp/bindings/js/src/telemetry.js:105— telemetry.decodeOscilloscope has cyclomatic complexity 62 (threshold 15). Of this number, 60 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
design-core.synthesizeFilter (cyclomatic 62) js/room-eq/design-core.js:1747— design-core.synthesizeFilter has cyclomatic complexity 62 (threshold 15). Of this number, 54 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
visualizer-lyrics.drawLyrics (cyclomatic 61) js/visualizer/visualizer-lyrics.js:87— visualizer-lyrics.drawLyrics has cyclomatic complexity 61 (threshold 15). Of this number, 51 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
remote-client-window.registerIntegratedRemoteClientIpc (cyclomatic 60) electron/remote-client-window.cjs:121— remote-client-window.registerIntegratedRemoteClientIpc has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 7 of the 60 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 175, saveConnection, a function literal at line 241, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
wrd-parser.parseWrd (cyclomatic 60) js/midi/wrd-parser.js:40— wrd-parser.parseWrd has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (wrd-parser.parseWrd::escape) 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.
AudioManager.enableParallelPipelines (cyclomatic 60) js/audio-manager.js:4192— AudioManager.enableParallelPipelines has cyclomatic complexity 60 (threshold 15). Of this number, 45 points are the body's own statements and 15 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
activatePreparedTrackTransition (cyclomatic 60) js/ui/audio-player/audio-context-manager.js:5325— activatePreparedTrackTransition has cyclomatic complexity 60 (threshold 15). Of this number, 40 points are the body's own statements and 20 belong to 10 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
peak-detection.findPeaksDips (cyclomatic 59) features/measurement/peq-calculator/peak-detection.js:13— peak-detection.findPeaksDips has cyclomatic complexity 59 (threshold 15). Of this number, 58 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.
setParameters (cyclomatic 59) plugins/eq/room_eq.js:1183— setParameters has cyclomatic complexity 59 (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.
drawVisualizerRhythm (cyclomatic 59) plugins/analyzer/rhythm_analyzer.js:1315— drawVisualizerRhythm has cyclomatic complexity 59 (threshold 15). Of this number, 41 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
fitPEQ (cyclomatic 59) features/measurement/peq-calculator/optimization.js:498— fitPEQ has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
setPowerProcessingState (cyclomatic 58) REDACTED:4306— setPowerProcessingState has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
prepareProcessor (cyclomatic 58) js/pipeline-analyzer/analysis-worker.js:225— prepareProcessor has cyclomatic complexity 58 (threshold 15). Of this number, 28 points are the body's own statements and 30 belong to 15 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
assets.prepareFirFilterAsset (cyclomatic 56) dsp/bindings/js/src/assets.js:693— assets.prepareFirFilterAsset has cyclomatic complexity 56 (threshold 15). Of this number, 51 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
offscreen.handle (cyclomatic 56) extension/offscreen.js:200— offscreen.handle has cyclomatic complexity 56 (threshold 15). Of this number, 54 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.
PcmDecoder.decode (cyclomatic 56) android/app/src/main/java/com/frieve/effetune/PcmDecoder.java:44— PcmDecoder.decode has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawHud (cyclomatic 56) plugins/lofi/fm_radio_simulator.js:1353— drawHud has cyclomatic complexity 56 (threshold 15). Of this number, 51 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawGraph (cyclomatic 56) plugins/basics/bass_management.js:1136— drawGraph has cyclomatic complexity 56 (threshold 15). Of this number, 53 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UIEventHandler.setupParameterOperationEvents (cyclomatic 55) js/ui/pipeline/ui-event-handler.js:175— UIEventHandler.setupParameterOperationEvents has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 2 of the 55 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 232, a function literal at line 180, a function literal at line 188, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
audioIntegration.showAudioConfigDialog::applyPreferences (cyclomatic 55) js/electron/audioIntegration.js:580— audioIntegration.showAudioConfigDialog::applyPreferences has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (audioIntegration.showAudioConfigDialog) 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.
computeDspLatencyPlan (cyclomatic 55) REDACTED:6312— computeDspLatencyPlan has cyclomatic complexity 55 (threshold 15). Of this number, 53 points are the body's own statements and 2 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AvTransportPlayers.read (cyclomatic 53) electron/network-music-av-player.cjs:22— AvTransportPlayers.read has cyclomatic complexity 53 (threshold 15). Of this number, 51 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AnalysisController.refresh (cyclomatic 53) features/measurement/ui/analysis-controller.js:548— AnalysisController.refresh has cyclomatic complexity 53 (threshold 15). Of this number, 51 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
browser-preload.installMediaWatcher (cyclomatic 52) electron/browser-preload.js:237— browser-preload.installMediaWatcher has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 10 of the 52 points are its own statements and the rest belongs to 7 function items inside it that branch (snapshot, update, onMediaEvent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AudioContextManager.playAudioElement (cyclomatic 52) js/ui/audio-player/audio-context-manager.js:2892— AudioContextManager.playAudioElement has cyclomatic complexity 52 (threshold 15). Of this number, 34 points are the body's own statements and 18 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
asset-library-browser.openAssetLibraryBrowser (cyclomatic 52) js/ui/asset-library-browser.js:37— asset-library-browser.openAssetLibraryBrowser has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 8 of the 52 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 547, 475, 427, …). 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.
sample-stream-worker.attachSfzSampleStreamWorker (cyclomatic 52) js/sfz/sample-stream-worker.js:74— sample-stream-worker.attachSfzSampleStreamWorker has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 10 of the 52 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 112, directRead, a function literal at line 104, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_resolveVisualSyncDue (cyclomatic 52) js/audio-manager.js:2272— _resolveVisualSyncDue has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
controlDomain (cyclomatic 52) features/measurement/ui/analysis-controller.js:390— controlDomain has cyclomatic complexity 52 (threshold 15). Of this number, 51 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
modulation-schema.targetFor (cyclomatic 51) js/sfz/modulation-schema.js:288— modulation-schema.targetFor has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
effects.compileSfzEffects (cyclomatic 51) js/sfz/effects.js:83— effects.compileSfzEffects has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
archive.openArchive (cyclomatic 51) js/user-data-backup/archive.js:204— archive.openArchive has cyclomatic complexity 51 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioManager._finalizeParallelDspBarrier (cyclomatic 51) js/audio-manager.js:1524— AudioManager._finalizeParallelDspBarrier has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 3 of the 51 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 1549, a function literal at line 1707, startTransition::assetExpectationsActive, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AudioService.dispatchRemote (cyclomatic 51) android/app/src/main/java/com/frieve/effetune/AudioService.java:1011— AudioService.dispatchRemote has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_pollTick (cyclomatic 51) js/audio/audio-io-manager.js:968— _pollTick has cyclomatic complexity 51 (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.
_collectFacts (cyclomatic 50) js/audio/power-policy-controller.js:881— _collectFacts has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createPlayerUI (cyclomatic 50) js/ui/audio-player/audio-player-ui.js:438— createPlayerUI has cyclomatic complexity 50 (threshold 15). Of this number, 22 points are the body's own statements and 28 belong to 38 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
postMidiTransport::listener (cyclomatic 50) js/ui/audio-player/midi-playback.js:133— postMidiTransport::listener has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sample-stream.pcmMetadata (cyclomatic 49) js/sfz/sample-stream.js:10— sample-stream.pcmMetadata has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
prepareTemporalStateAndResume (cyclomatic 49) REDACTED:4448— prepareTemporalStateAndResume has cyclomatic complexity 49 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
importLegacyPreset (cyclomatic 49) dsp/bindings/js/src/preset.js:617— importLegacyPreset has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
remote-music-dispatcher.validate (cyclomatic 48) electron/remote-music-dispatcher.cjs:56— remote-music-dispatcher.validate has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ess.analyzeEssRecording (cyclomatic 48) js/utils/measurement-dsp/ess.js:113— ess.analyzeEssRecording has cyclomatic complexity 48 (threshold 15). Of this number, 39 points are the body's own statements and 9 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.
smoothing.smoothLog (cyclomatic 48) features/measurement/peq-calculator/smoothing.js:12— smoothing.smoothLog has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app.setupEventConnections (cyclomatic 48) features/measurement/app.js:329— app.setupEventConnections has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 1 of the 48 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 331, 554, 523, …). 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.
SfzSampleStream.open (cyclomatic 48) js/sfz/sample-stream.js:84— SfzSampleStream.open has cyclomatic complexity 48 (threshold 15). Of this number, 40 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
telemetry._decode_rhythm_analyzer (cyclomatic 48) dsp/bindings/python/src/effetune/telemetry.py:991— telemetry._decode_rhythm_analyzer has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawGrid (cyclomatic 48) plugins/analyzer/spectrum_analyzer.js:1053— drawGrid has cyclomatic complexity 48 (threshold 15). Of this number, 32 points are the body's own statements and 16 belong to 4 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.
#handlePlayback (cyclomatic 48) js/library/operations/web-library-service-coordinator.js:461— #handlePlayback has cyclomatic complexity 48 (threshold 15). Of this number, 40 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
power-snapshot.validateStatePreparation (cyclomatic 47) js/audio/power-snapshot.js:740— power-snapshot.validateStatePreparation has cyclomatic complexity 47 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
OfflineProcessor.createOfflineDspSession (cyclomatic 47) js/audio/offline-processor.js:435— OfflineProcessor.createOfflineDspSession has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
requestInputRelease (cyclomatic 47) js/audio/power-policy-controller.js:3175— requestInputRelease has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
executeAction (cyclomatic 47) js/ui/audio-player/openhome-playback-adapter.js:415— executeAction has cyclomatic complexity 47 (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.
handlePlaybackOperation (cyclomatic 47) electron/library-service-coordinator.cjs:593— handlePlaybackOperation has cyclomatic complexity 47 (threshold 15). Of this number, 39 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnalyzerDisplay.draw (cyclomatic 46) js/visualizer/visualizer-analyzer-display.js:492— AnalyzerDisplay.draw 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.
stageOfflineDspAssets (cyclomatic 46) js/audio/offline-processor.js:619— stageOfflineDspAssets has cyclomatic complexity 46 (threshold 15). Of this number, 41 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
visualizer-counter.drawCounter (cyclomatic 45) js/visualizer/visualizer-counter.js:90— visualizer-counter.drawCounter has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 9 of the 45 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 122, a function literal at line 172, alignPaint, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AnalysisController.syncControls (cyclomatic 45) features/measurement/ui/analysis-controller.js:474— AnalysisController.syncControls has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_handleSfzRuntimeMessage (cyclomatic 45) js/audio/audio-manager-sfz-runtime.js:284— _handleSfzRuntimeMessage has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
asset.sfzAssetTailSeconds (cyclomatic 44) js/sfz/asset.js:47— asset.sfzAssetTailSeconds has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataStorage.importMeasurementFromJSON (cyclomatic 44) features/measurement/dataStorage.js:1333— DataStorage.importMeasurementFromJSON 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.
rolling-pcm-policy.deriveRollingProductionSelection (cyclomatic 44) REDACTED:621— rolling-pcm-policy.deriveRollingProductionSelection has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NetworkMusicView.handleLibraryKeyDown (cyclomatic 44) js/network-music/view.js:907— NetworkMusicView.handleLibraryKeyDown has cyclomatic complexity 44 (threshold 15). Of this number, 43 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.
presets.import_legacy_preset (cyclomatic 44) dsp/bindings/python/src/effetune/presets.py:705— presets.import_legacy_preset 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.
prepareMidiTransport (cyclomatic 44) js/ui/audio-player/midi-playback.js:308— prepareMidiTransport has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 8 of the 44 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 325, a function literal at line 365, (anonymous)::(anonymous)::beforeReplay, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
importFolderFiles (cyclomatic 44) js/sfz/service.js:305— importFolderFiles has cyclomatic complexity 44 (threshold 15). Of this number, 33 points are the body's own statements and 11 belong to 19 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lyrics-timeline.getMidiLyricsData (cyclomatic 43) js/midi/lyrics-timeline.js:16— lyrics-timeline.getMidiLyricsData has cyclomatic complexity 43 (threshold 15). Of this number, 42 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dialog.openUserDataBackupDialog.renderList (cyclomatic 43) js/user-data-backup/dialog.js:320— dialog.openUserDataBackupDialog.renderList has cyclomatic complexity 43 (threshold 15). Of this number, 37 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
playlist-stream.parseXspfRecords (cyclomatic 43) js/library/playlists/playlist-stream.js:365— playlist-stream.parseXspfRecords has cyclomatic complexity 43 (threshold 15). Of this number, 38 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
updateMidiPendingDemand (cyclomatic 43) REDACTED:8037— updateMidiPendingDemand has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawHud (cyclomatic 43) plugins/lofi/am_radio_simulator.js:2256— drawHud has cyclomatic complexity 43 (threshold 15). Of this number, 29 points are the body's own statements and 14 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.
_drawEdcGraph (cyclomatic 43) plugins/reverb/ir_reverb.js:1853— _drawEdcGraph has cyclomatic complexity 43 (threshold 15). Of this number, 38 points are the body's own statements and 5 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
initAudioContext (cyclomatic 43) js/audio/audio-context-manager.js:128— initAudioContext has cyclomatic complexity 43 (threshold 15). Of this number, 32 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
openUserDataBackupDialog.renderList (cyclomatic 43) js/user-data-backup/dialog.js:320— openUserDataBackupDialog.renderList has cyclomatic complexity 43 (threshold 15). Of this number, 37 points are the body's own statements and 6 belong to 8 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.
RemoteControlHost.onMessage (cyclomatic 42) electron/remote-control-host.cjs:1050— RemoteControlHost.onMessage has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ir-library-ipc.registerIrLibraryIpc (cyclomatic 42) electron/ir-library-ipc.js:128— ir-library-ipc.registerIrLibraryIpc has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 4 of the 42 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 291, a function literal at line 175, getNamespace, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AudioIOManager.initAudioInput (cyclomatic 42) js/audio/audio-io-manager.js:355— AudioIOManager.initAudioInput has cyclomatic complexity 42 (threshold 15). Of this number, 40 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ModalResonatorPlugin.setParameters (cyclomatic 42) plugins/resonator/modal_resonator.js:325— ModalResonatorPlugin.setParameters has cyclomatic complexity 42 (threshold 15). Of this number, 28 points are the body's own statements and 14 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
openPagedAddToPlaylistMenu (cyclomatic 42) js/ui/library/library-view-menus.js:22— openPagedAddToPlaylistMenu has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 3 of the 42 points are its own statements and the rest belongs to 24 function items inside it that branch (openQuery, a function literal at line 102, loadPage, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
visualizer-lyrics.lyricsFrame (cyclomatic 41) js/visualizer/visualizer-lyrics.js:32— visualizer-lyrics.lyricsFrame has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AndroidAudioManager.hydratePipeline (cyclomatic 41) js/android/audio-manager.js:78— AndroidAudioManager.hydratePipeline has cyclomatic complexity 41 (threshold 15). Of this number, 25 points are the body's own statements and 16 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
compiler.compileSf2 (cyclomatic 41) js/sf2/compiler.js:87— compiler.compileSf2 has cyclomatic complexity 41 (threshold 15). Of this number, 40 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.
NoteSpectrogramPlugin.handleTimbreTelemetry (cyclomatic 41) plugins/analyzer/note_spectrogram.js:640— NoteSpectrogramPlugin.handleTimbreTelemetry has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioService.applyPipeline (cyclomatic 41) android/app/src/main/java/com/frieve/effetune/AudioService.java:485— AudioService.applyPipeline has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MidiMappings.dispatch (cyclomatic 41) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:153— MidiMappings.dispatch has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reconcileDspPlugin (cyclomatic 41) REDACTED:4971— reconcileDspPlugin has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
prepareNextTrackBufferForTrack (cyclomatic 41) js/ui/audio-player/audio-context-manager.js:4691— prepareNextTrackBufferForTrack has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
executeAvTransport (cyclomatic 41) js/ui/audio-player/openhome-playback-adapter.js:528— executeAvTransport has cyclomatic complexity 41 (threshold 15). Of this number, 39 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawGraph (cyclomatic 41) plugins/eq/narrow_range.js:530— drawGraph has cyclomatic complexity 41 (threshold 15). Of this number, 19 points are the body's own statements and 22 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NetworkMusicHost.browseShared (cyclomatic 40) electron/network-music-host.cjs:555— NetworkMusicHost.browseShared has cyclomatic complexity 40 (threshold 15). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
archive.inspectZip (cyclomatic 40) js/user-data-backup/archive.js:29— archive.inspectZip has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
VisualizerView.playback (cyclomatic 40) REDACTED:440— VisualizerView.playback has cyclomatic complexity 40 (threshold 15). Of this number, 31 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
optimization.calculateJacobian (cyclomatic 40) features/measurement/peq-calculator/optimization.js:167— optimization.calculateJacobian 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.
LogicalSelection.setSelected (cyclomatic 40) js/ui/library/logical-selection.js:79— LogicalSelection.setSelected 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.
remote-client.startRemoteClient (cyclomatic 40) js/remote/remote-client.js:126— remote-client.startRemoteClient has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 14 of the 40 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 358, a function literal at line 385, a function literal at line 130, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ogg-vorbis.decodeOggVorbisFrames (cyclomatic 40) js/sf2/ogg-vorbis.js:122— ogg-vorbis.decodeOggVorbisFrames 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.
frequency-axis.shadeKeyboard (cyclomatic 40) plugins/frequency-axis.js:67— frequency-axis.shadeKeyboard has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 14 of the 40 points are its own statements and the rest belongs to 10 function items inside it that branch (rect, a function literal at line 134, fillDepthGradient, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Stream.__init__ (cyclomatic 40) dsp/bindings/python/src/effetune/chain.py:364— Stream.__init__ 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.
processNetworkOutputStage (cyclomatic 40) REDACTED:3485— processNetworkOutputStage 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.
processOfflineHybridBlock (cyclomatic 40) js/audio/offline-processor.js:969— processOfflineHybridBlock 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.
_renderMixer (cyclomatic 40) plugins/others/soundfont_player.js:800— _renderMixer 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.
drawGraph (cyclomatic 40) plugins/eq/tonal_balance_eq.js:759— drawGraph has cyclomatic complexity 40 (threshold 15). Of this number, 29 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
library-shared-query.querySharedLibrary (cyclomatic 39) electron/library-shared-query.cjs:22— library-shared-query.querySharedLibrary has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
visualizer-model.validateLayout (cyclomatic 39) js/visualizer/visualizer-model.js:704— visualizer-model.validateLayout has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 10 of the 39 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 733, same). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
analysis.validateHarmonicAnalysis (cyclomatic 39) js/utils/measurement-dsp/analysis.js:11— analysis.validateHarmonicAnalysis has cyclomatic complexity 39 (threshold 15). Of this number, 25 points are the body's own statements and 14 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
UserDataBackupService.restore (cyclomatic 39) js/user-data-backup/service.js:175— UserDataBackupService.restore has cyclomatic complexity 39 (threshold 15). Of this number, 38 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.
smf-timeline.applyMidiEvent (cyclomatic 39) js/midi/smf-timeline.js:24— smf-timeline.applyMidiEvent has cyclomatic complexity 39 (threshold 15). Of this number, 36 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MidiMixerDisplay.drawLevel (cyclomatic 39) js/visualizer/visualizer-midi-mixer.js:172— MidiMixerDisplay.drawLevel has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MeasurementController.startNewMeasurementOperation (cyclomatic 39) features/measurement/measurement-controller/index.js:179— MeasurementController.startNewMeasurementOperation has cyclomatic complexity 39 (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.
AnalysisController.draw (cyclomatic 39) features/measurement/ui/analysis-controller.js:754— AnalysisController.draw has cyclomatic complexity 39 (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.
riff-info.parsePcmWaveFormatFromBytes (cyclomatic 39) js/library/metadata/riff-info.js:86— riff-info.parsePcmWaveFormatFromBytes has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sync-ops.validateOps (cyclomatic 39) js/remote/sync-ops.mjs:65— sync-ops.validateOps has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NoteSpectrogramPlugin.handleTelemetry (cyclomatic 39) plugins/analyzer/note_spectrogram.js:1196— NoteSpectrogramPlugin.handleTelemetry has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PitchMeterPlugin.drawGraph (cyclomatic 39) plugins/analyzer/pitch_meter.js:545— PitchMeterPlugin.drawGraph has cyclomatic complexity 39 (threshold 15). Of this number, 38 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.
SubSynthPlugin.setParameters (cyclomatic 39) plugins/saturation/sub_synth.js:271— SubSynthPlugin.setParameters has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_finishPowerRender (cyclomatic 39) REDACTED:7426— _finishPowerRender has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
getInjectedNativePcmWaveContract (cyclomatic 39) js/ui/audio-player/audio-context-manager.js:4170— getInjectedNativePcmWaveContract has cyclomatic complexity 39 (threshold 15). Of this number, 29 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_applyWorkletState (cyclomatic 39) js/audio/power-policy-controller.js:1674— _applyWorkletState has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
render (cyclomatic 39) js/visualizer/visualizer-editor.js:548— render has cyclomatic complexity 39 (threshold 15). Of this number, 31 points are the body's own statements and 8 belong to 22 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.
_drawLane (cyclomatic 39) plugins/analyzer/rhythm_analyzer.js:1796— _drawLane has cyclomatic complexity 39 (threshold 15). Of this number, 28 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
#playPrevious (cyclomatic 39) js/ui/audio-player/playback-manager.js:1762— #playPrevious has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawHud (cyclomatic 39) plugins/lofi/vinyl_simulator.js:1670— drawHud has cyclomatic complexity 39 (threshold 15). Of this number, 17 points are the body's own statements and 22 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_drawGraph (cyclomatic 39) plugins/eq/five_band_dynamic_eq.js:1016— _drawGraph has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs 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.
createBrowserController.guardPage (cyclomatic 39) electron/browser-controller.cjs:542— createBrowserController.guardPage has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 3 of the 39 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 557, a function literal at line 579, a function literal at line 603, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
parser.validateExtraOpcode (cyclomatic 38) js/sfz/parser.js:33— parser.validateExtraOpcode 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.
parser.parseSf2 (cyclomatic 38) js/sf2/parser.js:17— parser.parseSf2 has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
browser-controller.createBrowserController.guardPage (cyclomatic 38) electron/browser-controller.cjs:542— browser-controller.createBrowserController.guardPage has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 3 of the 38 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 557, a function literal at line 579, a function literal at line 572, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
NetworkOutputHost.handlePortMessage (cyclomatic 38) electron/network-output-host.cjs:909— NetworkOutputHost.handlePortMessage has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
visualizer-model.normalizeParams (cyclomatic 38) js/visualizer/visualizer-model.js:335— visualizer-model.normalizeParams has cyclomatic complexity 38 (threshold 15). Of this number, 34 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VisualizerEditor.onStageKeyDown (cyclomatic 38) js/visualizer/visualizer-editor.js:1755— VisualizerEditor.onStageKeyDown has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
signal-processing.calculateFFT (cyclomatic 38) features/measurement/audio-utils/signal-processing.js:15— signal-processing.calculateFFT has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FifteenBandPEQPlugin.createUI (cyclomatic 38) plugins/eq/fifteen_band_peq.js:457— FifteenBandPEQPlugin.createUI has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 7 of the 38 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 759, a function literal at line 895, a function literal at line 631, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
GraphStream.__init__ (cyclomatic 38) dsp/bindings/python/src/effetune/graph.py:429— GraphStream.__init__ has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
applySoundFontMixerAction (cyclomatic 38) REDACTED:7766— applySoundFontMixerAction has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
openWebPlaybackSelection (cyclomatic 38) js/ui-manager.js:1775— openWebPlaybackSelection has cyclomatic complexity 38 (threshold 15). Of this number, 31 points are the body's own statements and 7 belong to 10 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.
_drawChordLane (cyclomatic 38) plugins/analyzer/note_spectrogram.js:1954— _drawChordLane has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
renderGraph (cyclomatic 38) js/pipeline-analyzer/ui.js:1402— renderGraph has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs 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.
initDragAndDrop (cyclomatic 38) js/ui/pipeline/ui-event-handler.js:337— initDragAndDrop has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 5 of the 38 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 473, a function literal at line 421, a function literal at line 465, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
evaluateRollingEligibility (cyclomatic 38) REDACTED:385— evaluateRollingEligibility 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.
showTrackProperties (cyclomatic 38) js/ui/library/library-view-menus.js:419— showTrackProperties has cyclomatic complexity 38 (threshold 15). Of this number, 33 points are the body's own statements and 5 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileProcessor.setupFileDropHandlers (cyclomatic 37) js/ui/pipeline/file-processor.js:221— FileProcessor.setupFileDropHandlers has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 223, 273, 334, …). 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.
PowerPolicyController._applyDecision (cyclomatic 37) js/audio/power-policy-controller.js:1237— PowerPolicyController._applyDecision has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cue-sheet.parseCueSheet (cyclomatic 37) js/library/metadata/cue-sheet.js:25— cue-sheet.parseCueSheet 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.
RollingPcmTransport.acceptFragment (cyclomatic 37) js/ui/audio-player/rolling-pcm-transport.js:671— RollingPcmTransport.acceptFragment has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
playback-selection-router.resolveWebPlaybackSelection (cyclomatic 37) js/ui/playback-selection-router.js:17— playback-selection-router.resolveWebPlaybackSelection has cyclomatic complexity 37 (threshold 15). Of this number, 32 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.
presetIntegration.openPresetFile (cyclomatic 37) js/electron/presetIntegration.js:40— presetIntegration.openPresetFile 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.
NativeParameterPacker.packRecord (cyclomatic 37) android/app/src/main/java/com/frieve/effetune/NativeParameterPacker.java:124— NativeParameterPacker.packRecord 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.
receiveOperation (cyclomatic 37) electron/library-catalog-worker.cjs:1687— receiveOperation has cyclomatic complexity 37 (threshold 15). Of this number, 28 points are the body's own statements and 9 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. This is NOT this file's highest cyclomatic complexity: dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
drawHud (cyclomatic 37) plugins/lofi/tv_audio_simulator.js:1939— drawHud has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
createWindow (cyclomatic 37) electron/main.js:570— createWindow has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 3 of the 37 points are its own statements and the rest belongs to 29 function items inside it that branch (finalizeClose, a function literal at line 856, isMidiAppFrame, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
initializeApp (cyclomatic 37) electron/main.js:1318— initializeApp has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 14 of the 37 points are its own statements and the rest belongs to 37 function items inside it that branch (approvePairing, getCatalog, getDesktopPowerStatus, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_renderStatus (cyclomatic 37) plugins/others/soundfont_player.js:327— _renderStatus has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
library-metadata-worker.validateParseMessage (cyclomatic 36) electron/library-metadata-worker.cjs:62— library-metadata-worker.validateParseMessage has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PresetManager.loadPreset (cyclomatic 36) js/ui/pipeline/preset-manager.js:278— PresetManager.loadPreset has cyclomatic complexity 36 (threshold 15). Of this number, 20 points are the body's own statements and 16 belong to 6 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.
MobileNumberKeypad.constructor (cyclomatic 36) js/ui/mobile-number-keypad.js:118— MobileNumberKeypad.constructor has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 188, 162, 141, …). 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.
effetune_bench.html.runBenchmarks (cyclomatic 36) features/effetune_bench.html:937— effetune_bench.html.runBenchmarks 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.
asset-library-browser.openAssetLibraryBrowser.render (cyclomatic 36) js/ui/asset-library-browser.js:172— asset-library-browser.openAssetLibraryBrowser.render has cyclomatic complexity 36 (threshold 15). Of this number, 17 points are the body's own statements and 19 belong to 4 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.
server.createServer (cyclomatic 36) mcp/src/server.mjs:90— server.createServer has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 3 of the 36 points are its own statements and the rest belongs to 14 function items inside it that branch (musicRequest, stageId, descriptions, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MeasurementCapture.command (cyclomatic 36) android/app/src/main/java/com/frieve/effetune/MeasurementCapture.java:40— MeasurementCapture.command 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· field (cyclomatic 36) · ×1
field (cyclomatic 36) js/visualizer/visualizer-editor.js:400— field has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 belong to 11 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
parseTelemetryFrame (cyclomatic 36) plugins/analyzer/note_spectrogram.js:832— parseTelemetryFrame has cyclomatic complexity 36 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
drawHud (cyclomatic 36) plugins/lofi/sw_radio_simulator.js:2056— drawHud has cyclomatic complexity 36 (threshold 15). Of this number, 22 points are the body's own statements and 14 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.
parseDidlLite (cyclomatic 36) js/ui/audio-player/openhome-playback-adapter.js:1395— parseDidlLite has cyclomatic complexity 36 (threshold 15). Of this number, 28 points are the body's own statements and 8 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_startSfzSampleStream (cyclomatic 36) js/audio/audio-manager-sfz-runtime.js:398— _startSfzSampleStream has cyclomatic complexity 36 (threshold 15). Of this number, 16 points are the body's own statements and 20 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
multires-spectrum.decode (cyclomatic 35) plugins/multires-spectrum.js:91— multires-spectrum.decode 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.
power-policy.getMaximumRoutedSilenceStatus (cyclomatic 35) js/audio/power-policy.js:436— power-policy.getMaximumRoutedSilenceStatus has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
audioIntegration.showAudioConfigDialog (cyclomatic 35) js/electron/audioIntegration.js:186— audioIntegration.showAudioConfigDialog has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (audioIntegration.showAudioConfigDialog::applyPreferences) 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.
IntegratedRemoteEffects.acceptFrame (cyclomatic 35) js/remote/integrated-remote-effects.js:207— IntegratedRemoteEffects.acceptFrame has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 222, 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.
RhythmAnalyzerPlugin.advanceClock (cyclomatic 35) plugins/analyzer/rhythm_analyzer.js:720— RhythmAnalyzerPlugin.advanceClock has cyclomatic complexity 35 (threshold 15). Of this number, 34 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.
PluginProcessor.reconcileVisualizerInstances (cyclomatic 35) REDACTED:4818— PluginProcessor.reconcileVisualizerInstances 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.
ChannelDividerPlugin.setParameters (cyclomatic 35) plugins/basics/channel_divider.js:496— ChannelDividerPlugin.setParameters 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.
MultibandSaturationPlugin.setParameters (cyclomatic 35) plugins/saturation/multiband_saturation.js:436— MultibandSaturationPlugin.setParameters has cyclomatic complexity 35 (threshold 15). Of this number, 22 points are the body's own statements and 13 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
handleTelemetry (cyclomatic 35) plugins/analyzer/rhythm_analyzer.js:588— handleTelemetry has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
receiveOperation (cyclomatic 35) js/library/repository/web-sqlite-runtime.js:1745— receiveOperation has cyclomatic complexity 35 (threshold 15). Of this number, 25 points are the body's own statements and 10 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. This is NOT this file's highest cyclomatic complexity: dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
createResolvedSequenceTrack (cyclomatic 35) js/ui/audio-player/playback-manager.js:2864— createResolvedSequenceTrack 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.
drawStaticBackground (cyclomatic 35) plugins/analyzer/level_meter.js:405— drawStaticBackground 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.
alac-playback-source.probeAlac (cyclomatic 34) electron/alac-playback-source.cjs:12— alac-playback-source.probeAlac has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 5 function items inside it that branch (sampleDescription, boxAt, configDepth, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
network-music-upnp.parseXml (cyclomatic 34) electron/network-music-upnp.cjs:25— network-music-upnp.parseXml has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PipelineRoutingDialog.updateBusInfo (cyclomatic 34) js/ui/pipeline/pipeline-routing-dialog.js:305— PipelineRoutingDialog.updateBusInfo 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.
system-reset.recognizeMidiSystemReset (cyclomatic 34) js/midi/system-reset.js:4— system-reset.recognizeMidiSystemReset has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
VisualizerEditor.drag (cyclomatic 34) js/visualizer/visualizer-editor.js:1529— VisualizerEditor.drag has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AndroidPlayerContext.resolveNativeSource (cyclomatic 34) js/android/player-context.js:110— AndroidPlayerContext.resolveNativeSource has cyclomatic complexity 34 (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.
PlaybackManager.#playNext (cyclomatic 34) js/ui/audio-player/playback-manager.js:1888— PlaybackManager.#playNext has cyclomatic complexity 34 (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.
brand-animation.startBrandAnimation (cyclomatic 34) js/ui/brand-animation.js:52— brand-animation.startBrandAnimation has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 10 function items inside it that branch (drawWaveform, drawEqCurve, render, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ogg-vorbis.readOggVorbisMetadata (cyclomatic 34) js/sf2/ogg-vorbis.js:72— ogg-vorbis.readOggVorbisMetadata 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.
AnalogMeterPlugin.setParameters (cyclomatic 34) plugins/analyzer/analog_meter.js:373— AnalogMeterPlugin.setParameters has cyclomatic complexity 34 (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.
NoteSpectrogramPlugin._readNote (cyclomatic 34) plugins/analyzer/note_spectrogram.js:2430— NoteSpectrogramPlugin._readNote has cyclomatic complexity 34 (threshold 15). Of this number, 33 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.
PitchMeterPlugin.parseTelemetryFrame (cyclomatic 34) plugins/analyzer/pitch_meter.js:203— PitchMeterPlugin.parseTelemetryFrame has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SpectrogramPlugin.process (cyclomatic 34) plugins/analyzer/spectrogram.js:604— SpectrogramPlugin.process 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.
BassManagementPlugin.setParameters (cyclomatic 34) plugins/basics/bass_management.js:142— BassManagementPlugin.setParameters has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 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.
RoomEqPlugin._designAndStage (cyclomatic 34) plugins/eq/room_eq.js:1829— RoomEqPlugin._designAndStage has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AudioService.onCreate (cyclomatic 34) android/app/src/main/java/com/frieve/effetune/AudioService.java:151— AudioService.onCreate 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.
embed_models.read_model (cyclomatic 34) dsp/plugins/analyzer/tree_models/embed_models.py:58— embed_models.read_model has cyclomatic complexity 34 (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.
captureSfzRuntimeCheckpoints (cyclomatic 34) REDACTED:7884— captureSfzRuntimeCheckpoints 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.
normalizeContextQuery (cyclomatic 34) js/library/repository/catalog-runtime-core.js:627— normalizeContextQuery has cyclomatic complexity 34 (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.
prepareTrackTransitionRequest (cyclomatic 34) js/ui/audio-player/audio-context-manager.js:5229— prepareTrackTransitionRequest has cyclomatic complexity 34 (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.
setParameters (cyclomatic 34) plugins/reverb/ir_reverb.js:230— setParameters has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
getPlayerState (cyclomatic 34) electron/network-music-host.cjs:283— getPlayerState has cyclomatic complexity 34 (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.
playSelection (cyclomatic 34) electron/network-music-host.cjs:624— playSelection 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.
validatePowerDecision (cyclomatic 34) js/audio/power-policy.js:1125— validatePowerDecision has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
graph-document.structuralOrder (cyclomatic 33) dsp/bindings/js/src/graph-document.js:215— graph-document.structuralOrder has cyclomatic complexity 33 (threshold 15). Of this number, 27 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MusicServer.control (cyclomatic 33) REDACTED:160— MusicServer.control 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.
ir-library-store.validateEntry (cyclomatic 33) js/ir-library/ir-library-store.js:88— ir-library-store.validateEntry has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MultiresSpectrum.step (cyclomatic 33) plugins/multires-spectrum.js:332— MultiresSpectrum.step 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.
MidiInputState.apply (cyclomatic 33) js/midi/smf-timeline.js:103— MidiInputState.apply 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.
ir-plugin-contract.resolveIrProcessingConfig (cyclomatic 33) js/ir-library/ir-plugin-contract.js:106— ir-plugin-contract.resolveIrProcessingConfig has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
signal-generation.startWhiteNoise (cyclomatic 33) features/measurement/audio-utils/signal-generation.js:229— signal-generation.startWhiteNoise has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RollingPcmTransport.handleWorkerMessage (cyclomatic 33) js/ui/audio-player/rolling-pcm-transport.js:597— RollingPcmTransport.handleWorkerMessage 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.
PlaybackManager.createTrackEntry (cyclomatic 33) js/ui/audio-player/playback-manager.js:182— PlaybackManager.createTrackEntry has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PluginProcessor._normalizeTemporalCapability (cyclomatic 33) REDACTED:3731— PluginProcessor._normalizeTemporalCapability has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PluginProcessor.traceNetworkPath (cyclomatic 33) REDACTED:6175— PluginProcessor.traceNetworkPath 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.
FiveBandDynamicEQ.setParameters (cyclomatic 33) plugins/eq/five_band_dynamic_eq.js:378— FiveBandDynamicEQ.setParameters 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.
SoundFontPlayerPlugin._drawMixerKeyboard (cyclomatic 33) plugins/others/soundfont_player.js:888— SoundFontPlayerPlugin._drawMixerKeyboard 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.
Bundle._validate_entry (cyclomatic 33) dsp/bindings/python/src/effetune/bundle.py:250— Bundle._validate_entry 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.
handleSfzSampleStreamControl (cyclomatic 33) REDACTED:5695— handleSfzSampleStreamControl 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.
reorderPlaylistItem (cyclomatic 33) js/library/repository/catalog-runtime-core.js:2695— reorderPlaylistItem has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
getSnapshot (cyclomatic 33) js/audio/power-policy-controller.js:3503— getSnapshot has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
setParameters (cyclomatic 33) plugins/analyzer/note_spectrogram.js:337— setParameters has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
semantics.fromPlainEffect (cyclomatic 32) dsp/bindings/js/src/semantics.js:66— semantics.fromPlainEffect has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
modulation.compileSfzModulation (cyclomatic 32) js/sfz/modulation.js:407— modulation.compileSfzModulation has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
text-encoding.scoreDecodedText (cyclomatic 32) js/library/metadata/text-encoding.js:396— text-encoding.scoreDecodedText has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
system-reset.recognizeMidiDrumMode (cyclomatic 32) js/midi/system-reset.js:20— system-reset.recognizeMidiDrumMode has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PresetManager.addUserPresetToPipeline (cyclomatic 32) js/ui/plugin-list/preset-manager.js:382— PresetManager.addUserPresetToPipeline has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
keyboard-shortcut-handler.handlePipelineKeyboardShortcut (cyclomatic 32) js/ui/pipeline/keyboard-shortcut-handler.js:20— keyboard-shortcut-handler.handlePipelineKeyboardShortcut has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 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.
ClipboardManager.handlePaste (cyclomatic 32) js/ui/pipeline/clipboard-manager.js:89— ClipboardManager.handlePaste has cyclomatic complexity 32 (threshold 15). Of this number, 30 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.
visualizer-drums-renderer.buildKit (cyclomatic 32) js/visualizer/visualizer-drums-renderer.js:15— visualizer-drums-renderer.buildKit has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (pedal, stand, drum, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
dsd-source.openDsdRangeSource (cyclomatic 32) js/ui/audio-player/dsd-source.js:29— dsd-source.openDsdRangeSource has cyclomatic complexity 32 (threshold 15). Of this number, 17 points are the body's own statements and 15 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.
MidiMappingDialog.renderDetails (cyclomatic 32) js/midi/midi-mapping-dialog.js:672— MidiMappingDialog.renderDetails has cyclomatic complexity 32 (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.
SfzSamplePageProvider.pump (cyclomatic 32) js/sfz/sample-page-provider.js:194— SfzSamplePageProvider.pump has cyclomatic complexity 32 (threshold 15). Of this number, 17 points are the body's own statements and 15 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rolling-pcm-worker-entry.openSource (cyclomatic 32) js/ui/audio-player/rolling-pcm-worker-entry.js:72— rolling-pcm-worker-entry.openSource has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AssetTransfers.command (cyclomatic 32) android/app/src/main/java/com/frieve/effetune/AssetTransfers.java:133— AssetTransfers.command has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
graph_document._structure (cyclomatic 32) dsp/bindings/python/src/effetune/graph_document.py:231— graph_document._structure has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
processMidiTransport (cyclomatic 32) REDACTED:8076— processMidiTransport has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
setupEventHandlers (cyclomatic 32) js/ui/audio-player/audio-context-manager.js:2486— setupEventHandlers has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 8 function items inside it that branch (error, ended, timeupdate, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
palette (cyclomatic 32) js/visualizer/visualizer-editor.js:1246— palette has cyclomatic complexity 32 (threshold 15). Of this number, 24 points are the body's own statements and 8 belong to 27 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
resolveImportedPlaylistTrack (cyclomatic 32) js/library/repository/web-sqlite-runtime.js:1995— resolveImportedPlaylistTrack has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to 7 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. This is NOT this file's highest cyclomatic complexity: dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
preparePlannedAutomaticMove (cyclomatic 32) js/ui/audio-player/playback-manager.js:388— preparePlannedAutomaticMove has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawGraph (cyclomatic 32) plugins/analyzer/spectrum_analyzer.js:900— drawGraph has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
remote-music-dispatcher.dispatchMusic (cyclomatic 31) electron/remote-music-dispatcher.cjs:180— remote-music-dispatcher.dispatchMusic has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VisualizerView.syncPlaybackControls (cyclomatic 31) REDACTED:584— VisualizerView.syncPlaybackControls has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
waterfall-surface.buildWaterfallMesh (cyclomatic 31) features/measurement/ui/waterfall-surface.js:24— waterfall-surface.buildWaterfallMesh has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PlaybackManager.canResumeCurrentTrack (cyclomatic 31) js/ui/audio-player/playback-manager.js:1598— PlaybackManager.canResumeCurrentTrack has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PipelineAnalyzerUI.renderAnalysisGraph (cyclomatic 31) js/pipeline-analyzer/ui.js:1522— PipelineAnalyzerUI.renderAnalysisGraph has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UIManager.updateUITexts (cyclomatic 31) js/ui-manager.js:1317— UIManager.updateUITexts has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SfzSamplePageProvider.prepare (cyclomatic 31) js/sfz/sample-page-provider.js:69— SfzSamplePageProvider.prepare 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.
DynamicSaturationPlugin.setParameters (cyclomatic 31) plugins/saturation/dynamic_saturation.js:163— DynamicSaturationPlugin.setParameters 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.
AudioService.handleNativeMusic (cyclomatic 31) android/app/src/main/java/com/frieve/effetune/AudioService.java:1113— AudioService.handleNativeMusic 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.
_reconcileOutputDevice (cyclomatic 31) js/app.js:1582— _reconcileOutputDevice has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 belong to 5 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.
measureEss (cyclomatic 31) js/pipeline-analyzer/analysis-worker.js:665— measureEss 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.
_ensureSwitchTelemetrySubscription (cyclomatic 31) plugins/sfz-instrument.js:423— _ensureSwitchTelemetrySubscription has cyclomatic complexity 31 (threshold 15). Of this number, 17 points are the body's own statements and 14 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
browser-preload.installMidiFileHook (cyclomatic 30) electron/browser-preload.js:163— browser-preload.installMidiFileHook has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 12 function items inside it that branch (offer, offerText, inspectRequest, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
RemoteControlHost.onPutIrChunk (cyclomatic 30) electron/remote-control-host.cjs:1235— RemoteControlHost.onPutIrChunk has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
smoothing.smoothFrequencyResponse (cyclomatic 30) js/utils/measurement-dsp/smoothing.js:10— smoothing.smoothFrequencyResponse has cyclomatic complexity 30 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
VisualizerSources.setLayout (cyclomatic 30) js/visualizer/visualizer-sources.js:139— VisualizerSources.setLayout has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
visualizer-counter.counterFrame (cyclomatic 30) js/visualizer/visualizer-counter.js:7— visualizer-counter.counterFrame has cyclomatic complexity 30 (threshold 15). Of this number, 20 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AudioManager._applyParallelRouting (cyclomatic 30) js/audio-manager.js:4415— AudioManager._applyParallelRouting has cyclomatic complexity 30 (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.
rolling-pcm-policy.normalizeLiveMemoryEvidence (cyclomatic 30) REDACTED:1207— rolling-pcm-policy.normalizeLiveMemoryEvidence has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioContextManager.playBufferSource (cyclomatic 30) js/ui/audio-player/audio-context-manager.js:2772— AudioContextManager.playBufferSource has cyclomatic complexity 30 (threshold 15). Of this number, 21 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
automatic-playlist-import.importAutomaticPlaylists (cyclomatic 30) js/library/playlists/automatic-playlist-import.js:47— automatic-playlist-import.importAutomaticPlaylists 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.
pipeline-snapshot.collectProcessingSnapshot (cyclomatic 30) js/pipeline-analyzer/pipeline-snapshot.js:261— pipeline-snapshot.collectProcessingSnapshot 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.
RhythmAnalyzerPlugin.setParameters (cyclomatic 30) plugins/analyzer/rhythm_analyzer.js:271— RhythmAnalyzerPlugin.setParameters has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
publishNetworkPaths (cyclomatic 30) REDACTED:6223— publishNetworkPaths has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
playRollingPcm (cyclomatic 30) js/ui/audio-player/audio-context-manager.js:2701— playRollingPcm has cyclomatic complexity 30 (threshold 15). Of this number, 19 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
handleMidiSnapshot (cyclomatic 30) plugins/analyzer/note_spectrogram.js:1122— handleMidiSnapshot 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.
_drawTempogram (cyclomatic 30) plugins/analyzer/rhythm_analyzer.js:1927— _drawTempogram has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
decodeNoteSpectrogram (cyclomatic 30) dsp/bindings/js/src/telemetry.js:431— decodeNoteSpectrogram has cyclomatic complexity 30 (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.
drawGraph (cyclomatic 30) plugins/dynamics/auto_leveler.js:516— drawGraph has cyclomatic complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawSingleGraph (cyclomatic 30) plugins/dynamics/power_amp_sag.js:486— drawSingleGraph has cyclomatic complexity 30 (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.
effect.validateParameterValue (cyclomatic 29) REDACTED:42— effect.validateParameterValue has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
telemetry.decodeMultiresHq (cyclomatic 29) dsp/bindings/js/src/telemetry.js:278— telemetry.decodeMultiresHq has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
playback-range-reader.registerPlaybackRangeReader (cyclomatic 29) electron/playback-range-reader.cjs:6— playback-range-reader.registerPlaybackRangeReader has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 57, a function literal at line 15, a function literal at line 21, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
UIEventHandler.setupPipelineDropZoneEvents (cyclomatic 29) js/ui/pipeline/ui-event-handler.js:1090— UIEventHandler.setupPipelineDropZoneEvents has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1166, 1099, 1146, …). 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.
MidiVisualizerAdapter.snapshot (cyclomatic 29) js/visualizer/visualizer-midi.js:60— MidiVisualizerAdapter.snapshot has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
visualizer-playback-control.drawPlaybackControl (cyclomatic 29) js/visualizer/visualizer-playback-control.js:6— visualizer-playback-control.drawPlaybackControl has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VisualizerRenderer.drawItem (cyclomatic 29) js/visualizer/visualizer-renderer.js:386— VisualizerRenderer.drawItem has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
analysis-worker.measurePeriodic (cyclomatic 29) js/pipeline-analyzer/analysis-worker.js:515— analysis-worker.measurePeriodic has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MeasurementDisplay.buildMeasurementDetailRows (cyclomatic 29) features/measurement/ui/measurement-display.js:312— MeasurementDisplay.buildMeasurementDetailRows has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
optimization.calculateJtJandJte (cyclomatic 29) features/measurement/peq-calculator/optimization.js:298— optimization.calculateJtJandJte has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NetworkMusicView.playLibraryContext (cyclomatic 29) js/network-music/view.js:516— NetworkMusicView.playLibraryContext has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 518). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
StereoMeterPlugin.parseDspStereoFieldTelemetryFrame (cyclomatic 29) plugins/analyzer/stereo_meter.js:364— StereoMeterPlugin.parseDspStereoFieldTelemetryFrame has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SFZNotePlayerPlugin.drawGraph (cyclomatic 29) plugins/others/sfz_note_player.js:222— SFZNotePlayerPlugin.drawGraph has cyclomatic complexity 29 (threshold 15). Of this number, 28 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.
schedulePreparedBufferTransition (cyclomatic 29) js/ui/audio-player/audio-context-manager.js:4815— schedulePreparedBufferTransition has cyclomatic complexity 29 (threshold 15). Of this number, 22 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
transitionToNextTrack (cyclomatic 29) js/ui/audio-player/audio-context-manager.js:5148— transitionToNextTrack has cyclomatic complexity 29 (threshold 15). Of this number, 26 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.
effects (cyclomatic 29) js/visualizer/visualizer-editor.js:1334— effects has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 30 function items inside it that branch (a function literal at line 1347, a function literal at line 1371, a function literal at line 1337, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
updateControlsState (cyclomatic 29) js/ui/audio-player/audio-player-ui.js:277— updateControlsState has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawSpectrumBars (cyclomatic 29) plugins/analyzer/spectrum_analyzer.js:1341— drawSpectrumBars has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sharedTrack (cyclomatic 29) electron/network-music-host.cjs:498— sharedTrack has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
findMatrixCell (cyclomatic 29) REDACTED:810— findMatrixCell has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 811). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
drawGraph (cyclomatic 29) plugins/eq/group_delay_eq.js:735— drawGraph has cyclomatic complexity 29 (threshold 15). Of this number, 22 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
readBoundedResponse (cyclomatic 29) dsp/bindings/js/src/assets.js:64— readBoundedResponse has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
getSfzRuntimeCheckpoints (cyclomatic 29) js/audio/audio-manager-sfz-runtime.js:137— getSfzRuntimeCheckpoints has cyclomatic complexity 29 (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.
attach.render (cyclomatic 29) plugins/graph-readout.js:435— attach.render has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NetworkMusicHost.configure (cyclomatic 28) electron/network-music-host.cjs:105— NetworkMusicHost.configure 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.
dsp-wasm-loader.createDspParamPackers (cyclomatic 28) js/audio/dsp-wasm-loader.js:156— dsp-wasm-loader.createDspParamPackers 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.
optimization.errorFunctionLogSpace (cyclomatic 28) features/measurement/peq-calculator/optimization.js:69— optimization.errorFunctionLogSpace 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.
AnalysisPlot.draw (cyclomatic 28) features/measurement/ui/analysis-plot.js:127— AnalysisPlot.draw has cyclomatic complexity 28 (threshold 15). Of this number, 26 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.
flac-stream.readFlacMetadata (cyclomatic 28) js/sfz/flac-stream.js:160— flac-stream.readFlacMetadata 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.
RhythmAnalyzerPlugin._drawLens (cyclomatic 28) plugins/analyzer/rhythm_analyzer.js:2061— RhythmAnalyzerPlugin._drawLens has cyclomatic complexity 28 (threshold 15). Of this number, 23 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.
PluginProcessor.setPluginAsset (cyclomatic 28) REDACTED:5262— PluginProcessor.setPluginAsset has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
graph-readout.attach.render (cyclomatic 28) plugins/graph-readout.js:435— graph-readout.attach.render has cyclomatic complexity 28 (threshold 15). Of this number, 22 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PluginBase.createResponsiveGraph (cyclomatic 28) REDACTED:1736— PluginBase.createResponsiveGraph has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to 2 function items inside it that branch (resize, dispose). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PhaseSelectEqPlugin.parseDspTelemetryFrame (cyclomatic 28) plugins/spatial/phase_select_eq.js:453— PhaseSelectEqPlugin.parseDspTelemetryFrame has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SpectrumOverlayInstance._drawDifference (cyclomatic 28) plugins/spectrum-overlay.js:492— SpectrumOverlayInstance._drawDifference 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.
claimMetadataParse (cyclomatic 28) js/library/repository/catalog-runtime-core.js:5453— claimMetadataParse has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
rebindAudioElementAfterGraphRebuild (cyclomatic 28) js/ui/audio-player/audio-context-manager.js:1847— rebindAudioElementAfterGraphRebuild has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_prepareAndStage (cyclomatic 28) plugins/reverb/ir_reverb.js:407— _prepareAndStage has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
setupEventListeners (cyclomatic 28) js/app.js:1360— setupEventListeners has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 18 function items inside it that branch (handleDocumentLifecycle, resumeAudioFromInteraction, handleWindowLifecycle, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
parseDspSpectrumTelemetryFrame (cyclomatic 28) plugins/analyzer/spectrum_analyzer.js:386— parseDspSpectrumTelemetryFrame has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
drawGraphs (cyclomatic 28) plugins/dynamics/multiband_transient.js:766— drawGraphs 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.
planLiveDelays (cyclomatic 28) electron/network-output-host.cjs:259— planLiveDelays 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.
reselectStaleSelection (cyclomatic 28) js/ui/library/paged-view-controller.js:965— reselectStaleSelection 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.
_draw (cyclomatic 28) plugins/spectrum-overlay.js:367— _draw 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.
openPagedTrackContextMenu (cyclomatic 28) js/ui/library/library-view-menus.js:297— openPagedTrackContextMenu has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to 13 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OpenHomeControlHost.dispatchSidecarAction (cyclomatic 27) electron/openhome-control-host.cjs:397— OpenHomeControlHost.dispatchSidecarAction 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.
UserDataBackupService.planRestore (cyclomatic 27) js/user-data-backup/service.js:122— UserDataBackupService.planRestore has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 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.
VisualizerView.onEditKeyDown (cyclomatic 27) REDACTED:273— VisualizerView.onEditKeyDown has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
power-snapshot.normalizePowerSnapshot (cyclomatic 27) js/audio/power-snapshot.js:613— power-snapshot.normalizePowerSnapshot has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AudioManager._pruneInactiveDspWorklets (cyclomatic 27) js/audio-manager.js:1272— AudioManager._pruneInactiveDspWorklets 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.
devices.startMicrophoneInput (cyclomatic 27) features/measurement/audio-utils/devices.js:47— devices.startMicrophoneInput has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
resample.resampleWindowedSinc (cyclomatic 27) js/utils/measurement-dsp/resample.js:61— resample.resampleWindowedSinc 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.
dsd-parser.parseDff (cyclomatic 27) js/audio/dsd/dsd-parser.js:85— dsd-parser.parseDff has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 105, a function literal at line 131, walk). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
bulk-operation-protocol.validateSequenceSaveDescriptor (cyclomatic 27) js/library/operations/bulk-operation-protocol.js:92— bulk-operation-protocol.validateSequenceSaveDescriptor has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
pipeline-apply.applyOpsToPipeline (cyclomatic 27) js/remote/pipeline-apply.js:99— pipeline-apply.applyOpsToPipeline has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 135, a function literal at line 114, release). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MidiMappingEngine.queueMapping (cyclomatic 27) js/midi/midi-mapping-engine.js:127— MidiMappingEngine.queueMapping 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.
SfzSampleStream.readFrames (cyclomatic 27) js/sfz/sample-stream.js:122— SfzSampleStream.readFrames 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.
NativeSfzLibraryService._readBank (cyclomatic 27) js/sfz/native-service.js:101— NativeSfzLibraryService._readBank 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 items inside it that branch (a function literal at line 138, read, a function literal at line 132, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
OscilloscopePlugin.acceptScopeSnapshot (cyclomatic 27) plugins/analyzer/oscilloscope.js:842— OscilloscopePlugin.acceptScopeSnapshot has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioService.sourceSnapshot (cyclomatic 27) android/app/src/main/java/com/frieve/effetune/AudioService.java:861— AudioService.sourceSnapshot has cyclomatic complexity 27 (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.
presets._legacy_parameters (cyclomatic 27) dsp/bindings/python/src/effetune/presets.py:603— presets._legacy_parameters 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.
telemetry._decode_oscilloscope (cyclomatic 27) dsp/bindings/python/src/effetune/telemetry.py:401— telemetry._decode_oscilloscope 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.
seekRollingPcm (cyclomatic 27) js/ui/audio-player/audio-context-manager.js:3374— seekRollingPcm has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
resolveImportedPlaylistTrack (cyclomatic 27) electron/library-catalog-worker.cjs:1929— resolveImportedPlaylistTrack has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 7 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. This is NOT this file's highest cyclomatic complexity: dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
drawGraph (cyclomatic 27) plugins/spatial/phase_select_eq.js:1584— drawGraph 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.
frame (cyclomatic 27) REDACTED:704— frame has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
startSfzRuntimeForAsset (cyclomatic 27) js/audio/audio-manager-sfz-runtime.js:212— startSfzRuntimeForAsset has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
resolveFavoriteActionTrackUids (cyclomatic 27) js/ui/library/library-view-menus.js:242— resolveFavoriteActionTrackUids has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 belong to 4 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.
SoundFontBank.fromBytes (cyclomatic 26) dsp/bindings/js/src/soundfont.js:75— SoundFontBank.fromBytes has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
assets.normalizeFormatMetadata (cyclomatic 26) dsp/bindings/js/src/assets.js:333— assets.normalizeFormatMetadata has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
telemetry.decodeAnalogMeter (cyclomatic 26) dsp/bindings/js/src/telemetry.js:542— telemetry.decodeAnalogMeter has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: telemetry.decodePitchMeter (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
modulation.compileRegion.instance (cyclomatic 26) js/sfz/modulation.js:130— modulation.compileRegion.instance has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AirPlayReceiverHost.reconcile (cyclomatic 26) electron/airplay-receiver.cjs:186— AirPlayReceiverHost.reconcile has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 213, terminated, a function literal at line 239, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
power-topology.computeGraphAmplitudeBound (cyclomatic 26) js/audio/power-topology.js:261— power-topology.computeGraphAmplitudeBound has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 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.
musicxml-parser.xmlDocument (cyclomatic 26) js/midi/musicxml-parser.js:36— musicxml-parser.xmlDocument 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.
PresetManager.addPresetToPipeline (cyclomatic 26) js/preset-manager.js:78— PresetManager.addPresetToPipeline 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.
portable.validateItemShape (cyclomatic 26) js/user-data-backup/portable.js:113— portable.validateItemShape has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
VisualizerSources._receive (cyclomatic 26) js/visualizer/visualizer-sources.js:264— VisualizerSources._receive has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SynchronizedVideo.frame (cyclomatic 26) js/ui/audio-player/synchronized-video.js:41— SynchronizedVideo.frame 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.
PowerPolicyController._getSuspendedTemporalElapsed (cyclomatic 26) js/audio/power-policy-controller.js:1458— PowerPolicyController._getSuspendedTemporalElapsed has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
interface-calibration.applyInterfaceCalibration (cyclomatic 26) js/utils/measurement-dsp/interface-calibration.js:54— interface-calibration.applyInterfaceCalibration has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AnalysisController.initialize (cyclomatic 26) features/measurement/ui/analysis-controller.js:124— AnalysisController.initialize has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 156, 128, 165, …). 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.
NetworkLivePcm.open (cyclomatic 26) js/ui/audio-player/network-live-pcm.js:31— NetworkLivePcm.open 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 items inside it that branch (pump, a function literal at line 64, current, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
bulk-operation-protocol.canonicalizeImportOptions (cyclomatic 26) js/library/operations/bulk-operation-protocol.js:150— bulk-operation-protocol.canonicalizeImportOptions has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
LocalInputSources.pollGamepads (cyclomatic 26) js/midi/local-input-sources.js:188— LocalInputSources.pollGamepads has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 204, 225, 227, …). 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.
flac-stream.readFlacFrameHeader (cyclomatic 26) js/sfz/flac-stream.js:51— flac-stream.readFlacFrameHeader 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.
streamed-bank.prepareStreamedSfzBank::build (cyclomatic 26) js/sfz/streamed-bank.js:71— streamed-bank.prepareStreamedSfzBank::build has cyclomatic complexity 26 (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.
setup.runSetup (cyclomatic 26) mcp/src/setup.mjs:104— setup.runSetup has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PluginProcessor.updateNetworkRoute (cyclomatic 26) REDACTED:3327— PluginProcessor.updateNetworkRoute 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.
MultibandTransientPlugin.setParameters (cyclomatic 26) plugins/dynamics/multiband_transient.js:657— MultibandTransientPlugin.setParameters has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PluginBase.layoutMarkerLabels (cyclomatic 26) REDACTED:1937— PluginBase.layoutMarkerLabels has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Handler.channelRead0 (cyclomatic 26) android/app/src/main/java/com/frieve/effetune/RemoteControlServer.java:108— Handler.channelRead0 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.
_drawHud (cyclomatic 26) plugins/saturation/tube_simulator.js:7058— _drawHud has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
listMetadataCandidates (cyclomatic 26) js/library/repository/catalog-runtime-core.js:5079— listMetadataCandidates has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 5112). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
createAndStartBufferSource (cyclomatic 26) js/ui/audio-player/audio-context-manager.js:6033— createAndStartBufferSource has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reusePagedCommittedSearchDom (cyclomatic 26) js/ui/library/library-view.js:1743— reusePagedCommittedSearchDom has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
updatePagedActionToast (cyclomatic 26) js/ui/library/library-view.js:2576— updatePagedActionToast has cyclomatic complexity 26 (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.
loadFiles (cyclomatic 26) js/ui/audio-player/playback-manager.js:70— loadFiles has cyclomatic complexity 26 (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.
#selectSequenceOrdinal (cyclomatic 26) js/ui/audio-player/playback-manager.js:687— #selectSequenceOrdinal 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.
#selectSequenceOrdinalOnce::mediaOperation (cyclomatic 26) js/ui/audio-player/playback-manager.js:818— #selectSequenceOrdinalOnce::mediaOperation 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.
openSpeedPopup (cyclomatic 26) js/ui/audio-player/audio-player-ui.js:1494— openSpeedPopup has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
render (cyclomatic 26) js/network-music/view.js:205— render has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to 4 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.
materializeSelection (cyclomatic 26) electron/library-service-coordinator.cjs:1001— materializeSelection 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.
adoptPreparedSeekCandidate (cyclomatic 26) js/ui/audio-player/rolling-pcm-transport.js:1064— adoptPreparedSeekCandidate has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 belong to 8 function items inside it that branch. 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.
onConnection (cyclomatic 26) electron/remote-control-host.cjs:988— onConnection has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 8 function items inside it that branch (isCurrentMusicSession, a function literal at line 1030, isMusicAuthorized, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
compileRegion::instance (cyclomatic 26) js/sfz/modulation.js:130— compileRegion::instance has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sourceRecord (cyclomatic 26) js/crosstalk-cancellation/design-core.js:79— sourceRecord has cyclomatic complexity 26 (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.
telemetry.decodeNoteChordKey (cyclomatic 25) dsp/bindings/js/src/telemetry.js:373— telemetry.decodeNoteChordKey has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: telemetry.decodePitchMeter (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
telemetry.decodeTonalBalance (cyclomatic 25) dsp/bindings/js/src/telemetry.js:787— telemetry.decodeTonalBalance has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: telemetry.decodePitchMeter (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MusicServer.handle (cyclomatic 25) REDACTED:103— MusicServer.handle has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
FileProcessor.showDownloadLink (cyclomatic 25) js/ui/pipeline/file-processor.js:885— FileProcessor.showDownloadLink has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UIEventHandler.setupDragEvents (cyclomatic 25) js/ui/pipeline/ui-event-handler.js:640— UIEventHandler.setupDragEvents has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 718, 672, 780, …). 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.
GuitarFretboardDisplay.solveChordShape (cyclomatic 25) js/visualizer/visualizer-guitar.js:289— GuitarFretboardDisplay.solveChordShape has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (search, a function literal at line 303, a function literal at line 319). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
midi-offline.prepareOfflineMidiSession (cyclomatic 25) js/audio/midi-offline.js:20— midi-offline.prepareOfflineMidiSession 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.
OfflineProcessor.tryProcessOfflineDspPipeline (cyclomatic 25) js/audio/offline-processor.js:852— OfflineProcessor.tryProcessOfflineDspPipeline has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AudioManager._transitionDspConfiguration (cyclomatic 25) js/audio-manager.js:3101— AudioManager._transitionDspConfiguration has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AudioManager._rebuildAudioGraph (cyclomatic 25) js/audio-manager.js:3523— AudioManager._rebuildAudioGraph has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ir-plugin-contract.selectedIrChannelCount (cyclomatic 25) js/ir-library/ir-plugin-contract.js:26— ir-plugin-contract.selectedIrChannelCount 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.
optimization.solveEquation (cyclomatic 25) features/measurement/peq-calculator/optimization.js:393— optimization.solveEquation 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.
AnalysisController.autoRange (cyclomatic 25) features/measurement/ui/analysis-controller.js:852— AnalysisController.autoRange has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AndroidPlayerContext.acceptPlayback (cyclomatic 25) js/android/player-context.js:29— AndroidPlayerContext.acceptPlayback has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
library-view.fallbackText (cyclomatic 25) js/ui/library/library-view.js:3763— library-view.fallbackText has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MidiControllerManager.onMidiMessage (cyclomatic 25) js/midi/midi-controller-manager.js:338— MidiControllerManager.onMidiMessage 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.
ir-preparation.emitPreparedIr (cyclomatic 25) js/ir-library/ir-preparation.js:444— ir-preparation.emitPreparedIr has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
remote-ir-library.createRemoteIrLibrary.downloadEntry (cyclomatic 25) js/remote/remote-ir-library.js:104— remote-ir-library.createRemoteIrLibrary.downloadEntry has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 113). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
script-compiler.tokenize (cyclomatic 25) js/sfz/script-compiler.js:62— script-compiler.tokenize 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.
script-compiler.preprocess (cyclomatic 25) js/sfz/script-compiler.js:239— script-compiler.preprocess has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 242). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
SfzLibraryService.prepare (cyclomatic 25) js/sfz/service.js:459— SfzLibraryService.prepare 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.
PluginProcessor.applyNetworkOutputDelay (cyclomatic 25) REDACTED:3597— PluginProcessor.applyNetworkOutputDelay 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.
MultibandCompressorPlugin.setParameters (cyclomatic 25) plugins/dynamics/multiband_compressor.js:1041— MultibandCompressorPlugin.setParameters has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MultibandExpanderPlugin.setParameters (cyclomatic 25) plugins/dynamics/multiband_expander.js:908— MultibandExpanderPlugin.setParameters has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IRReverbPlugin._restoreResidentSnapshot (cyclomatic 25) plugins/reverb/ir_reverb.js:1299— IRReverbPlugin._restoreResidentSnapshot has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IRReverbPlugin.onWasmAssetState (cyclomatic 25) plugins/reverb/ir_reverb.js:1630— IRReverbPlugin.onWasmAssetState 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.
StereoDownmix.<init> (cyclomatic 25) android/app/src/main/java/com/frieve/effetune/StereoDownmix.java:9— StereoDownmix.<init> has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
python_golden_runner.semantic_parameters (cyclomatic 25) dsp/bindings/acceptance/python_golden_runner.py:202— python_golden_runner.semantic_parameters 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.
nextPluginState (cyclomatic 25) REDACTED:6915— nextPluginState has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
schedulePreparedRollingTransition (cyclomatic 25) js/ui/audio-player/audio-context-manager.js:4884— schedulePreparedRollingTransition has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_runDspOutputTransition (cyclomatic 25) js/audio-manager.js:1390— _runDspOutputTransition has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 4 function items inside it that branch (execute, a function literal at line 1451, clearIfCurrent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
updateTimeDisplay (cyclomatic 25) js/ui/audio-player/audio-player-ui.js:1955— updateTimeDisplay 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.
initialize (cyclomatic 25) js/app.js:545— initialize has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
captureLocalQueue (cyclomatic 25) js/ui/audio-player/openhome-playback-adapter.js:760— captureLocalQueue 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.
seek (cyclomatic 25) js/ui/audio-player/rolling-pcm-transport.js:410— seek has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
listen (cyclomatic 25) electron/remote-control-host.cjs:501— listen has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 575, handler, verifyClient, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
analogMeterScale (cyclomatic 25) plugins/analyzer/analog_meter.js:93— analogMeterScale has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to 21 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
startCast (cyclomatic 25) electron/network-output-host.cjs:741— startCast has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 757, 744, 772, …). 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.
#materializeSelection (cyclomatic 25) js/library/operations/web-library-service-coordinator.js:902— #materializeSelection 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.
bindEvents (cyclomatic 25) extension/editor.js:496— bindEvents has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 31 function items inside it that branch (a function literal at line 508, (anonymous)::canApplyPreset, a function literal at line 498, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
createPluginSession (cyclomatic 25) features/effetune-benchmark.js:716— createPluginSession has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
captureMidiCheckpoints (cyclomatic 25) js/ui/audio-player/midi-playback.js:231— captureMidiCheckpoints has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch ((anonymous)::finish, a function literal at line 257, a function literal at line 259, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
semantics.validateBassManagement (cyclomatic 24) dsp/bindings/js/src/semantics.js:149— semantics.validateBassManagement has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
telemetry.decodeNoteTimbre (cyclomatic 24) dsp/bindings/js/src/telemetry.js:400— telemetry.decodeNoteTimbre has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: telemetry.decodePitchMeter (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
network-music-resource.serveRemoteResource (cyclomatic 24) electron/network-music-resource.cjs:9— network-music-resource.serveRemoteResource 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 3 function literals inside it that branch (lines 14, 11, 30). 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.
OpenHomeMediaGateway.proxy (cyclomatic 24) REDACTED:212— OpenHomeMediaGateway.proxy 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 3 function literals inside it that branch (lines 230, 214, 281). 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.
SubsonicSource.browse (cyclomatic 24) electron/subsonic-source.cjs:54— SubsonicSource.browse 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.
bank.readSfzAudioHeader (cyclomatic 24) js/sfz/bank.js:12— bank.readSfzAudioHeader has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
library-shared-query.querySharedLibrary.addTracks (cyclomatic 24) electron/library-shared-query.cjs:39— library-shared-query.querySharedLibrary.addTracks has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
library-catalog-worker.prepareAutomaticPlaylistImport (cyclomatic 24) electron/library-catalog-worker.cjs:1842— library-catalog-worker.prepareAutomaticPlaylistImport has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1860). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: library-catalog-worker.dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
TelemetryHub._dispatch (cyclomatic 24) js/audio/telemetry-hub.js:268— TelemetryHub._dispatch 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.
GuitarFretboardDisplay.stepLevels (cyclomatic 24) js/visualizer/visualizer-guitar.js:167— GuitarFretboardDisplay.stepLevels has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OfflineProcessor.getOfflineChannelRouting (cyclomatic 24) js/audio/offline-processor.js:1376— OfflineProcessor.getOfflineChannelRouting 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.
waterfall-surface.rasterizeWaterfallSurface (cyclomatic 24) features/measurement/ui/waterfall-surface.js:121— waterfall-surface.rasterizeWaterfallSurface 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.
rolling-pcm-core.planPcm16WaveFragment (cyclomatic 24) js/ui/audio-player/rolling-pcm-core.js:70— rolling-pcm-core.planPcm16WaveFragment has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
web-sqlite-runtime.prepareAutomaticPlaylistImport (cyclomatic 24) js/library/repository/web-sqlite-runtime.js:1908— web-sqlite-runtime.prepareAutomaticPlaylistImport has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1926). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: web-sqlite-runtime.dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
LazyArtworkService.#extract (cyclomatic 24) js/library/artwork/lazy-artwork-service.js:104— LazyArtworkService.#extract 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.
design-core.dominantEnergyPosition (cyclomatic 24) js/room-eq/design-core.js:1426— design-core.dominantEnergyPosition 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.
flac-stream.subframe (cyclomatic 24) js/sfz/flac-stream.js:92— flac-stream.subframe 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.
script-compiler.compileSfzScript (cyclomatic 24) js/sfz/script-compiler.js:276— script-compiler.compileSfzScript has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, script-compiler.compileSfzScript::typeOf, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
compiler.compileModulators (cyclomatic 24) js/sf2/compiler.js:31— compiler.compileModulators has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
compiler.zones (cyclomatic 24) js/sf2/compiler.js:60— compiler.zones has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sample-integrity.createSfzSampleIntegrity (cyclomatic 24) js/sfz/sample-integrity.js:42— sample-integrity.createSfzSampleIntegrity has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 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.
NoteSpectrogramPlugin.parseChordKeyTelemetryFrame (cyclomatic 24) plugins/analyzer/note_spectrogram.js:451— NoteSpectrogramPlugin.parseChordKeyTelemetryFrame has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SpectrumAnalyzerPlugin.process (cyclomatic 24) plugins/analyzer/spectrum_analyzer.js:472— SpectrumAnalyzerPlugin.process has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PluginProcessor._mixFrequencyPreview (cyclomatic 24) REDACTED:8246— PluginProcessor._mixFrequencyPreview 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.
EarphoneCableSimPlugin.setParameters (cyclomatic 24) plugins/eq/earphone_cable_sim.js:492— EarphoneCableSimPlugin.setParameters has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PhaseSelectEqPlugin._selectedHandles (cyclomatic 24) plugins/spatial/phase_select_eq.js:1249— PhaseSelectEqPlugin._selectedHandles 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.
PhaseSelectEqPlugin._hitTest (cyclomatic 24) plugins/spatial/phase_select_eq.js:1361— PhaseSelectEqPlugin._hitTest has cyclomatic complexity 24 (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.
NativeParameterPacker.mustProcess (cyclomatic 24) android/app/src/main/java/com/frieve/effetune/NativeParameterPacker.java:98— NativeParameterPacker.mustProcess 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.
applyTransitionGain (cyclomatic 24) REDACTED:8177— applyTransitionGain 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.
resolveEntityAnchor (cyclomatic 24) js/library/repository/catalog-runtime-core.js:919— resolveEntityAnchor has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
createPartialDecodeFallbackRecord (cyclomatic 24) js/ui/audio-player/audio-context-manager.js:4219— createPartialDecodeFallbackRecord has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
loadPagedSearchEntitySections (cyclomatic 24) js/ui/library/library-view.js:1325— loadPagedSearchEntitySections 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 8 function items inside it that branch (a function literal at line 1331, a function literal at line 1418, load, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_deriveRouteAndPlayerFacts (cyclomatic 24) js/audio/power-policy-controller.js:654— _deriveRouteAndPlayerFacts has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
artworkClaimMatchesCurrentTrack (cyclomatic 24) js/library/repository/web-sqlite-runtime.js:2225— artworkClaimMatchesCurrentTrack has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
constructor (cyclomatic 24) REDACTED:25— constructor has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 31 function items inside it that branch (a function literal at line 115, a function literal at line 31, a function literal at line 86, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_loadBank (cyclomatic 24) plugins/sfz-instrument.js:134— _loadBank has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 157, (anonymous)::isCurrent, (anonymous)::current, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
getEffectiveActiveWasmAssetSnapshot (cyclomatic 24) js/audio/audio-manager-wasm-assets.js:124— getEffectiveActiveWasmAssetSnapshot has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_evaluateSignedExternalAssetRequest (cyclomatic 24) js/audio/audio-manager-wasm-assets.js:621— _evaluateSignedExternalAssetRequest 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.
#initialize (cyclomatic 24) js/library/library-manager-v2.js:172— #initialize has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
normalizeScanState (cyclomatic 24) js/library/library-manager-v2.js:727— normalizeScanState has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
prepareSfzSamples (cyclomatic 24) js/sfz/service.js:181— prepareSfzSamples has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawGraph (cyclomatic 24) plugins/eq/loudness_equalizer.js:433— drawGraph has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
start (cyclomatic 24) js/ui/audio-player/catalog-playback-bridge.js:44— start has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MusicServer.serveResource (cyclomatic 23) REDACTED:133— MusicServer.serveResource has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 3 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.
NetworkMusicHost.probeLibraries (cyclomatic 23) electron/network-music-host.cjs:145— NetworkMusicHost.probeLibraries has cyclomatic complexity 23 (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.
IrLibraryService.resolveDecodedPcm (cyclomatic 23) js/ir-library/service.js:297— IrLibraryService.resolveDecodedPcm has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PipelineItemBuilder.addBusInfo (cyclomatic 23) js/ui/pipeline/pipeline-item-builder.js:324— PipelineItemBuilder.addBusInfo has cyclomatic complexity 23 (threshold 15). Of this number, 22 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.
visualizer-midi.drawMidiNotes (cyclomatic 23) js/visualizer/visualizer-midi.js:122— visualizer-midi.drawMidiNotes has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GuitarFretboardDisplay.solveShape (cyclomatic 23) js/visualizer/visualizer-guitar.js:239— GuitarFretboardDisplay.solveShape has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (search, a function literal at line 244, a function literal at line 278). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PowerPolicyController._updateDeadlineClocks (cyclomatic 23) js/audio/power-policy-controller.js:753— PowerPolicyController._updateDeadlineClocks has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
effetune-benchmark.createWasmBenchmarkRuntime (cyclomatic 23) features/effetune-benchmark.js:874— effetune-benchmark.createWasmBenchmarkRuntime has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
UIManager.prepareConfigScreen (cyclomatic 23) features/measurement/ui/ui-manager.js:456— UIManager.prepareConfigScreen 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.
AndroidAudioManager.acceptRuntimeEvent (cyclomatic 23) js/android/audio-manager.js:39— AndroidAudioManager.acceptRuntimeEvent has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioPlayerUI.refreshVideoRotation (cyclomatic 23) js/ui/audio-player/audio-player-ui.js:1248— AudioPlayerUI.refreshVideoRotation has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
library-view-components.bindLibraryTrackPointer (cyclomatic 23) js/ui/library/library-view-components.js:194— library-view-components.bindLibraryTrackPointer has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 218, selectFromLongPress, a function literal at line 238, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PipelineAnalyzerUI.renderCursorReadout (cyclomatic 23) js/pipeline-analyzer/ui.js:1304— PipelineAnalyzerUI.renderCursorReadout 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.
NetworkPlaybackAdapter.sync (cyclomatic 23) js/network-music/playback-adapter.js:103— NetworkPlaybackAdapter.sync has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ElectronIntegration.patchDocumentationLinks (cyclomatic 23) js/electron-integration.js:59— ElectronIntegration.patchDocumentationLinks has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 65, 61). 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.
design-core.directPhaseAnalysis (cyclomatic 23) js/room-eq/design-core.js:1079— design-core.directPhaseAnalysis 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.
PluginProcessor.findNoteAnalysisSources (cyclomatic 23) REDACTED:6272— PluginProcessor.findNoteAnalysisSources has cyclomatic complexity 23 (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.
SFZNotePlayerPlugin.setParameters (cyclomatic 23) plugins/others/sfz_note_player.js:48— SFZNotePlayerPlugin.setParameters 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.
CrosstalkCancellationPlugin._designAndStage (cyclomatic 23) plugins/spatial/crosstalk_cancellation.js:340— CrosstalkCancellationPlugin._designAndStage has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PhaseSelectEqPlugin._applyPointerMove (cyclomatic 23) plugins/spatial/phase_select_eq.js:1099— PhaseSelectEqPlugin._applyPointerMove 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.
observeMidiOwnership (cyclomatic 23) REDACTED:7709— observeMidiOwnership has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
startSfzRuntime (cyclomatic 23) REDACTED:7987— startSfzRuntime 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.
constructor (cyclomatic 23) js/audio/power-policy-controller.js:111— constructor has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
normalizeConfig (cyclomatic 23) js/room-eq/design-core.js:2323— normalizeConfig has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
validateMeasurementBackup (cyclomatic 23) features/measurement/dataStorage.js:74— validateMeasurementBackup has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
extractArtwork (cyclomatic 23) electron/library-catalog-scan-runtime.cjs:545— extractArtwork has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
browse (cyclomatic 23) electron/network-music-host.cjs:208— browse has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 5 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.
getStatus (cyclomatic 23) electron/network-output-host.cjs:224— getStatus has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 4 function items inside it that branch. 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.
deriveFrequencyResponse (cyclomatic 23) js/pipeline-analyzer/analysis-core.js:578— deriveFrequencyResponse 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.
prepareBankSource (cyclomatic 23) js/sfz/service.js:108— prepareBankSource has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
storeSfzRuntimeCheckpoints (cyclomatic 23) js/audio/audio-manager-sfz-runtime.js:112— storeSfzRuntimeCheckpoints has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
setParameters (cyclomatic 23) plugins/eq/loudness_equalizer.js:297— setParameters 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.
graph-engine.createGraphEngineSession (cyclomatic 22) dsp/bindings/js/src/graph-engine.js:291— graph-engine.createGraphEngineSession has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
effects.packSfzEffects (cyclomatic 22) js/sfz/effects.js:186— effects.packSfzEffects has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
browser-preload.installVirtualMidi::parseMessages (cyclomatic 22) electron/browser-preload.js:31— browser-preload.installVirtualMidi::parseMessages 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.
clipboard-ipc.registerClipboardIpcHandlers (cyclomatic 22) electron/clipboard-ipc.js:3— clipboard-ipc.registerClipboardIpcHandlers has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 26, 7, 16). 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.
remote-control-host.pickLanAddress (cyclomatic 22) electron/remote-control-host.cjs:140— remote-control-host.pickLanAddress has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
library-catalog-utility.handleMessage (cyclomatic 22) electron/library-catalog-utility.cjs:33— library-catalog-utility.handleMessage 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.
PluginPresetDialog.renderContent (cyclomatic 22) js/ui/pipeline/plugin-preset-dialog.js:332— PluginPresetDialog.renderContent has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
musicxml-parser.unzipScore (cyclomatic 22) js/midi/musicxml-parser.js:83— musicxml-parser.unzipScore has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (musicxml-parser.unzipScore::extract) 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.
DragDropManager.setupPresetItemDragEvents (cyclomatic 22) js/ui/plugin-list/drag-drop-manager.js:403— DragDropManager.setupPresetItemDragEvents has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 512, 461, 495, …). 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.
visual-sync.telemetryCaptureTiming (cyclomatic 22) js/audio/visual-sync.js:167— visual-sync.telemetryCaptureTiming has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
measurement-model.averageResponses (cyclomatic 22) features/measurement/measurement-model.js:63— measurement-model.averageResponses has cyclomatic complexity 22 (threshold 15). Of this number, 20 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.
UserDataBackupService.createBackup (cyclomatic 22) js/user-data-backup/service.js:78— UserDataBackupService.createBackup has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MidiInputState.hydration (cyclomatic 22) js/midi/smf-timeline.js:160— MidiInputState.hydration 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.
lyrics.parseLrc (cyclomatic 22) js/library/metadata/lyrics.js:32— lyrics.parseLrc 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.
visualizer-counter.animateCounterFrame (cyclomatic 22) js/visualizer/visualizer-counter.js:54— visualizer-counter.animateCounterFrame has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MidiEventListDisplay.draw (cyclomatic 22) js/visualizer/visualizer-midi-event-list.js:41— MidiEventListDisplay.draw has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MidiLiveInput.onMessage (cyclomatic 22) js/midi/live-input.js:48— MidiLiveInput.onMessage has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PowerPolicyController._setUiPowerGate (cyclomatic 22) js/audio/power-policy-controller.js:1934— PowerPolicyController._setUiPowerGate has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
design-utils.processCollisions (cyclomatic 22) features/measurement/peq-calculator/design-utils.js:14— design-utils.processCollisions has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioContextManager.startMediaElementPlayback (cyclomatic 22) js/ui/audio-player/audio-context-manager.js:5682— AudioContextManager.startMediaElementPlayback has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 5757, fail, removeListeners). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
AirPlayPlayback.handleMessage (cyclomatic 22) js/ui/audio-player/airplay-playback.js:39— AirPlayPlayback.handleMessage has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
web-cue-source-resolver.resolveWebCueSiblingFiles (cyclomatic 22) js/ui/web-cue-source-resolver.js:11— web-cue-source-resolver.resolveWebCueSiblingFiles 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.
RemoteSession.onMessage (cyclomatic 22) js/remote/remote-session.js:185— RemoteSession.onMessage 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.
PluginProcessor.stageDspAsset (cyclomatic 22) REDACTED:5442— PluginProcessor.stageDspAsset 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.
BassManagementPlugin._configurationError (cyclomatic 22) plugins/basics/bass_management.js:263— BassManagementPlugin._configurationError 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.
RoomEqAdditionalEqEditor.updateResponse (cyclomatic 22) plugins/eq/room_eq.js:753— RoomEqAdditionalEqEditor.updateResponse has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RoomEqPlugin._renderMeasurement (cyclomatic 22) plugins/eq/room_eq.js:2312— RoomEqPlugin._renderMeasurement has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
tonal_balance_eq.computeTonalBalanceEqView (cyclomatic 22) plugins/eq/tonal_balance_eq.js:182— tonal_balance_eq.computeTonalBalanceEqView 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.
DigitalErrorEmulatorPlugin.setParameters (cyclomatic 22) plugins/lofi/digital_error_emulator.js:940— DigitalErrorEmulatorPlugin.setParameters has cyclomatic complexity 22 (threshold 15). Of this number, 19 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.
SoundFontPlayerPlugin.handleMixerTelemetry (cyclomatic 22) plugins/others/soundfont_player.js:725— SoundFontPlayerPlugin.handleMixerTelemetry has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IRReverbPlugin._emitAndStage (cyclomatic 22) plugins/reverb/ir_reverb.js:619— IRReverbPlugin._emitAndStage has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AssetData.__post_init__ (cyclomatic 22) dsp/bindings/python/src/effetune/assets.py:41— AssetData.__post_init__ 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.
validation._validate_scalar (cyclomatic 22) dsp/bindings/python/src/effetune/validation.py:171— validation._validate_scalar 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.
_configureWorklets (cyclomatic 22) js/audio/power-policy-controller.js:1096— _configureWorklets has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
createAudioPlayer (cyclomatic 22) js/ui-manager.js:2634— createAudioPlayer has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_paintVolumeFrame (cyclomatic 22) plugins/analyzer/note_spectrogram.js:1723— _paintVolumeFrame has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to 4 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.
storeEvent (cyclomatic 22) plugins/analyzer/rhythm_analyzer.js:896— storeEvent has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
initAudioOutput (cyclomatic 22) js/audio/audio-io-manager.js:744— initAudioOutput has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
drawDifferenceFrequency (cyclomatic 22) plugins/lofi/dsd64_imd_simulator.js:1056— drawDifferenceFrequency has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
normalizeEffect (cyclomatic 22) js/visualizer/visualizer-model.js:214— normalizeEffect has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
expression (cyclomatic 22) js/sfz/script-compiler.js:106— expression 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.
statement (cyclomatic 22) js/sfz/script-compiler.js:153— statement has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_bindPreview (cyclomatic 22) plugins/sfz-instrument.js:646— _bindPreview has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 8 function items inside it that branch ((anonymous)::pointerdown, (anonymous)::end, (anonymous)::pointermove, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_replayPipelineWasmAssets (cyclomatic 22) js/audio/audio-manager-wasm-assets.js:302— _replayPipelineWasmAssets 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.
_waitForPendingExternalAssetDescriptors (cyclomatic 22) js/audio/audio-manager-wasm-assets.js:737— _waitForPendingExternalAssetDescriptors has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 8 function items inside it that branch (evaluate, check, a function literal at line 740, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
validatePowerSnapshot (cyclomatic 22) js/audio/power-snapshot.js:897— validatePowerSnapshot has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
getNativeMixerMetadata (cyclomatic 22) js/audio/audio-manager-sfz-runtime.js:50— getNativeMixerMetadata has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
effect.canonicalizeProcessingParameters (cyclomatic 21) REDACTED:92— effect.canonicalizeProcessingParameters has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
telemetry.decodeStereo (cyclomatic 21) dsp/bindings/js/src/telemetry.js:738— telemetry.decodeStereo has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: telemetry.decodePitchMeter (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
midi.normalizeMidiMessage (cyclomatic 21) dsp/bindings/js/src/midi.js:42— midi.normalizeMidiMessage has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
network-music-content.parseSearch (cyclomatic 21) electron/network-music-content.cjs:29— network-music-content.parseSearch has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (relation, conjunction, disjunction). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
OpenHomeControlHost.applyEnabledTransition (cyclomatic 21) electron/openhome-control-host.cjs:203— OpenHomeControlHost.applyEnabledTransition 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.
LocalOpenHomePlayer.invoke (cyclomatic 21) REDACTED:46— LocalOpenHomePlayer.invoke 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.
PwaNetworkHost.validatePlayerTrack (cyclomatic 21) REDACTED:203— PwaNetworkHost.validatePlayerTrack 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.
LiveStream.feedback (cyclomatic 21) REDACTED:174— LiveStream.feedback has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IrLibraryStore.open (cyclomatic 21) js/ir-library/ir-library-store.js:167— IrLibraryStore.open 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.
power-topology.normalizeAnalyticAgeDescriptor (cyclomatic 21) js/audio/power-topology.js:42— power-topology.normalizeAnalyticAgeDescriptor has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
StandardSelectManager.handleKeyDown (cyclomatic 21) js/ui/standard-select.js:99— StandardSelectManager.handleKeyDown 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.
DragDropManager.findPotentialInsertionTarget (cyclomatic 21) js/ui/plugin-list/drag-drop-manager.js:54— DragDropManager.findPotentialInsertionTarget 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.
range-precision-controller.installRangePrecisionControl::onPointerDown (cyclomatic 21) js/ui/range-precision-controller.js:166— range-precision-controller.installRangePrecisionControl::onPointerDown has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
adapters.createUserDataBackupAdapter.validateItem (cyclomatic 21) js/user-data-backup/adapters.js:63— adapters.createUserDataBackupAdapter.validateItem has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
archive.createArchive (cyclomatic 21) js/user-data-backup/archive.js:138— archive.createArchive has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
visualizer-text.drawStyledText (cyclomatic 21) js/visualizer/visualizer-text.js:21— visualizer-text.drawStyledText has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
visualizer-analyzer-display.createSpectrumSmoother.<returned closure> (cyclomatic 21) js/visualizer/visualizer-analyzer-display.js:67— visualizer-analyzer-display.createSpectrumSmoother.<returned closure> 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.
VisualizerEditor.startDrag (cyclomatic 21) js/visualizer/visualizer-editor.js:1493— VisualizerEditor.startDrag has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
VisualizerView.counters (cyclomatic 21) REDACTED:640— VisualizerView.counters has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 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.
AudioManager.registerPipelineProcessors (cyclomatic 21) js/audio-manager.js:2972— AudioManager.registerPipelineProcessors 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.
rolling-pcm-protocol.validateRollingPcmEnvelope (cyclomatic 21) js/ui/audio-player/rolling-pcm-protocol.js:72— rolling-pcm-protocol.validateRollingPcmEnvelope has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: rolling-pcm-protocol.validateRollingPcmFragment (cyclomatic 37) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
rolling-pcm-policy.hasRollingMatrixCandidate (cyclomatic 21) REDACTED:780— rolling-pcm-policy.hasRollingMatrixCandidate has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: rolling-pcm-policy.findMatrixCell (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
PlaybackManager.prepareCatalogTrackForGraphRebuild (cyclomatic 21) js/ui/audio-player/playback-manager.js:1282— PlaybackManager.prepareCatalogTrackForGraphRebuild has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (findCurrentTarget, isCurrent). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
OpenHomePlaybackAdapter.playCatalogItems (cyclomatic 21) js/ui/audio-player/openhome-playback-adapter.js:728— OpenHomePlaybackAdapter.playCatalogItems 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.
result-adapter.smoothFiniteRuns (cyclomatic 21) js/pipeline-analyzer/result-adapter.js:158— result-adapter.smoothFiniteRuns has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
pipeline-snapshot.normalizeAnalyzerSlots (cyclomatic 21) js/pipeline-analyzer/pipeline-snapshot.js:67— pipeline-snapshot.normalizeAnalyzerSlots 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.
PipelineAnalyzerUI.buildOutputRow (cyclomatic 21) js/pipeline-analyzer/ui.js:1119— PipelineAnalyzerUI.buildOutputRow has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
design-core.frequencyDependentLowSpectrum (cyclomatic 21) js/room-eq/design-core.js:879— design-core.frequencyDependentLowSpectrum 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.
oscillator-source.prepareSfzOscillatorSources (cyclomatic 21) js/sfz/oscillator-source.js:58— oscillator-source.prepareSfzOscillatorSources has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
browser.openSfzLibraryBrowser (cyclomatic 21) js/sfz/browser.js:45— browser.openSfzLibraryBrowser has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (importFiles, a function literal at line 93, register, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
LevelMeterPlugin.process (cyclomatic 21) plugins/analyzer/level_meter.js:248— LevelMeterPlugin.process 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.
PluginProcessor.refreshDspPipeline (cyclomatic 21) REDACTED:6022— PluginProcessor.refreshDspPipeline 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.
PluginProcessor.rebuildDspLatencyPlan (cyclomatic 21) REDACTED:6127— PluginProcessor.rebuildDspLatencyPlan 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.
MultiChannelPanelPlugin.parseDspMultiChannelLevelsTelemetryFrame (cyclomatic 21) plugins/basics/multi_channel_panel.js:693— MultiChannelPanelPlugin.parseDspMultiChannelLevelsTelemetryFrame has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CombFilterPlugin.drawGraph (cyclomatic 21) plugins/eq/comb_filter.js:321— CombFilterPlugin.drawGraph has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FifteenBandGEQPlugin.drawGraph (cyclomatic 21) plugins/eq/fifteen_band_geq.js:422— FifteenBandGEQPlugin.drawGraph has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
3.run (cyclomatic 21) android/app/src/main/java/com/frieve/effetune/AudioService.java:1331— 3.run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
assets.resolve_topology (cyclomatic 21) dsp/bindings/python/src/effetune/assets.py:203— assets.resolve_topology 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.
python_golden_runner.main (cyclomatic 21) dsp/bindings/acceptance/python_golden_runner.py:1081— python_golden_runner.main 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.
applyStreamBoundary (cyclomatic 21) REDACTED:3831— applyStreamBoundary 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.
captureSfzRuntimeCheckpoint (cyclomatic 21) REDACTED:7814— captureSfzRuntimeCheckpoint 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.
commitMidiTransport (cyclomatic 21) REDACTED:8137— commitMidiTransport has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
setupBufferMonitoring (cyclomatic 21) js/ui/audio-player/audio-context-manager.js:3597— setupBufferMonitoring has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 3601). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
prepareTrackBuffer (cyclomatic 21) js/ui/audio-player/audio-context-manager.js:3743— prepareTrackBuffer 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.
prepareDsdPlaybackDecisionRecord (cyclomatic 21) js/ui/audio-player/audio-context-manager.js:4111— prepareDsdPlaybackDecisionRecord has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_requestDspModuleLoad (cyclomatic 21) js/audio-manager.js:823— _requestDspModuleLoad has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 5 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.
_headerItems (cyclomatic 21) plugins/analyzer/rhythm_analyzer.js:1432— _headerItems has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
onTrackEnded (cyclomatic 21) js/ui/audio-player/playback-manager.js:2106— onTrackEnded 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.
artworkClaimMatchesCurrentTrack (cyclomatic 21) electron/library-catalog-worker.cjs:2134— artworkClaimMatchesCurrentTrack has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
controlResolution (cyclomatic 21) features/measurement/ui/analysis-controller.js:356— controlResolution 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.
drawKeyboard (cyclomatic 21) plugins/analyzer/spectrum_analyzer.js:843— drawKeyboard has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to 4 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.
drawAxisLabels (cyclomatic 21) plugins/analyzer/spectrum_analyzer.js:1140— drawAxisLabels has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
videoFrame (cyclomatic 21) REDACTED:749— videoFrame has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
createSpectrumSmoother (cyclomatic 21) js/visualizer/visualizer-analyzer-display.js:65— createSpectrumSmoother has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 67). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
onWasmAssetState (cyclomatic 21) plugins/sfz-instrument.js:249— onWasmAssetState 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.
waitForEffectiveActiveWasmAssets (cyclomatic 21) js/audio/audio-manager-wasm-assets.js:188— waitForEffectiveActiveWasmAssets has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 252, (anonymous)::settle, (anonymous)::check, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
drawGraph (cyclomatic 21) plugins/basics/fir_crossover.js:851— drawGraph 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.
resolverResult (cyclomatic 21) dsp/bindings/js/src/assets.js:198— resolverResult has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
assets.encodeEta1 (cyclomatic 20) dsp/bindings/js/src/assets.js:283— assets.encodeEta1 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.
telemetry.decodeTelemetryPacket (cyclomatic 20) dsp/bindings/js/src/telemetry.js:888— telemetry.decodeTelemetryPacket has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: telemetry.decodePitchMeter (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
EffeTuneNode._handleMessage (cyclomatic 20) dsp/bindings/js/src/worklet.js:232— EffeTuneNode._handleMessage 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.
parser.instrumentPresentation (cyclomatic 20) js/sfz/parser.js:187— parser.instrumentPresentation 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.
CastSession.receive (cyclomatic 20) electron/cast-sender.cjs:179— CastSession.receive 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.
RemotePairingHost.requestApproval (cyclomatic 20) electron/remote-pairing.cjs:78— RemotePairingHost.requestApproval has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 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.
OpenHomeControlHost.commitMediaRegistration (cyclomatic 20) electron/openhome-control-host.cjs:534— OpenHomeControlHost.commitMediaRegistration 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.
remote-connection.resolveConnection (cyclomatic 20) electron/remote-connection.cjs:25— remote-connection.resolveConnection has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
measurement-backup-ipc.registerMeasurementBackupIpc (cyclomatic 20) electron/measurement-backup-ipc.cjs:78— measurement-backup-ipc.registerMeasurementBackupIpc has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 126, a function literal at line 103, a function literal at line 116, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
library-catalog-worker.browseFolderChildren (cyclomatic 20) electron/library-catalog-worker.cjs:1431— library-catalog-worker.browseFolderChildren has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: library-catalog-worker.dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
IrLibraryService.importFiles (cyclomatic 20) js/ir-library/service.js:184— IrLibraryService.importFiles has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileProcessor.createFileDropArea (cyclomatic 20) js/ui/pipeline/file-processor.js:47— FileProcessor.createFileDropArea 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.
SearchManager.filterPlugins (cyclomatic 20) js/ui/plugin-list/search-manager.js:149— SearchManager.filterPlugins has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 158, 173). 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.
portable.references (cyclomatic 20) js/user-data-backup/portable.js:45— portable.references has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
visualizer-sources.analysisSettings (cyclomatic 20) js/visualizer/visualizer-sources.js:65— visualizer-sources.analysisSettings 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.
track-information.formatTrackInformation (cyclomatic 20) js/ui/audio-player/track-information.js:22— track-information.formatTrackInformation 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.
VisualizerEditor.parameters::update (cyclomatic 20) js/visualizer/visualizer-editor.js:868— VisualizerEditor.parameters::update has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PowerDiagnostics.mergeWorkletCounters (cyclomatic 20) js/audio/power-diagnostics.js:67— PowerDiagnostics.mergeWorkletCounters 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.
AudioManager._recomputeVisualSyncDelay (cyclomatic 20) js/audio-manager.js:2403— AudioManager._recomputeVisualSyncDelay 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.
AudioManager._prepareParallelJsFallbackBudgets (cyclomatic 20) js/audio-manager.js:2544— AudioManager._prepareParallelJsFallbackBudgets has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
measurement.captureAndroidSweep (cyclomatic 20) js/android/measurement.js:26— measurement.captureAndroidSweep has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
web-sqlite-runtime.browseFolderChildren (cyclomatic 20) js/library/repository/web-sqlite-runtime.js:1374— web-sqlite-runtime.browseFolderChildren has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: web-sqlite-runtime.dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
web-catalog-worker.installWebCatalogWorker::handleMessage (cyclomatic 20) js/library/repository/web-catalog-worker.js:167— web-catalog-worker.installWebCatalogWorker::handleMessage 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.
WebCatalogRepositoryClient.#handleMessage (cyclomatic 20) js/library/repository/web-catalog-client.js:195— WebCatalogRepositoryClient.#handleMessage 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.
PwaNetworkMusicTransport.request (cyclomatic 20) js/network-music/pwa-transport.js:120— PwaNetworkMusicTransport.request 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.
UIManager.initKeyboardShortcuts (cyclomatic 20) js/ui-manager.js:2946— UIManager.initKeyboardShortcuts has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 2947). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
MidiMappingEngine.applyFrame (cyclomatic 20) js/midi/midi-mapping-engine.js:221— MidiMappingEngine.applyFrame has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (apply). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
App.openConfiguredStartupView (cyclomatic 20) js/app.js:867— App.openConfiguredStartupView has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
flac-stream.decodeFlacFrame (cyclomatic 20) js/sfz/flac-stream.js:125— flac-stream.decodeFlacFrame 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.
SfzSampleStreamWorker.receive (cyclomatic 20) js/sfz/sample-stream-worker.js:17— SfzSampleStreamWorker.receive 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.
source.readSfzBankDefines (cyclomatic 20) js/sfz/source.js:33— source.readSfzBankDefines has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to 4 function items inside it that branch. 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.
NativeSfzLibraryService.prepare (cyclomatic 20) js/sfz/native-service.js:203— NativeSfzLibraryService.prepare has cyclomatic complexity 20 (threshold 15). Of this number, 18 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.
NoteSpectrogramPlugin.flushTimbreHistory (cyclomatic 20) plugins/analyzer/note_spectrogram.js:703— NoteSpectrogramPlugin.flushTimbreHistory 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.
PluginProcessor._prepareTemporalCapabilities (cyclomatic 20) REDACTED:4059— PluginProcessor._prepareTemporalCapabilities 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.
PluginProcessor.finishDspPipelineBlock (cyclomatic 20) REDACTED:6659— PluginProcessor.finishDspPipelineBlock 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.
PluginProcessor.tapVisualizerInstances (cyclomatic 20) REDACTED:6877— PluginProcessor.tapVisualizerInstances has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PluginProcessor.mutationDiscontinuity (cyclomatic 20) REDACTED:7012— PluginProcessor.mutationDiscontinuity 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, 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.
MultiChannelPanelPlugin.setParameters (cyclomatic 20) plugins/basics/multi_channel_panel.js:274— MultiChannelPanelPlugin.setParameters 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.
RoomEqPlugin.createOfflineDspState (cyclomatic 20) plugins/eq/room_eq.js:2083— RoomEqPlugin.createOfflineDspState has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TiltEQPlugin.drawGraph (cyclomatic 20) plugins/eq/tilt_eq.js:404— TiltEQPlugin.drawGraph has cyclomatic complexity 20 (threshold 15). Of this number, 15 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.
ToneControlPlugin.drawGraph (cyclomatic 20) plugins/eq/tone_control.js:406— ToneControlPlugin.drawGraph has cyclomatic complexity 20 (threshold 15). Of this number, 15 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.
DSD64IMDSimulatorPlugin.parseDspImdTelemetryFrame (cyclomatic 20) plugins/lofi/dsd64_imd_simulator.js:646— DSD64IMDSimulatorPlugin.parseDspImdTelemetryFrame has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SFZNotePlayerPlugin.handleTelemetry (cyclomatic 20) plugins/others/sfz_note_player.js:141— SFZNotePlayerPlugin.handleTelemetry has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IRReverbPlugin._loadLibraryEntry (cyclomatic 20) plugins/reverb/ir_reverb.js:883— IRReverbPlugin._loadLibraryEntry has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TubeSimulatorPlugin._updateHudValues (cyclomatic 20) plugins/saturation/tube_simulator.js:6829— TubeSimulatorPlugin._updateHudValues 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.
SFZInstrumentPlugin._renderInstrumentDetails (cyclomatic 20) plugins/sfz-instrument.js:460— SFZInstrumentPlugin._renderInstrumentDetails has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: SFZInstrumentPlugin._ensureSwitchTelemetrySubscription (cyclomatic 29) 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 method is counted neither in this dimension's figures nor in its score.
AudioService.remoteCommand (cyclomatic 20) android/app/src/main/java/com/frieve/effetune/AudioService.java:910— AudioService.remoteCommand 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.
GraphStream.set_param (cyclomatic 20) dsp/bindings/python/src/effetune/graph.py:668— GraphStream.set_param 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.
validation.validate_bass_management (cyclomatic 20) dsp/bindings/python/src/effetune/validation.py:333— validation.validate_bass_management has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
compact_model.compact_model (cyclomatic 20) dsp/plugins/analyzer/tree_models/compact_model.py:25— compact_model.compact_model 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.
tryDspPipeline (cyclomatic 20) REDACTED:6612— tryDspPipeline 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.
restoreSfzRuntimeCheckpoint (cyclomatic 20) REDACTED:7862— restoreSfzRuntimeCheckpoint has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
appendPlaylistImportRecords (cyclomatic 20) js/library/repository/catalog-runtime-core.js:3286— appendPlaylistImportRecords has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 3294). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
requeueLatestMetadata (cyclomatic 20) js/library/repository/catalog-runtime-core.js:5886— requeueLatestMetadata has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
setupAudioElement (cyclomatic 20) js/ui/audio-player/audio-context-manager.js:2407— setupAudioElement 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.
prepareMediaTransitionCandidate (cyclomatic 20) js/ui/audio-player/audio-context-manager.js:5543— prepareMediaTransitionCandidate 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.
_handleParallelDspReady (cyclomatic 20) js/audio-manager.js:1779— _handleParallelDspReady 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.
requestSilentInputSelection (cyclomatic 20) js/audio/power-policy-controller.js:3084— requestSilentInputSelection 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.
_drawImpulseResponse (cyclomatic 20) plugins/eq/room_eq.js:2996— _drawImpulseResponse 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.
showConfigDialog::renderNetworkOutput (cyclomatic 20) js/electron/configIntegration.js:1557— showConfigDialog::renderNetworkOutput 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.
updateTransferGraphs (cyclomatic 20) plugins/dynamics/multiband_expander.js:1002— updateTransferGraphs has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 5 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.
drawGraph (cyclomatic 20) plugins/basics/channel_divider.js:805— drawGraph has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
getTemporalFacts (cyclomatic 20) js/audio/power-policy.js:257— getTemporalFacts 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.
createBrowserController.receiveMidiFile (cyclomatic 20) electron/browser-controller.cjs:422— createBrowserController.receiveMidiFile has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
createBrowserController.showContextMenu (cyclomatic 20) electron/browser-controller.cjs:665— createBrowserController.showContextMenu has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
validateWorkletNode (cyclomatic 20) js/audio/power-snapshot.js:850— validateWorkletNode has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
onSpectrumMessage (cyclomatic 20) plugins/spectrum-overlay.js:332— onSpectrumMessage 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.
postMidiTransport (cyclomatic 20) js/ui/audio-player/midi-playback.js:102— postMidiTransport 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.
graph-document.chainDocumentFromGraph (cyclomatic 19) dsp/bindings/js/src/graph-document.js:510— graph-document.chainDocumentFromGraph has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
modulation.packSf2Modulation (cyclomatic 19) js/sf2/modulation.js:8— modulation.packSf2Modulation 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.
file-access.assertPath (cyclomatic 19) electron/file-access.cjs:44— file-access.assertPath 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.
local-playback-ingress.resolveElectronCueSelection (cyclomatic 19) electron/local-playback-ingress.cjs:165— local-playback-ingress.resolveElectronCueSelection has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
browser-controller.createBrowserController.receiveMidiFile (cyclomatic 19) electron/browser-controller.cjs:422— browser-controller.createBrowserController.receiveMidiFile has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
browser-controller.createBrowserController.showContextMenu (cyclomatic 19) electron/browser-controller.cjs:665— browser-controller.createBrowserController.showContextMenu has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 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.
RemotePairingHost.handle (cyclomatic 19) electron/remote-pairing.cjs:51— RemotePairingHost.handle has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
bank.validateSfzBankIndex (cyclomatic 19) js/sfz/bank.js:93— bank.validateSfzBankIndex has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
serialization-utils.applySerializedState::applyState (cyclomatic 19) js/utils/serialization-utils.js:153— serialization-utils.applySerializedState::applyState 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.
StandardSelectManager.position (cyclomatic 19) js/ui/standard-select.js:281— StandardSelectManager.position has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PresetManager.deletePresets (cyclomatic 19) js/ui/pipeline/preset-manager.js:482— PresetManager.deletePresets has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
portable.prepareItems::fingerprint (cyclomatic 19) js/user-data-backup/portable.js:203— portable.prepareItems::fingerprint 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.
event-list.describeEvent (cyclomatic 19) js/midi/event-list.js:55— event-list.describeEvent 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.
GuitarFretboardDisplay.handleTelemetry (cyclomatic 19) js/visualizer/visualizer-guitar.js:83— GuitarFretboardDisplay.handleTelemetry has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PowerPolicyController._handoffPipelineToSilentSource (cyclomatic 19) js/audio/power-policy-controller.js:2412— PowerPolicyController._handoffPipelineToSilentSource has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
index.resolveInterfaceCalibrationEntry (cyclomatic 19) features/measurement/measurement-controller/index.js:47— index.resolveInterfaceCalibrationEntry has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
riff-info.readRiffInfoTagsFromReader (cyclomatic 19) js/library/metadata/riff-info.js:31— riff-info.readRiffInfoTagsFromReader 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.
playback-source-policy.choosePlaybackMode (cyclomatic 19) js/ui/audio-player/playback-source-policy.js:46— playback-source-policy.choosePlaybackMode 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.
AudioContextManager.getPlaybackPositionForGraphRebind (cyclomatic 19) js/ui/audio-player/audio-context-manager.js:1229— AudioContextManager.getPlaybackPositionForGraphRebind has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
OnboardingTour.showStep (cyclomatic 19) js/ui/onboarding-tour.js:109— OnboardingTour.showStep 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.
bulk-operation-protocol.validateBulkOperationStart (cyclomatic 19) js/library/operations/bulk-operation-protocol.js:44— bulk-operation-protocol.validateBulkOperationStart has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
web-sqlite-runtime.createContextFilter (cyclomatic 19) js/library/repository/web-sqlite-runtime.js:1257— web-sqlite-runtime.createContextFilter has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: web-sqlite-runtime.dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
MetadataParseService.processBatch (cyclomatic 19) js/library/scan/metadata-parse-service.js:153— MetadataParseService.processBatch has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
web-catalog-worker.measureWebCatalogMessageBytes::visit (cyclomatic 19) js/library/repository/web-catalog-worker.js:279— web-catalog-worker.measureWebCatalogMessageBytes::visit has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LibraryView.updateNav (cyclomatic 19) js/ui/library/library-view.js:1230— LibraryView.updateNav has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1248, 1237). 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.
PipelineAnalyzerController._handleWorkerMessage (cyclomatic 19) js/pipeline-analyzer/controller.js:748— PipelineAnalyzerController._handleWorkerMessage has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PwaNetworkMusicTransport.networkMusicPlayerCommand (cyclomatic 19) js/network-music/pwa-transport.js:290— PwaNetworkMusicTransport.networkMusicPlayerCommand 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.
ElectronIntegration.initEventListeners (cyclomatic 19) js/electron-integration.js:136— ElectronIntegration.initEventListeners has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 167, 232, 148, …). 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.
design-core.designFIRCrossover (cyclomatic 19) js/fir-crossover/design-core.js:166— design-core.designFIRCrossover has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LivePcmCore.render (cyclomatic 19) js/ui/audio-player/live-pcm-core.js:69— LivePcmCore.render 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.
NoteSpectrogramPlugin.ensureDspTelemetrySubscription (cyclomatic 19) plugins/analyzer/note_spectrogram.js:766— NoteSpectrogramPlugin.ensureDspTelemetrySubscription has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
RhythmAnalyzerPlugin._readRhythm (cyclomatic 19) plugins/analyzer/rhythm_analyzer.js:2173— RhythmAnalyzerPlugin._readRhythm has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FIRCrossoverPlugin.setParameters (cyclomatic 19) plugins/basics/fir_crossover.js:129— FIRCrossoverPlugin.setParameters 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.
TransientShaperPlugin.drawGraph (cyclomatic 19) plugins/dynamics/transient_shaper.js:291— TransientShaperPlugin.drawGraph has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FiveBandPEQPlugin.createUI (cyclomatic 19) plugins/eq/five_band_peq.js:364— FiveBandPEQPlugin.createUI has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 467, updateQControlsState, a function literal at line 646, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SoundFontPlayerPlugin._updateMidiMetering (cyclomatic 19) plugins/others/soundfont_player.js:261— SoundFontPlayerPlugin._updateMidiMetering has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ModalResonatorPlugin._syncUI (cyclomatic 19) plugins/resonator/modal_resonator.js:455— ModalResonatorPlugin._syncUI has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ModalResonatorPlugin.createUI (cyclomatic 19) plugins/resonator/modal_resonator.js:503— ModalResonatorPlugin.createUI has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 572, createResonatorRow, a function literal at line 557, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
IRReverbPlugin._importFiles (cyclomatic 19) plugins/reverb/ir_reverb.js:305— IRReverbPlugin._importFiles 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.
IRReverbPlugin.onWasmAssetRejected (cyclomatic 19) plugins/reverb/ir_reverb.js:1693— IRReverbPlugin.onWasmAssetRejected has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SubSynthPlugin.drawGraph (cyclomatic 19) plugins/saturation/sub_synth.js:433— SubSynthPlugin.drawGraph has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SpectrumOverlayInstance._sync (cyclomatic 19) plugins/spectrum-overlay.js:261— SpectrumOverlayInstance._sync has cyclomatic complexity 19 (threshold 15). Of this number, 17 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.
telemetry._decode_multires_hq (cyclomatic 19) dsp/bindings/python/src/effetune/telemetry.py:604— telemetry._decode_multires_hq 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.
workletChannelSelection (cyclomatic 19) REDACTED:2206— workletChannelSelection has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
isSfzInstrumentJoinReady (cyclomatic 19) REDACTED:5573— isSfzInstrumentJoinReady has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
normalizeScanLogicalCandidate (cyclomatic 19) js/library/repository/catalog-runtime-core.js:6439— normalizeScanLogicalCandidate has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
loadTrackData (cyclomatic 19) js/ui/audio-player/audio-context-manager.js:3856— loadTrackData 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.
announceFiniteStreamEnd (cyclomatic 19) js/ui/audio-player/audio-context-manager.js:5072— announceFiniteStreamEnd 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.
_rebindSfzDspGraph::execute (cyclomatic 19) js/audio-manager.js:3200— _rebindSfzDspGraph::execute 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.
renderPagedLibrary (cyclomatic 19) js/ui/library/library-view.js:1066— renderPagedLibrary has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createPagedSectionHeader (cyclomatic 19) js/ui/library/library-view.js:2203— createPagedSectionHeader has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs 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.
getPagedInvalidationDecision (cyclomatic 19) js/ui/library/library-view.js:4004— getPagedInvalidationDecision has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_noteDisplayColor (cyclomatic 19) plugins/analyzer/note_spectrogram.js:611— _noteDisplayColor has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
consensusLowPhaseCorrection (cyclomatic 19) js/room-eq/design-core.js:1201— consensusLowPhaseCorrection has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs 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.
updateTransferGraphs (cyclomatic 19) plugins/dynamics/multiband_compressor.js:1141— updateTransferGraphs has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 5 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.
drawKeyboard (cyclomatic 19) plugins/analyzer/spectrogram.js:1165— drawKeyboard has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to 4 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.
enqueueAction (cyclomatic 19) js/ui/audio-player/openhome-playback-adapter.js:93— enqueueAction has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 105, isCurrent, a function literal at line 147). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
playLibrarySelection (cyclomatic 19) js/network-music/view.js:801— playLibrarySelection has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
inferRollingFormat (cyclomatic 19) REDACTED:1020— inferRollingFormat 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.
normalizeMemoryProfileResult (cyclomatic 19) REDACTED:1175— normalizeMemoryProfileResult has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_ensureMixerTelemetrySubscription (cyclomatic 19) plugins/others/soundfont_player.js:701— _ensureMixerTelemetrySubscription has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
commitPage (cyclomatic 19) js/ui/library/paged-view-controller.js:128— commitPage has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_updateWasmAssetState (cyclomatic 19) js/audio/audio-manager-wasm-assets.js:478— _updateWasmAssetState has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
normalizeCueWarnings (cyclomatic 19) js/library/library-manager-v2.js:769— normalizeCueWarnings has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 4 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.
playMidi (cyclomatic 19) js/ui/audio-player/midi-playback.js:499— playMidi has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
registerLibraryCatalogControlIpc (cyclomatic 19) electron/library-catalog-host.cjs:669— registerLibraryCatalogControlIpc has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 14 function items inside it that branch. 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.
playerState (cyclomatic 19) REDACTED:292— playerState has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 294). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
(anonymous) (cyclomatic 19) assets/js/site.js:1— (anonymous) has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
assets.inferEta1Format (cyclomatic 18) dsp/bindings/js/src/assets.js:131— assets.inferEta1Format has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
assets.prepareIrAsset (cyclomatic 18) dsp/bindings/js/src/assets.js:594— assets.prepareIrAsset has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OpenHomeMediaGateway.requestLiveFeedback (cyclomatic 18) REDACTED:93— OpenHomeMediaGateway.requestLiveFeedback has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 118, 103, 113). 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.
openhome-control-host.extractDidlAlbumArtUri (cyclomatic 18) electron/openhome-control-host.cjs:891— openhome-control-host.extractDidlAlbumArtUri 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.
network-output-host.normalizeConfiguration (cyclomatic 18) electron/network-output-host.cjs:58— network-output-host.normalizeConfiguration has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 66). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
LibraryCatalogUtilityHost.handleMessage (cyclomatic 18) electron/library-catalog-utility-host.cjs:234— LibraryCatalogUtilityHost.handleMessage 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.
library-catalog-worker.executeContextPage (cyclomatic 18) electron/library-catalog-worker.cjs:1157— library-catalog-worker.executeContextPage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: library-catalog-worker.dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
library-catalog-worker.executePlaylistContextPage (cyclomatic 18) electron/library-catalog-worker.cjs:1207— library-catalog-worker.executePlaylistContextPage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: library-catalog-worker.dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
ir-library-limits.requireBoundedDecodedIrHeader (cyclomatic 18) js/ir-library/ir-library-limits.js:45— ir-library-limits.requireBoundedDecodedIrHeader has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
power-topology.getZeroOutputProof (cyclomatic 18) js/audio/power-topology.js:161— power-topology.getZeroOutputProof has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
dsp-engine-binding.createDspImports (cyclomatic 18) js/audio/dsp-engine-binding.js:134— dsp-engine-binding.createDspImports has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (fdWrite). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
parameter-edit-lock.installParameterEditLock (cyclomatic 18) js/ui/pipeline/parameter-edit-lock.js:14— parameter-edit-lock.installParameterEditLock has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (blockEdit). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PresetManager.savePreset (cyclomatic 18) js/ui/pipeline/preset-manager.js:213— PresetManager.savePreset 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.
text-encoding.getScriptContextBonus (cyclomatic 18) js/library/metadata/text-encoding.js:618— text-encoding.getScriptContextBonus has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SearchManager.filterPresets (cyclomatic 18) js/ui/plugin-list/search-manager.js:221— SearchManager.filterPresets has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 229, 244). 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.
UIEventHandler.handlePluginReordering (cyclomatic 18) js/ui/pipeline/ui-event-handler.js:812— UIEventHandler.handlePluginReordering has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 5 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.
UIEventHandler.handleNewPluginDrop (cyclomatic 18) js/ui/pipeline/ui-event-handler.js:931— UIEventHandler.handleNewPluginDrop has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MultiresSpectrum.constructor (cyclomatic 18) plugins/multires-spectrum.js:145— MultiresSpectrum.constructor has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
analysis.analyzeBurstDecay (cyclomatic 18) js/utils/measurement-dsp/analysis.js:272— analysis.analyzeBurstDecay 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.
dialog.openUserDataBackupDialog.applySelection (cyclomatic 18) js/user-data-backup/dialog.js:281— dialog.openUserDataBackupDialog.applySelection has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
lyrics.boundLyrics (cyclomatic 18) js/library/metadata/lyrics.js:195— lyrics.boundLyrics 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.
visualizer-ballistics.stepBallistics (cyclomatic 18) js/visualizer/visualizer-ballistics.js:26— visualizer-ballistics.stepBallistics has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PipelineProcessor.rebuildPipeline (cyclomatic 18) js/audio/pipeline-processor.js:56— PipelineProcessor.rebuildPipeline has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PowerPolicyController._maybeClearStaleManualResumeLatch (cyclomatic 18) js/audio/power-policy-controller.js:469— PowerPolicyController._maybeClearStaleManualResumeLatch has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AnalysisPlot.constructor (cyclomatic 18) features/measurement/ui/analysis-plot.js:36— AnalysisPlot.constructor has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 64, 55, 51). 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.
AnalysisPlot.read (cyclomatic 18) features/measurement/ui/analysis-plot.js:313— AnalysisPlot.read has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 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.
graph-image-copy.copyGraphImage (cyclomatic 18) features/measurement/ui/graph-image-copy.js:7— graph-image-copy.copyGraphImage has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 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.
AnalysisController.frequencySeries (cyclomatic 18) features/measurement/ui/analysis-controller.js:720— AnalysisController.frequencySeries has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AndroidAssets.transfer (cyclomatic 18) js/android/assets.js:69— AndroidAssets.transfer has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AudioContextManager.play (cyclomatic 18) js/ui/audio-player/audio-context-manager.js:2658— AudioContextManager.play has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
AudioContextManager.rearmPreparedAutomaticMove (cyclomatic 18) js/ui/audio-player/audio-context-manager.js:3545— AudioContextManager.rearmPreparedAutomaticMove has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
AudioContextManager.loadTrack (cyclomatic 18) js/ui/audio-player/audio-context-manager.js:3663— AudioContextManager.loadTrack has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
remote-music-service.createAndroidMusicService.playerCommand (cyclomatic 18) js/android/remote-music-service.js:75— remote-music-service.createAndroidMusicService.playerCommand has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AudioPlayerUI.updateVideoPresentation (cyclomatic 18) js/ui/audio-player/audio-player-ui.js:1160— AudioPlayerUI.updateVideoPresentation has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NetworkLivePcm.beginReporting::report (cyclomatic 18) js/ui/audio-player/network-live-pcm.js:124— NetworkLivePcm.beginReporting::report 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.
catalog-runtime-core.executeEntityContextPage (cyclomatic 18) js/library/repository/catalog-runtime-core.js:1120— catalog-runtime-core.executeEntityContextPage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
web-sqlite-runtime.executeContextPage (cyclomatic 18) js/library/repository/web-sqlite-runtime.js:1046— web-sqlite-runtime.executeContextPage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: web-sqlite-runtime.dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
web-sqlite-runtime.executePlaylistContextPage (cyclomatic 18) js/library/repository/web-sqlite-runtime.js:1097— web-sqlite-runtime.executePlaylistContextPage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: web-sqlite-runtime.dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
scan-state-machine.reduceScanFolderState (cyclomatic 18) js/library/scan/scan-state-machine.js:29— scan-state-machine.reduceScanFolderState 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.
PagedPlaylistService.#exportEntries (cyclomatic 18) js/library/playlists/paged-playlist-service.js:278— PagedPlaylistService.#exportEntries 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.
DurableActionController.#attach (cyclomatic 18) js/ui/library/durable-action-controller.js:143— DurableActionController.#attach has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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.
LibraryView.startPagedEntityPlay (cyclomatic 18) js/ui/library/library-view.js:3024— LibraryView.startPagedEntityPlay has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PipelineAnalyzerController.constructor (cyclomatic 18) js/pipeline-analyzer/controller.js:211— PipelineAnalyzerController.constructor has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PipelineAnalyzerUI.renderMeasurementSettings (cyclomatic 18) js/pipeline-analyzer/ui.js:1019— PipelineAnalyzerUI.renderMeasurementSettings 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.
PwaDeviceRegistration.open (cyclomatic 18) js/network-music/pwa-registration.js:48— PwaDeviceRegistration.open has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 94, 86, 122, …). 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.
UIManager.parsePipelineState (cyclomatic 18) js/ui-manager.js:603— UIManager.parsePipelineState has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 622). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RemoteControlDialog.render (cyclomatic 18) js/remote/remote-control-dialog.js:129— RemoteControlDialog.render has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 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.
sync-ops.deepEqual (cyclomatic 18) js/remote/sync-ops.mjs:26— sync-ops.deepEqual 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.
LocalInputSources.onKey (cyclomatic 18) js/midi/local-input-sources.js:121— LocalInputSources.onKey has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
design-core.designFiveBandFirPeq (cyclomatic 18) js/five-band-fir-peq/design-core.js:327— design-core.designFiveBandFirPeq has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
asset-library-browser.openAssetLibraryBrowser.runImport (cyclomatic 18) js/ui/asset-library-browser.js:356— asset-library-browser.openAssetLibraryBrowser.runImport has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 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.
AnalogMeterPlugin.drawCell (cyclomatic 18) plugins/analyzer/analog_meter.js:776— AnalogMeterPlugin.drawCell has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
analog_meter.parseAnalogMeterFrame (cyclomatic 18) plugins/analyzer/analog_meter.js:224— analog_meter.parseAnalogMeterFrame 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.
ChromaSpiralPlugin.drawGraph (cyclomatic 18) plugins/analyzer/chroma_spiral.js:301— ChromaSpiralPlugin.drawGraph has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ChromaSpiralPlugin.drawGraph::drawSignal) 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.
PitchMeterPlugin.writeHistory (cyclomatic 18) plugins/analyzer/pitch_meter.js:272— PitchMeterPlugin.writeHistory 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.
PluginProcessor.resumeSfzRuntimesForRender (cyclomatic 18) REDACTED:7955— PluginProcessor.resumeSfzRuntimesForRender has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
audio-processor.createDspImports (cyclomatic 18) REDACTED:140— audio-processor.createDspImports has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (fdWrite). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
BassManagementPlugin._updatePowerGainBound (cyclomatic 18) plugins/basics/bass_management.js:408— BassManagementPlugin._updatePowerGainBound 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.
BassManagementPlugin._syncControls (cyclomatic 18) plugins/basics/bass_management.js:1037— BassManagementPlugin._syncControls 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.
FifteenBandPEQPlugin.calculateBandResponse (cyclomatic 18) plugins/eq/fifteen_band_peq.js:1087— FifteenBandPEQPlugin.calculateBandResponse 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.
FiveBandPEQPlugin.setParameters (cyclomatic 18) plugins/eq/five_band_peq.js:331— FiveBandPEQPlugin.setParameters 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.
FiveBandPEQPlugin.calculateBandResponse (cyclomatic 18) plugins/eq/five_band_peq.js:810— FiveBandPEQPlugin.calculateBandResponse 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.
FrequencyPreviewInstance.draw (cyclomatic 18) plugins/frequency-preview.js:134— FrequencyPreviewInstance.draw has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AMRadioSimulatorPlugin.setParameters (cyclomatic 18) plugins/lofi/am_radio_simulator.js:1909— AMRadioSimulatorPlugin.setParameters has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AutoFilterPlugin.setParameters (cyclomatic 18) plugins/modulation/auto_filter.js:276— AutoFilterPlugin.setParameters has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SoundFontPlayerPlugin._createMixerKnob (cyclomatic 18) plugins/others/soundfont_player.js:504— SoundFontPlayerPlugin._createMixerKnob has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 520, end, a function literal at line 540, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
HornResonatorPlugin.setParameters (cyclomatic 18) plugins/resonator/horn_resonator.js:430— HornResonatorPlugin.setParameters has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HornResonatorPlusPlugin.setParameters (cyclomatic 18) plugins/resonator/horn_resonator_plus.js:461— HornResonatorPlusPlugin.setParameters has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MultibandBalancePlugin.setParameters (cyclomatic 18) plugins/spatial/multiband_balance.js:527— MultibandBalancePlugin.setParameters has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 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.
spectrum-overlay.analyze (cyclomatic 18) plugins/spectrum-overlay.js:42— spectrum-overlay.analyze has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MidiMappings.configure (cyclomatic 18) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:66— MidiMappings.configure 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.
Stream._prepare_events (cyclomatic 18) dsp/bindings/python/src/effetune/chain.py:685— Stream._prepare_events 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.
python_golden_runner.generate_stimulus (cyclomatic 18) dsp/bindings/acceptance/python_golden_runner.py:126— python_golden_runner.generate_stimulus 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.
initializeDsp (cyclomatic 18) REDACTED:4567— initializeDsp has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
rejectDspAssetCandidate (cyclomatic 18) REDACTED:5193— rejectDspAssetCandidate has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
pumpDspTelemetry (cyclomatic 18) REDACTED:6749— pumpDspTelemetry 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.
_publishPowerObservation (cyclomatic 18) REDACTED:7379— _publishPowerObservation has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
resolveProviderTrack (cyclomatic 18) js/ui/audio-player/audio-context-manager.js:3953— resolveProviderTrack has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_captureBlindBranchAssets (cyclomatic 18) js/audio-manager.js:4109— _captureBlindBranchAssets 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.
invalidateFolderBrowseCaches (cyclomatic 18) js/ui/library/library-view.js:399— invalidateFolderBrowseCaches has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
restorePagedAnchor (cyclomatic 18) js/ui/library/library-view.js:1526— restorePagedAnchor 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.
capturePagedAnchor (cyclomatic 18) js/ui/library/library-view.js:2274— capturePagedAnchor has cyclomatic complexity 18 (threshold 15). 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: 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.
createPagedTrackActionIntent (cyclomatic 18) js/ui/library/library-view.js:3102— createPagedTrackActionIntent has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_recoverAppliedInputRelease (cyclomatic 18) js/audio/power-policy-controller.js:3338— _recoverAppliedInputRelease has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_getSnapshotWorkletNodes (cyclomatic 18) js/audio/power-policy-controller.js:3472— _getSnapshotWorkletNodes has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 3474). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
isPlannedAutomaticMoveCurrent (cyclomatic 18) js/ui/audio-player/playback-manager.js:463— isPlannedAutomaticMoveCurrent has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
#installBulkPlayProvisional (cyclomatic 18) js/ui/audio-player/playback-manager.js:1079— #installBulkPlayProvisional has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
setRepeatMode (cyclomatic 18) js/ui/audio-player/playback-manager.js:2452— setRepeatMode 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.
_normalizeWasmAssetDescriptor (cyclomatic 18) REDACTED:696— _normalizeWasmAssetDescriptor has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_drawPhaseMapGrid (cyclomatic 18) plugins/spatial/phase_select_eq.js:1477— _drawPhaseMapGrid 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.
parseDspSpectrogramTelemetryFrame (cyclomatic 18) plugins/analyzer/spectrogram.js:461— parseDspSpectrogramTelemetryFrame has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
insertEntries (cyclomatic 18) js/ui/audio-player/openhome-playback-adapter.js:797— insertEntries has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
refreshLibraryNowPlaying (cyclomatic 18) js/network-music/view.js:853— refreshLibraryNowPlaying 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.
createApplicationMenuTemplate (cyclomatic 18) electron/ipc-handlers.js:338— createApplicationMenuTemplate has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 44 function items inside it that branch (click, click, click, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
pollUpnp (cyclomatic 18) electron/network-output-host.cjs:707— pollUpnp 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.
normalizeLayout (cyclomatic 18) js/visualizer/visualizer-model.js:665— normalizeLayout has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 672, 668). 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.
loadPrefetchPages (cyclomatic 18) js/ui/library/paged-view-controller.js:702— loadPrefetchPages 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.
#readDirectory (cyclomatic 18) js/library/scan/bounded-scan-service.js:240— #readDirectory 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.
validateProcessingSnapshot (cyclomatic 18) js/pipeline-analyzer/analysis-worker.js:172— validateProcessingSnapshot has cyclomatic complexity 18 (threshold 15). 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
buildAnalysisResult (cyclomatic 18) js/pipeline-analyzer/analysis-core.js:699— buildAnalysisResult has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 5 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.
resolveChainAssets (cyclomatic 18) dsp/bindings/js/src/assets.js:516— resolveChainAssets 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.
normalizeContextRequest (cyclomatic 18) js/library/library-manager-v2.js:64— normalizeContextRequest 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.
openUserDataBackupDialog.applySelection (cyclomatic 18) js/user-data-backup/dialog.js:281— openUserDataBackupDialog.applySelection 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.
handleMenuKeyDown (cyclomatic 18) js/ui/library/library-view-menus.js:541— handleMenuKeyDown 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.
soundfont.prepareSoundFont (cyclomatic 17) dsp/bindings/js/src/soundfont.js:112— soundfont.prepareSoundFont has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
telemetry.decodeSpectrum (cyclomatic 17) dsp/bindings/js/src/telemetry.js:222— telemetry.decodeSpectrum has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: telemetry.decodePitchMeter (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
graph-engine.invalidGraphCode (cyclomatic 17) dsp/bindings/js/src/graph-engine.js:234— graph-engine.invalidGraphCode has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
runtime.validateEvents (cyclomatic 17) dsp/bindings/js/src/runtime.js:115— runtime.validateEvents 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.
shortcuts.browserShortcut (cyclomatic 17) js/browser/shortcuts.js:1— shortcuts.browserShortcut has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
remote-static-server.parseAllowedHost (cyclomatic 17) electron/remote-static-server.cjs:45— remote-static-server.parseAllowedHost has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MusicServer.subscription (cyclomatic 17) REDACTED:198— MusicServer.subscription has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RemoteControlHost.broadcastState (cyclomatic 17) electron/remote-control-host.cjs:934— RemoteControlHost.broadcastState 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.
window-state.loadWindowState (cyclomatic 17) electron/window-state.js:137— window-state.loadWindowState has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
network-output-ipc.registerNetworkOutputIpc (cyclomatic 17) electron/network-output-ipc.cjs:9— network-output-ipc.registerNetworkOutputIpc 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 8 function items inside it that branch (a function literal at line 24, a function literal at line 32, a function literal at line 61, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
library-shared-query.searchSql (cyclomatic 17) electron/library-shared-query.cjs:161— library-shared-query.searchSql has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
library-catalog-worker.createContextFilter (cyclomatic 17) electron/library-catalog-worker.cjs:1317— library-catalog-worker.createContextFilter 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: library-catalog-worker.dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
PersistentIrPcmCache.open (cyclomatic 17) js/ir-library/ir-pcm-cache.js:219— PersistentIrPcmCache.open has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ir-pcm-cache.decodePersistentIrPcm (cyclomatic 17) js/ir-library/ir-pcm-cache.js:99— ir-pcm-cache.decodePersistentIrPcm has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PipelineItemBuilder.createHeader (cyclomatic 17) js/ui/pipeline/pipeline-item-builder.js:66— PipelineItemBuilder.createHeader has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (shouldSkipItemSelection, selectPlugin). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PipelineItemBuilder.updateNetworkMarkerStatus (cyclomatic 17) js/ui/pipeline/pipeline-item-builder.js:273— PipelineItemBuilder.updateNetworkMarkerStatus 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.
HistoryManager.saveState (cyclomatic 17) js/ui/pipeline/history-manager.js:135— HistoryManager.saveState has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HistoryManager.loadStateFromHistory (cyclomatic 17) js/ui/pipeline/history-manager.js:241— HistoryManager.loadStateFromHistory has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 242, 251, 257, …). 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.
musicxml-parser.unzipScore::extract (cyclomatic 17) js/midi/musicxml-parser.js:105— musicxml-parser.unzipScore::extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (musicxml-parser.unzipScore) 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.
DragDropManager.updateInsertionIndicator (cyclomatic 17) js/ui/plugin-list/drag-drop-manager.js:153— DragDropManager.updateInsertionIndicator 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.
clipboard-utils.copyTextWithSelection (cyclomatic 17) js/utils/clipboard-utils.js:10— clipboard-utils.copyTextWithSelection has cyclomatic complexity 17 (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.
DataStorage.putMeasurement (cyclomatic 17) features/measurement/dataStorage.js:564— DataStorage.putMeasurement has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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. This is NOT this file's highest cyclomatic complexity: dataStorage.validateMeasurementBackup (cyclomatic 23) 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 method is counted neither in this dimension's figures nor in its score.
AudioIOManager.beginReacquireAudioInput (cyclomatic 17) js/audio/audio-io-manager.js:1211— AudioIOManager.beginReacquireAudioInput has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 3 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.
PowerPolicyController._extendGestureResumeOperation (cyclomatic 17) js/audio/power-policy-controller.js:2452— PowerPolicyController._extendGestureResumeOperation has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
OfflineProcessor.tryProcessOfflineDspInstance (cyclomatic 17) js/audio/offline-processor.js:1164— OfflineProcessor.tryProcessOfflineDspInstance 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.
session.handle (cyclomatic 17) extension/session.js:162— session.handle has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ir-asset-payload.validateTopology (cyclomatic 17) js/ir-library/ir-asset-payload.js:34— ir-asset-payload.validateTopology has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
tsp.generateTspSequence (cyclomatic 17) js/pipeline-analyzer/tsp.js:30— tsp.generateTspSequence 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.
MeasurementDisplay.displayMeasurementDetails (cyclomatic 17) features/measurement/ui/measurement-display.js:226— MeasurementDisplay.displayMeasurementDetails has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
filter-response.peqResponse (cyclomatic 17) features/measurement/peq-calculator/filter-response.js:15— filter-response.peqResponse has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app.loadPEQSettings (cyclomatic 17) features/measurement/app.js:750— app.loadPEQSettings 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.
cue-sheet.resolveCueSheet (cyclomatic 17) js/library/metadata/cue-sheet.js:120— cue-sheet.resolveCueSheet has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
metadata-mapper.createTrackFromMetadata (cyclomatic 17) js/library/metadata/metadata-mapper.js:74— metadata-mapper.createTrackFromMetadata has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioContextManager.releasePipelineSource (cyclomatic 17) js/ui/audio-player/audio-context-manager.js:611— AudioContextManager.releasePipelineSource has cyclomatic complexity 17 (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. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
AudioContextManager.playbackEntriesMatch (cyclomatic 17) js/ui/audio-player/audio-context-manager.js:2081— AudioContextManager.playbackEntriesMatch 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: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
NetworkOutputIntegration.reportRoute (cyclomatic 17) js/electron/networkOutputIntegration.js:49— NetworkOutputIntegration.reportRoute has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioPlayerUI.finishVideoGesture (cyclomatic 17) js/ui/audio-player/audio-player-ui.js:1296— AudioPlayerUI.finishVideoGesture has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
NetworkLivePcm.stop (cyclomatic 17) js/ui/audio-player/network-live-pcm.js:197— NetworkLivePcm.stop has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
catalog-runtime-core.createPlaylistWithItems (cyclomatic 17) js/library/repository/catalog-runtime-core.js:2541— catalog-runtime-core.createPlaylistWithItems has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
catalog-runtime-core.prepareSequencePlaylistSave (cyclomatic 17) js/library/repository/catalog-runtime-core.js:3105— catalog-runtime-core.prepareSequencePlaylistSave has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 3129). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
playlist-stream.decodeByteChunks (cyclomatic 17) js/library/playlists/playlist-stream.js:140— playlist-stream.decodeByteChunks 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.
LogicalSelection.getSelectedOrdinal (cyclomatic 17) js/ui/library/logical-selection.js:154— LogicalSelection.getSelectedOrdinal has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 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.
CatalogPlaybackBridge.saveActiveSequenceAsPlaylist (cyclomatic 17) js/ui/audio-player/catalog-playback-bridge.js:206— CatalogPlaybackBridge.saveActiveSequenceAsPlaylist has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
UIManager.getLocalizedDocPath (cyclomatic 17) js/ui-manager.js:1500— UIManager.getLocalizedDocPath 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.
pipeline-apply.applyParamsToPlugin (cyclomatic 17) js/remote/pipeline-apply.js:42— pipeline-apply.applyParamsToPlugin has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
McuProtocol.decode (cyclomatic 17) js/midi/mcu-protocol.js:39— McuProtocol.decode has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MidiControllerManager.ensureMidiAccess (cyclomatic 17) js/midi/midi-controller-manager.js:223— MidiControllerManager.ensureMidiAccess 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, 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.
dsd-speed-decoder.createDsdSpeedDecoder.synthesizeHop (cyclomatic 17) js/audio/dsd/dsd-speed-decoder.js:92— dsd-speed-decoder.createDsdSpeedDecoder.synthesizeHop 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.
ir-preparation.routedL1GainUpperBound (cyclomatic 17) js/ir-library/ir-preparation.js:261— ir-preparation.routedL1GainUpperBound 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: ir-preparation.resolveOptions (cyclomatic 23) 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 method is counted neither in this dimension's figures nor in its score.
remote-session.resolveRemoteTarget (cyclomatic 17) js/remote/remote-session.js:22— remote-session.resolveRemoteTarget has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
group-delay-analysis.interpolateLinear (cyclomatic 17) js/room-eq/group-delay-analysis.js:14— group-delay-analysis.interpolateLinear 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.
rolling-pcm-worker-entry.fill (cyclomatic 17) js/ui/audio-player/rolling-pcm-worker-entry.js:174— rolling-pcm-worker-entry.fill 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.
ChromaSpiralPlugin.setParameters (cyclomatic 17) plugins/analyzer/chroma_spiral.js:98— ChromaSpiralPlugin.setParameters has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LevelMeterPlugin.parseDspLevelTelemetryFrame (cyclomatic 17) plugins/analyzer/level_meter.js:196— LevelMeterPlugin.parseDspLevelTelemetryFrame has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PluginProcessor.setNetworkOutputLocalDelay (cyclomatic 17) REDACTED:3429— PluginProcessor.setNetworkOutputLocalDelay 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: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
PluginProcessor.process (cyclomatic 17) REDACTED:7666— PluginProcessor.process has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
MultiChannelPanelPlugin._syncChannelControls (cyclomatic 17) plugins/basics/multi_channel_panel.js:386— MultiChannelPanelPlugin._syncChannelControls 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.
FiveBandDynamicEQ.createUI (cyclomatic 17) plugins/eq/five_band_dynamic_eq.js:585— FiveBandDynamicEQ.createUI has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 3 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.
FiveBandFIRPEQPlugin.setParameters (cyclomatic 17) plugins/eq/five_band_fir_peq.js:136— FiveBandFIRPEQPlugin.setParameters 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.
room_eq.processRoomEqAutomation (cyclomatic 17) plugins/eq/room_eq.js:47— room_eq.processRoomEqAutomation 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.
TVAudioSimulatorPlugin.setParameters (cyclomatic 17) plugins/lofi/tv_audio_simulator.js:1677— TVAudioSimulatorPlugin.setParameters has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
VinylSimulatorPlugin.setParameters (cyclomatic 17) plugins/lofi/vinyl_simulator.js:1215— VinylSimulatorPlugin.setParameters has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CrosstalkCancellationPlugin.setParameters (cyclomatic 17) plugins/spatial/crosstalk_cancellation.js:142— CrosstalkCancellationPlugin.setParameters has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AudioService.mappingAction (cyclomatic 17) android/app/src/main/java/com/frieve/effetune/AudioService.java:1314— AudioService.mappingAction 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.
latencyPlansDiffer (cyclomatic 17) REDACTED:6466— latencyPlansDiffer 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.
normalizePluginConfig (cyclomatic 17) REDACTED:6854— normalizePluginConfig has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
commitRegionBoundary (cyclomatic 17) js/ui/audio-player/audio-context-manager.js:1115— commitRegionBoundary has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
teardownCommittedBackendForTransition (cyclomatic 17) js/ui/audio-player/audio-context-manager.js:5794— teardownCommittedBackendForTransition has cyclomatic complexity 17 (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.
disconnect (cyclomatic 17) js/ui/audio-player/audio-context-manager.js:6157— disconnect 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.
samePlaybackEntry (cyclomatic 17) js/ui/audio-player/audio-context-manager.js:6464— samePlaybackEntry has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
renderPagedStatusContent (cyclomatic 17) js/ui/library/library-view.js:3581— renderPagedStatusContent has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to 5 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.
_enterSuspended (cyclomatic 17) js/audio/power-policy-controller.js:1826— _enterSuspended has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
clockPosition (cyclomatic 17) plugins/analyzer/rhythm_analyzer.js:833— clockPosition 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.
frequencyDependentLowPhaseAnalysis (cyclomatic 17) js/room-eq/design-core.js:980— frequencyDependentLowPhaseAnalysis 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.
scheduleDesktopArtworkSwap (cyclomatic 17) js/ui/audio-player/audio-player-ui.js:981— scheduleDesktopArtworkSwap has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_readGraph (cyclomatic 17) plugins/eq/five_band_dynamic_eq.js:758— _readGraph 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.
handleDspSpectrogramTelemetry (cyclomatic 17) plugins/analyzer/spectrogram.js:494— handleDspSpectrogramTelemetry 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.
registerLibraryServiceIpc (cyclomatic 17) electron/library-service-coordinator.cjs:1299— registerLibraryServiceIpc has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 13 function items inside it that branch. 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.
issuePlaylistImportGrant (cyclomatic 17) electron/library-catalog-scan-runtime.cjs:729— issuePlaylistImportGrant has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
normalizeRoute (cyclomatic 17) electron/network-output-host.cjs:40— normalizeRoute has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
parse (cyclomatic 17) js/sfz/script-compiler.js:205— parse has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
#validateAndAcceptCueSheets (cyclomatic 17) js/library/scan/bounded-scan-service.js:476— #validateAndAcceptCueSheets 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.
updateTransferGraphs (cyclomatic 17) plugins/saturation/multiband_saturation.js:539— updateTransferGraphs has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 550, 636). 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.
validateAnalyzerSnapshot (cyclomatic 17) js/pipeline-analyzer/analysis-worker.js:194— validateAnalyzerSnapshot has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_prepareWasmAssetMapsForTarget (cyclomatic 17) js/audio/audio-manager-wasm-assets.js:358— _prepareWasmAssetMapsForTarget has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_updateWasmAssetRejection (cyclomatic 17) js/audio/audio-manager-wasm-assets.js:525— _updateWasmAssetRejection has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
resolveEntityAnchor (cyclomatic 17) js/library/library-manager-v2.js:344— resolveEntityAnchor 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.
sendSoundFontMixerAction (cyclomatic 17) js/audio/audio-manager-sfz-runtime.js:28— sendSoundFontMixerAction has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
openUserDataBackupDialog.run (cyclomatic 17) js/user-data-backup/dialog.js:554— openUserDataBackupDialog.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
appendSaveSegments (cyclomatic 17) js/ui/audio-player/catalog-playback-bridge.js:635— appendSaveSegments 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.
updateMiniPlayer (cyclomatic 17) js/ui/mobile-nav.js:521— updateMiniPlayer has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
build.buildPackage (cyclomatic 16) dsp/bindings/js/scripts/build.mjs:11— build.buildPackage 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.
engine.createEngineSession (cyclomatic 16) dsp/bindings/js/src/engine.js:114— engine.createEngineSession 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.
graph-engine.encodeGraphDescriptor (cyclomatic 16) dsp/bindings/js/src/graph-engine.js:74— graph-engine.encodeGraphDescriptor 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.
file-handlers.openPlaybackSelection (cyclomatic 16) electron/file-handlers.js:104— file-handlers.openPlaybackSelection 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.
remote-pairing.requestRemotePairing (cyclomatic 16) electron/remote-pairing.cjs:126— remote-pairing.requestRemotePairing has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 150, 127, 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.
OpenHomeSidecarManager.handleLine (cyclomatic 16) electron/openhome-sidecar-manager.cjs:316— OpenHomeSidecarManager.handleLine 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.
NetworkMusicHost.constructor (cyclomatic 16) electron/network-music-host.cjs:27— NetworkMusicHost.constructor has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 5 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.
renderer-settings.accessRendererSettings (cyclomatic 16) electron/renderer-settings.cjs:5— renderer-settings.accessRendererSettings 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.
windows-renderer-power.createWindowsRendererPower.restoreAfterExit (cyclomatic 16) electron/windows-renderer-power.cjs:27— windows-renderer-power.createWindowsRendererPower.restoreAfterExit has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NetworkOutputHost.updateRoute (cyclomatic 16) electron/network-output-host.cjs:323— NetworkOutputHost.updateRoute 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.
library-catalog-worker.resolveImportedTrackFromOrigin (cyclomatic 16) electron/library-catalog-worker.cjs:2037— library-catalog-worker.resolveImportedTrackFromOrigin has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: library-catalog-worker.dispatchCommand (cyclomatic 94) 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 method is counted neither in this dimension's figures nor in its score.
power-topology.computeRuntimePipelineGraphBound (cyclomatic 16) js/audio/power-topology.js:433— power-topology.computeRuntimePipelineGraphBound 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.
model.validatePreset (cyclomatic 16) extension/model.js:59— model.validatePreset has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
model.createPipelineModels (cyclomatic 16) extension/model.js:86— model.createPipelineModels 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.
PresetManager.getPresets (cyclomatic 16) js/ui/pipeline/preset-manager.js:67— PresetManager.getPresets 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.
text-encoding.scoreScriptRepair (cyclomatic 16) js/library/metadata/text-encoding.js:508— text-encoding.scoreScriptRepair has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
wrd-parser.parseWrd::escape (cyclomatic 16) js/midi/wrd-parser.js:142— wrd-parser.parseWrd::escape has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (wrd-parser.parseWrd) 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.
FileProcessor._processMultipleFiles (cyclomatic 16) js/ui/pipeline/file-processor.js:654— FileProcessor._processMultipleFiles has cyclomatic complexity 16 (threshold 15). Of this number, 14 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.
TelemetryHub.handleMessage (cyclomatic 16) js/audio/telemetry-hub.js:316— TelemetryHub.handleMessage has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
output-routing.prepareMeasurementOutputRoute (cyclomatic 16) features/measurement/audio-utils/output-routing.js:155— output-routing.prepareMeasurementOutputRoute 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.
measurement-model.resolveIrRecordKey (cyclomatic 16) features/measurement/measurement-model.js:190— measurement-model.resolveIrRecordKey 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.
dialog.openUserDataBackupDialog.run (cyclomatic 16) js/user-data-backup/dialog.js:554— dialog.openUserDataBackupDialog.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
portable.chooseName (cyclomatic 16) js/user-data-backup/portable.js:263— portable.chooseName has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (family, sameNamespace, numberedName, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MidiMixerDisplay.drawKnob (cyclomatic 16) js/visualizer/visualizer-midi-mixer.js:271— MidiMixerDisplay.drawKnob 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.
MidiMixerDisplay.drawKeyboard (cyclomatic 16) js/visualizer/visualizer-midi-mixer.js:328— MidiMixerDisplay.drawKeyboard has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExtensionEditor.restoreSnapshot (cyclomatic 16) extension/editor.js:799— ExtensionEditor.restoreSnapshot has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
offscreen.channel.onmessage (cyclomatic 16) extension/offscreen.js:370— offscreen.channel.onmessage 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.
PowerPolicyController._analyzeTemporalCapabilities (cyclomatic 16) js/audio/power-policy-controller.js:857— PowerPolicyController._analyzeTemporalCapabilities has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 869, 866). 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.
AudioActivationCoordinator._activateNow (cyclomatic 16) js/audio/audio-activation-coordinator.js:188— AudioActivationCoordinator._activateNow 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.
power-config-store.cloneValue (cyclomatic 16) js/electron/power-config-store.js:22— power-config-store.cloneValue 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.
WebAppConfigRuntime.publishSnapshot (cyclomatic 16) js/electron/webSettingsStorage.js:242— WebAppConfigRuntime.publishSnapshot 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.
midi-offline.prepareOfflineMidiPlayback (cyclomatic 16) js/audio/midi-offline.js:82— midi-offline.prepareOfflineMidiPlayback 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.
AudioManager.disableParallelPipelines::releaseParallelGraph (cyclomatic 16) js/audio-manager.js:4631— AudioManager.disableParallelPipelines::releaseParallelGraph 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.
audioIntegration.getAudioDevices (cyclomatic 16) js/electron/audioIntegration.js:27— audioIntegration.getAudioDevices has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
devices.stopMicrophoneInput (cyclomatic 16) features/measurement/audio-utils/devices.js:190— devices.stopMicrophoneInput 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.
AnalysisController.createControls::add (cyclomatic 16) features/measurement/ui/analysis-controller.js:215— AnalysisController.createControls::add 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.
midi.requestAndroidMidiAccess (cyclomatic 16) js/android/midi.js:21— midi.requestAndroidMidiAccess has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 42, addInput, a function literal at line 50, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
score-artwork-source.readScoreArtwork (cyclomatic 16) js/ui/audio-player/score-artwork-source.js:7— score-artwork-source.readScoreArtwork has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RollingPcmAdmissionLedger.canPromote (cyclomatic 16) REDACTED:885— RollingPcmAdmissionLedger.canPromote has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: rolling-pcm-policy.findMatrixCell (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
RollingPcmTransport.scheduleAvailable (cyclomatic 16) js/ui/audio-player/rolling-pcm-transport.js:812— RollingPcmTransport.scheduleAvailable has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AudioContextManager.refreshActiveRegionTransportPlan (cyclomatic 16) js/ui/audio-player/audio-context-manager.js:1038— AudioContextManager.refreshActiveRegionTransportPlan has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
AudioContextManager.prepareRollingPlaybackDecisionRecord (cyclomatic 16) js/ui/audio-player/audio-context-manager.js:4264— AudioContextManager.prepareRollingPlaybackDecisionRecord has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AudioContextManager.getInjectedNativePcmWaveContract (cyclomatic 33) 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 method is counted neither in this dimension's figures nor in its score.
MediaSessionManager.buildMetadata (cyclomatic 16) js/ui/audio-player/media-session-manager.js:229— MediaSessionManager.buildMetadata has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MediaSessionManager.syncPositionState (cyclomatic 16) js/ui/audio-player/media-session-manager.js:285— MediaSessionManager.syncPositionState has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
web-library-services.createWebLibraryServices (cyclomatic 16) js/library/scan/web-library-services.js:8— web-library-services.createWebLibraryServices has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
LibraryView.loadUIState (cyclomatic 16) js/ui/library/library-view.js:577— LibraryView.loadUIState 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.
pipeline-snapshot.copyDspSnapshot (cyclomatic 16) js/pipeline-analyzer/pipeline-snapshot.js:167— pipeline-snapshot.copyDspSnapshot 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.
PipelineAnalyzerController._run (cyclomatic 16) js/pipeline-analyzer/controller.js:679— PipelineAnalyzerController._run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PwaNetworkMusicTransport.constructor (cyclomatic 16) js/network-music/pwa-transport.js:15— PwaNetworkMusicTransport.constructor has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals inside it that branch. 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.
ElectronIntegration.showAboutDialog (cyclomatic 16) js/electron-integration.js:379— ElectronIntegration.showAboutDialog has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RemoteControl.opEdit (cyclomatic 16) js/remote/remote-control.js:388— RemoteControl.opEdit has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: RemoteControl.execute (cyclomatic 22) 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 method is counted neither in this dimension's figures nor in its score.
App.processCommandLineArguments (cyclomatic 16) js/app.js:1789— App.processCommandLineArguments has cyclomatic complexity 16 (threshold 15). Of this number, 11 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.
dst-source.createDstSource.findPacket (cyclomatic 16) js/audio/dsd/dst-source.js:39— dst-source.createDstSource.findPacket 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.
dsd-speed-decoder.createDsdSpeedDecoder.load (cyclomatic 16) js/audio/dsd/dsd-speed-decoder.js:45— dsd-speed-decoder.createDsdSpeedDecoder.load 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.
design-core.smoothDelayCompensatedSpectrum (cyclomatic 16) js/crosstalk-cancellation/design-core.js:261— design-core.smoothDelayCompensatedSpectrum has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sample-metadata.readSfzWaveLoop (cyclomatic 16) js/sfz/sample-metadata.js:6— sample-metadata.readSfzWaveLoop has cyclomatic complexity 16 (threshold 15). Of this number, 13 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.
LivePcmCore.push (cyclomatic 16) js/ui/audio-player/live-pcm-core.js:48— LivePcmCore.push has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ChromaSpiralPlugin.drawGraph::drawSignal (cyclomatic 16) plugins/analyzer/chroma_spiral.js:344— ChromaSpiralPlugin.drawGraph::drawSignal has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ChromaSpiralPlugin.drawGraph) 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.
PitchMeterPlugin.handleTelemetry (cyclomatic 16) plugins/analyzer/pitch_meter.js:330— PitchMeterPlugin.handleTelemetry 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.
RhythmAnalyzerPlugin.writeTempogram (cyclomatic 16) plugins/analyzer/rhythm_analyzer.js:655— RhythmAnalyzerPlugin.writeTempogram 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.
RhythmAnalyzerPlugin.refreshProvisionalEvents (cyclomatic 16) plugins/analyzer/rhythm_analyzer.js:932— RhythmAnalyzerPlugin.refreshProvisionalEvents 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.
RhythmAnalyzerPlugin.annotateEvent (cyclomatic 16) plugins/analyzer/rhythm_analyzer.js:966— RhythmAnalyzerPlugin.annotateEvent has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
audio-processor.encodeWorkletDspChannelSpec (cyclomatic 16) REDACTED:2507— audio-processor.encodeWorkletDspChannelSpec has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: DspEngineBinding.publishSfzSamplePage (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
MultibandTransientPlugin.createUI (cyclomatic 16) plugins/dynamics/multiband_transient.js:937— MultibandTransientPlugin.createUI has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BandPassFilterPlugin.setParameters (cyclomatic 16) plugins/eq/band_pass_filter.js:275— BandPassFilterPlugin.setParameters 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.
CombFilterPlugin.setParameters (cyclomatic 16) plugins/eq/comb_filter.js:148— CombFilterPlugin.setParameters 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.
NarrowRangePlugin.setParameters (cyclomatic 16) plugins/eq/narrow_range.js:403— NarrowRangePlugin.setParameters 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.
RoomEqPlugin._qualityWarningForDesign (cyclomatic 16) plugins/eq/room_eq.js:1053— RoomEqPlugin._qualityWarningForDesign has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RoomEqPlugin._sourcesFor (cyclomatic 16) plugins/eq/room_eq.js:1681— RoomEqPlugin._sourcesFor has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RoomEqPlugin._waveformPath (cyclomatic 16) plugins/eq/room_eq.js:2937— RoomEqPlugin._waveformPath has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tonal_balance_eq.parseTonalBalanceEqFrame (cyclomatic 16) plugins/eq/tonal_balance_eq.js:70— tonal_balance_eq.parseTonalBalanceEqFrame has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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.
GraphPlotArea.from (cyclomatic 16) plugins/graph-point-interaction.js:45— GraphPlotArea.from 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.
SWRadioSimulatorPlugin.setParameters (cyclomatic 16) plugins/lofi/sw_radio_simulator.js:1617— SWRadioSimulatorPlugin.setParameters has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OscillatorPlugin.createUI (cyclomatic 16) plugins/others/oscillator.js:430— OscillatorPlugin.createUI has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 714, updateControlStates, a function literal at line 494, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PluginBase.createParameterControl (cyclomatic 16) REDACTED:1437— PluginBase.createParameterControl has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (fromSlider, a function literal at line 1496, a function literal at line 1488). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
IRReverbPlugin._restagePrepared (cyclomatic 16) plugins/reverb/ir_reverb.js:502— IRReverbPlugin._restagePrepared has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IRReverbPlugin.createOfflineDspState (cyclomatic 16) plugins/reverb/ir_reverb.js:692— IRReverbPlugin.createOfflineDspState has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TubeSimulatorPlugin._syncControlsFromState (cyclomatic 16) plugins/saturation/tube_simulator.js:6195— TubeSimulatorPlugin._syncControlsFromState 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.
SpatialMapperPlugin.setParameters (cyclomatic 16) plugins/spatial/spatial_mapper.js:161— SpatialMapperPlugin.setParameters 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.
Bundle.pack (cyclomatic 16) dsp/bindings/python/src/effetune/bundle.py:73— Bundle.pack 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.
resolveCuePlaylistTrack (cyclomatic 16) js/library/repository/catalog-runtime-core.js:3466— resolveCuePlaylistTrack has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
artworkPreclaimMatchesCurrentTrack (cyclomatic 16) js/library/repository/catalog-runtime-core.js:4342— artworkPreclaimMatchesCurrentTrack has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_restoreWorkletCommandState (cyclomatic 16) js/audio/power-policy-controller.js:2538— _restoreWorkletCommandState 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.
setUIBandValues (cyclomatic 16) plugins/eq/room_eq.js:541— setUIBandValues has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
handleMidiSnapshot (cyclomatic 16) plugins/analyzer/rhythm_analyzer.js:164— handleMidiSnapshot 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.
getContext (cyclomatic 16) js/library/repository/web-sqlite-runtime.js:1593— getContext has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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: dispatchWebSqliteCommand (cyclomatic 100) 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 method is counted neither in this dimension's figures nor in its score.
commitCatalogDestination (cyclomatic 16) js/ui/audio-player/playback-manager.js:1217— commitCatalogDestination 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.
acknowledgeWasmAssetOperation (cyclomatic 16) REDACTED:659— acknowledgeWasmAssetOperation 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.
runDeferredStartupTasks (cyclomatic 16) js/app.js:728— runDeferredStartupTasks has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 8 function items inside it that branch. 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.
updateLibraryTrackActions (cyclomatic 16) js/network-music/view.js:879— updateLibraryTrackActions has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs 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.
enumerateDirectory (cyclomatic 16) electron/library-catalog-scan-runtime.cjs:895— enumerateDirectory 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.
drawTransferCurve (cyclomatic 16) plugins/lofi/dsd64_imd_simulator.js:896— drawTransferCurve 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.
browseLocal (cyclomatic 16) electron/network-music-host.cjs:178— browseLocal has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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.
isCanonicalLocalPathSnapshot (cyclomatic 16) REDACTED:1051— isCanonicalLocalPathSnapshot has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
runFolder (cyclomatic 16) js/library/scan/bounded-scan-service.js:85— runFolder has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
prepareMidiInstruments (cyclomatic 16) js/ui/audio-player/midi-playback.js:472— prepareMidiInstruments has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
updateMeter::drawSignal (cyclomatic 16) plugins/analyzer/level_meter.js:590— updateMeter::drawSignal 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.
#resolveSequenceEntrySource (cyclomatic 16) js/ui/audio-player/catalog-playback-bridge.js:465— #resolveSequenceEntrySource has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
installHooks (cyclomatic 16) js/remote/remote-control.js:137— installHooks has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 8 function items inside it that branch. 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. This is NOT this file's highest cyclomatic complexity: execute (cyclomatic 22) 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 method is counted neither in this dimension's figures nor in its score.
setupKeyboardNavigation (cyclomatic 16) js/ui/pipeline/plugin-preset-dialog.js:524— setupKeyboardNavigation has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 526, 539, 544). 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.
processPipeline (cognitive 486) REDACTED:8315— processPipeline has cognitive complexity 486 (threshold 15). Drivers by points: if/else 125 (286 pts), loops 29 (80 pts), ternaries 19 (58 pts), boolean chains 53, error handling 2 (7 pts), other 2 (nesting depth added 256). 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.
parseMusicXml (cognitive 402) js/midi/musicxml-parser.js:156— parseMusicXml has cognitive complexity 402 (threshold 15). Drivers by points: if/else 73 (245 pts), ternaries 17 (70 pts), loops 16 (38 pts), boolean chains 36, other 13 (nesting depth added 247). Of this number, 388 points are the body's own statements and 14 belong to 22 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compileRegion (cognitive 369) js/sfz/modulation.js:127— compileRegion has cognitive complexity 369 (threshold 15). Drivers by points: if/else 85 (174 pts), boolean chains 105, ternaries 38 (97 pts), loops 12 (15 pts), error handling 3 (9 pts), other 1 (nesting depth added 157). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handleWorkletMessage (cognitive 222) js/audio-manager.js:2619— handleWorkletMessage has cognitive complexity 222 (threshold 15). Drivers by points: if/else 69 (118 pts), boolean chains 60, ternaries 13 (28 pts), other 8, error handling 2 (6 pts), loops 1 (2 pts) (nesting depth added 69). Of this number, 218 points are the body's own statements and 4 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smf-parser.parseSmf (cognitive 206) js/midi/smf-parser.js:47— smf-parser.parseSmf has cognitive complexity 206 (threshold 15). Drivers by points: if/else 48 (112 pts), ternaries 21 (52 pts), boolean chains 27, loops 10 (14 pts), error handling 1 (nesting depth added 99). Of this number, 196 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
drawFrame (cognitive 197) js/visualizer/visualizer-renderer.js:130— drawFrame has cognitive complexity 197 (threshold 15). Drivers by points: if/else 37 (75 pts), ternaries 27 (72 pts), boolean chains 37, loops 5 (10 pts), other 3 (nesting depth added 88). Of this number, 189 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
asset.packSfzAsset (cognitive 180) js/sfz/asset.js:137— asset.packSfzAsset has cognitive complexity 180 (threshold 15). Drivers by points: if/else 44 (87 pts), boolean chains 33, ternaries 17 (31 pts), loops 15 (27 pts), error handling 1 (2 pts) (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioService.command (cognitive 176) android/app/src/main/java/com/frieve/effetune/AudioService.java:278— AudioService.command has cognitive complexity 176 (threshold 15). Drivers by points: if/else 57 (117 pts), boolean chains 22, ternaries 7 (16 pts), loops 6 (15 pts), error handling 3 (5 pts), match/switch 1 (nesting depth added 80). 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.
drawGraph (cognitive 170) plugins/analyzer/note_spectrogram.js:2076— drawGraph has cognitive complexity 170 (threshold 15). Drivers by points: if/else 47 (70 pts), ternaries 30 (55 pts), boolean chains 25, loops 7 (13 pts), other 7 (nesting depth added 54). Of this number, 96 points are the body's own statements and 74 belong to 10 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
decidePowerTarget (cognitive 170) js/audio/power-policy.js:721— decidePowerTarget has cognitive complexity 170 (threshold 15). Drivers by points: ternaries 29 (87 pts), if/else 35 (46 pts), boolean chains 33, other 4 (nesting depth added 69). 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.
rebindCurrentPlayback (cognitive 165) js/ui/audio-player/audio-context-manager.js:1407— rebindCurrentPlayback has cognitive complexity 165 (threshold 15). Drivers by points: if/else 62 (102 pts), boolean chains 26, ternaries 15 (22 pts), other 11, error handling 2 (3 pts), loops 1 (nesting depth added 48). Of this number, 155 points are the body's own statements and 10 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initializeAndBuildPipeline (cognitive 163) js/app.js:929— initializeAndBuildPipeline has cognitive complexity 163 (threshold 15). Drivers by points: if/else 40 (74 pts), error handling 17 (51 pts), boolean chains 31, ternaries 4 (7 pts) (nesting depth added 71). Of this number, 143 points are the body's own statements and 20 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
registerIpcHandlers (cognitive 161) electron/ipc-handlers.js:639— registerIpcHandlers has cognitive complexity 161 (threshold 15). Drivers by points: if/else 66 (79 pts), error handling 36 (40 pts), boolean chains 28, ternaries 6 (7 pts), other 6, loops 1 (nesting depth added 18). None of this is in the body itself: all 161 points belong to 69 function items inside it that branch (a function literal at line 1168, a function literal at line 1027, a function literal at line 1290, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
apply (cognitive 161) js/visualizer/visualizer-effects.js:246— apply has cognitive complexity 161 (threshold 15). Drivers by points: if/else 39 (76 pts), ternaries 21 (46 pts), boolean chains 18, loops 7 (17 pts), other 4 (nesting depth added 72). Of this number, 159 points are the body's own statements and 2 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
designRoomEq (cognitive 156) js/room-eq/design-core.js:2492— designRoomEq has cognitive complexity 156 (threshold 15). Drivers by points: ternaries 23 (58 pts), if/else 23 (54 pts), loops 9 (24 pts), boolean chains 20 (nesting depth added 81). Of this number, 149 points are the body's own statements and 7 belong to 15 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serve (cognitive 156) REDACTED:327— serve has cognitive complexity 156 (threshold 15). Drivers by points: if/else 37 (82 pts), boolean chains 35, ternaries 8 (18 pts), loops 2 (8 pts), error handling 2 (7 pts), other 6 (nesting depth added 66). Of this number, 144 points are the body's own statements and 12 belong to 10 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
parameters (cognitive 152) js/visualizer/visualizer-editor.js:803— parameters has cognitive complexity 152 (threshold 15). Drivers by points: if/else 48 (80 pts), boolean chains 38, loops 10 (20 pts), ternaries 5 (11 pts), other 3 (nesting depth added 48). Of this number, 99 points are the body's own statements and 53 belong to 75 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sfz-library-ipc.registerSfzLibraryIpc (cognitive 147) electron/sfz-library-ipc.js:64— sfz-library-ipc.registerSfzLibraryIpc has cognitive complexity 147 (threshold 15). Drivers by points: if/else 54 (88 pts), boolean chains 29, ternaries 6 (11 pts), error handling 7 (10 pts), loops 7 (9 pts) (nesting depth added 44). Most of this is not in the body itself: 3 of the 147 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 141, a function literal at line 130, a function literal at line 206, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MidiMappings.apply (cognitive 141) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:254— MidiMappings.apply has cognitive complexity 141 (threshold 15). Drivers by points: ternaries 25 (61 pts), if/else 31 (51 pts), boolean chains 20, loops 4 (9 pts) (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderLibrary (cognitive 140) js/network-music/view.js:557— renderLibrary has cognitive complexity 140 (threshold 15). Drivers by points: ternaries 29 (60 pts), boolean chains 37, if/else 18 (27 pts), loops 5 (11 pts), other 4, error handling 1 (nesting depth added 46). Of this number, 112 points are the body's own statements and 28 belong to 44 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parser.parseSfz (cognitive 139) js/sfz/parser.js:218— parser.parseSfz has cognitive complexity 139 (threshold 15). Drivers by points: if/else 52 (87 pts), boolean chains 27, ternaries 5 (12 pts), loops 9 (11 pts), error handling 1 (2 pts) (nesting depth added 45). Of this number, 117 points are the body's own statements and 22 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
beginUserGestureResume (cognitive 137) js/audio/power-policy-controller.js:2649— beginUserGestureResume has cognitive complexity 137 (threshold 15). Drivers by points: if/else 49 (76 pts), boolean chains 46, error handling 4 (7 pts), ternaries 3 (4 pts), loops 2, other 2 (nesting depth added 31). Of this number, 22 points are the body's own statements and 115 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
applyPortMessage (cognitive 136) REDACTED:2992— applyPortMessage has cognitive complexity 136 (threshold 15). Drivers by points: if/else 38 (85 pts), ternaries 11 (32 pts), boolean chains 12, loops 1 (3 pts), other 3, match/switch 1 (nesting depth added 70). 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.
drawGraph (cognitive 134) js/visualizer/visualizer-guitar.js:346— drawGraph has cognitive complexity 134 (threshold 15). Drivers by points: ternaries 47 (61 pts), if/else 26 (40 pts), boolean chains 16, loops 10 (16 pts), other 1 (nesting depth added 34). Of this number, 92 points are the body's own statements and 42 belong to 19 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executeCommand (cognitive 130) electron/network-music-host.cjs:338— executeCommand has cognitive complexity 130 (threshold 15). Drivers by points: if/else 33 (71 pts), ternaries 14 (34 pts), boolean chains 10, loops 4 (10 pts), error handling 1 (3 pts), other 2 (nesting depth added 66). Of this number, 129 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
drawWaveform (cognitive 129) plugins/analyzer/oscilloscope.js:1018— drawWaveform has cognitive complexity 129 (threshold 15). Drivers by points: if/else 28 (59 pts), ternaries 16 (48 pts), boolean chains 11, loops 3 (9 pts), other 2 (nesting depth added 69). Of this number, 127 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
synthesizeFilter (cognitive 128) js/room-eq/design-core.js:1747— synthesizeFilter has cognitive complexity 128 (threshold 15). Drivers by points: if/else 22 (41 pts), ternaries 14 (37 pts), loops 12 (34 pts), boolean chains 16 (nesting depth added 64). Of this number, 118 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
design-utils.designPEQ (cognitive 127) features/measurement/peq-calculator/design-utils.js:139— design-utils.designPEQ has cognitive complexity 127 (threshold 15). Drivers by points: if/else 25 (63 pts), loops 18 (45 pts), boolean chains 14, ternaries 1 (3 pts), error handling 2 (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fitPEQ (cognitive 124) features/measurement/peq-calculator/optimization.js:498— fitPEQ has cognitive complexity 124 (threshold 15). Drivers by points: if/else 27 (60 pts), ternaries 10 (28 pts), loops 14 (27 pts), boolean chains 4, error handling 1 (3 pts), other 2 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wrd-parser.parseWrd (cognitive 123) js/midi/wrd-parser.js:40— wrd-parser.parseWrd has cognitive complexity 123 (threshold 15). Drivers by points: if/else 49 (98 pts), loops 13 (25 pts), boolean chains 22, ternaries 6 (16 pts) (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (wrd-parser.parseWrd::escape) 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.
handleWorkletPowerEvent (cognitive 118) js/audio/power-policy-controller.js:2057— handleWorkletPowerEvent has cognitive complexity 118 (threshold 15). Drivers by points: if/else 36 (70 pts), boolean chains 20, ternaries 5 (14 pts), other 12, error handling 1 (2 pts) (nesting depth added 44). 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.
drawCellContent (cognitive 118) plugins/analyzer/analog_meter.js:842— drawCellContent has cognitive complexity 118 (threshold 15). Drivers by points: if/else 30 (44 pts), ternaries 22 (43 pts), boolean chains 14, other 10, loops 5 (7 pts) (nesting depth added 37). Of this number, 105 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createPagedRow (cognitive 115) js/ui/library/library-view.js:2746— createPagedRow has cognitive complexity 115 (threshold 15). Drivers by points: ternaries 35 (56 pts), if/else 21 (30 pts), boolean chains 24, other 5 (nesting depth added 30). Of this number, 105 points are the body's own statements and 10 belong to 41 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvTransportPlayers.command (cognitive 113) electron/network-music-av-player.cjs:99— AvTransportPlayers.command has cognitive complexity 113 (threshold 15). Drivers by points: if/else 37 (63 pts), ternaries 9 (24 pts), boolean chains 21, loops 2 (5 pts) (nesting depth added 44). Of this number, 110 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prepareLegacyParametersV1 (cognitive 113) dsp/bindings/js/src/preset.js:416— prepareLegacyParametersV1 has cognitive complexity 113 (threshold 15). Drivers by points: if/else 42 (81 pts), boolean chains 21, loops 5 (10 pts), ternaries 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_handleMessage (cognitive 112) REDACTED:181— _handleMessage has cognitive complexity 112 (threshold 15). Drivers by points: if/else 28 (70 pts), boolean chains 23, ternaries 5 (15 pts), other 4 (nesting depth added 52). Of this number, 108 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
effects.compileSfzEffects (cognitive 109) js/sfz/effects.js:83— effects.compileSfzEffects has cognitive complexity 109 (threshold 15). Drivers by points: if/else 30 (70 pts), ternaries 4 (16 pts), boolean chains 14, loops 5 (9 pts) (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
update (cognitive 107) js/visualizer/visualizer-analyzer-display.js:209— update has cognitive complexity 107 (threshold 15). Drivers by points: if/else 57 (82 pts), ternaries 42 (77 pts), boolean chains 43, loops 8 (32 pts), other 3 (nesting depth added 84). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
presets._prepare_legacy_parameters_v1 (cognitive 104) dsp/bindings/python/src/effetune/presets.py:291— presets._prepare_legacy_parameters_v1 has cognitive complexity 104 (threshold 15). Drivers by points: if/else 37 (76 pts), boolean chains 15, loops 5 (10 pts), ternaries 1 (3 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PcmDecoder.decode (cognitive 103) android/app/src/main/java/com/frieve/effetune/PcmDecoder.java:44— PcmDecoder.decode has cognitive complexity 103 (threshold 15). Drivers by points: if/else 27 (56 pts), ternaries 11 (23 pts), boolean chains 13, loops 4 (8 pts), error handling 2 (3 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawGroove (cognitive 103) plugins/analyzer/rhythm_analyzer.js:1475— drawGroove has cognitive complexity 103 (threshold 15). Drivers by points: ternaries 32 (37 pts), boolean chains 24, if/else 19 (24 pts), loops 8 (11 pts), other 7 (nesting depth added 13). Of this number, 81 points are the body's own statements and 22 belong to 24 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
processAudioFile (cognitive 103) js/audio/offline-processor.js:55— processAudioFile has cognitive complexity 103 (threshold 15). Drivers by points: if/else 28 (39 pts), ternaries 15 (32 pts), loops 6 (14 pts), boolean chains 12, error handling 3 (4 pts), other 2 (nesting depth added 37). Of this number, 97 points are the body's own statements and 6 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calculateJacobian (cognitive 103) features/measurement/peq-calculator/optimization.js:167— calculateJacobian has cognitive complexity 103 (threshold 15). Drivers by points: if/else 18 (51 pts), ternaries 7 (28 pts), loops 7 (18 pts), boolean chains 6 (nesting depth added 65). 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.
offscreen.handle (cognitive 102) extension/offscreen.js:200— offscreen.handle has cognitive complexity 102 (threshold 15). Drivers by points: if/else 40 (81 pts), boolean chains 12, ternaries 2 (7 pts), loops 1 (2 pts) (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
handlePortMessage (cognitive 102) REDACTED:2830— handlePortMessage has cognitive complexity 102 (threshold 15). Drivers by points: if/else 42 (69 pts), boolean chains 17, ternaries 3 (8 pts), error handling 2 (5 pts), loops 1 (2 pts), other 1 (nesting depth added 36). Of this number, 97 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiMixerDisplay.draw (cognitive 99) js/visualizer/visualizer-midi-mixer.js:31— MidiMixerDisplay.draw has cognitive complexity 99 (threshold 15). Drivers by points: ternaries 20 (44 pts), if/else 24 (39 pts), boolean chains 8, loops 5 (8 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
peak-detection.findPeaksDips (cognitive 99) features/measurement/peq-calculator/peak-detection.js:13— peak-detection.findPeaksDips has cognitive complexity 99 (threshold 15). Drivers by points: if/else 33 (65 pts), boolean chains 23, loops 5 (11 pts) (nesting depth added 38). Of this number, 97 points are the body's own statements and 2 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.
visualizer-lyrics.drawLyrics (cognitive 98) js/visualizer/visualizer-lyrics.js:87— visualizer-lyrics.drawLyrics has cognitive complexity 98 (threshold 15). Drivers by points: ternaries 19 (45 pts), if/else 20 (34 pts), boolean chains 13, loops 3 (6 pts) (nesting depth added 43). Of this number, 82 points are the body's own statements and 16 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ModalResonatorPlugin.setParameters (cognitive 97) plugins/resonator/modal_resonator.js:325— ModalResonatorPlugin.setParameters has cognitive complexity 97 (threshold 15). Drivers by points: if/else 32 (90 pts), boolean chains 7 (nesting depth added 58). Of this number, 55 points are the body's own statements and 42 belong to one function literal inside it that branches. 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.
configIntegration.showConfigDialog (cognitive 96) js/electron/configIntegration.js:55— configIntegration.showConfigDialog has cognitive complexity 96 (threshold 15). Drivers by points: if/else 187 (213 pts), ternaries 86 (125 pts), boolean chains 77, loops 23 (25 pts), error handling 18 (21 pts) (nesting depth added 70). 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. This shape REPEATS in the file: 4 other methods here (configIntegration.showConfigDialog::getNetworkPlayerStatusPresentation, configIntegration.showConfigDialog::renderAirPlayStatus, configIntegration.showConfigDialog::renderDialogTexts, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
AudioService.dispatchRemote (cognitive 94) android/app/src/main/java/com/frieve/effetune/AudioService.java:1011— AudioService.dispatchRemote has cognitive complexity 94 (threshold 15). Drivers by points: if/else 33 (45 pts), ternaries 7 (28 pts), loops 4 (10 pts), boolean chains 7, error handling 3 (4 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeParameterPacker.packRecord (cognitive 93) android/app/src/main/java/com/frieve/effetune/NativeParameterPacker.java:124— NativeParameterPacker.packRecord has cognitive complexity 93 (threshold 15). Drivers by points: if/else 18 (46 pts), ternaries 7 (29 pts), boolean chains 9, loops 4 (9 pts) (nesting depth added 55). 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.
compiler.compileSf2 (cognitive 92) js/sf2/compiler.js:87— compiler.compileSf2 has cognitive complexity 92 (threshold 15). Drivers by points: if/else 15 (55 pts), loops 6 (18 pts), boolean chains 11, ternaries 2 (8 pts) (nesting depth added 58). Of this number, 88 points are the body's own statements and 4 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.
hasValidImportedScalars (cognitive 92) features/measurement/dataStorage.js:130— hasValidImportedScalars has cognitive complexity 92 (threshold 15). Drivers by points: boolean chains 42, if/else 26 (42 pts), loops 5 (8 pts) (nesting depth added 19). Of this number, 79 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
drawGraph (cognitive 92) plugins/basics/bass_management.js:1136— drawGraph has cognitive complexity 92 (threshold 15). Drivers by points: if/else 16 (38 pts), ternaries 12 (21 pts), loops 7 (15 pts), boolean chains 10, other 8 (nesting depth added 39). Of this number, 91 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateMeter (cognitive 92) plugins/analyzer/level_meter.js:521— updateMeter has cognitive complexity 92 (threshold 15). Drivers by points: ternaries 32 (64 pts), if/else 28 (46 pts), boolean chains 8, other 7, loops 2 (4 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
computeDspLatencyPlan (cognitive 89) REDACTED:6312— computeDspLatencyPlan has cognitive complexity 89 (threshold 15). Drivers by points: ternaries 16 (38 pts), if/else 13 (28 pts), boolean chains 15, loops 5 (7 pts), other 1 (nesting depth added 39). Of this number, 87 points are the body's own statements and 2 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawGrid (cognitive 89) plugins/analyzer/spectrum_analyzer.js:1053— drawGrid has cognitive complexity 89 (threshold 15). Drivers by points: if/else 17 (42 pts), ternaries 11 (30 pts), boolean chains 7, other 7, loops 2 (3 pts) (nesting depth added 45). Of this number, 54 points are the body's own statements and 35 belong to 4 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.
initAudioInput (cognitive 89) js/audio/audio-io-manager.js:355— initAudioInput has cognitive complexity 89 (threshold 15). Drivers by points: if/else 28 (58 pts), error handling 6 (17 pts), boolean chains 12, ternaries 1 (2 pts) (nesting depth added 42). Of this number, 87 points are the body's own statements and 2 belong to 5 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MainActivity.dispatch (cognitive 88) android/app/src/main/java/com/frieve/effetune/MainActivity.java:172— MainActivity.dispatch has cognitive complexity 88 (threshold 15). Drivers by points: if/else 31 (48 pts), boolean chains 14, ternaries 6 (11 pts), error handling 5 (9 pts), loops 2 (5 pts), match/switch 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setParameters (cognitive 88) plugins/saturation/multiband_saturation.js:436— setParameters has cognitive complexity 88 (threshold 15). Drivers by points: ternaries 16 (56 pts), if/else 18 (32 pts) (nesting depth added 54). Of this number, 42 points are the body's own statements and 46 belong to one function literal inside it that branches. 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.
presets.import_legacy_preset (cognitive 87) dsp/bindings/python/src/effetune/presets.py:705— presets.import_legacy_preset has cognitive complexity 87 (threshold 15). Drivers by points: if/else 24 (48 pts), ternaries 14 (32 pts), boolean chains 6, loops 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderPagedCommitted::renderWindow (cognitive 86) js/ui/library/library-view.js:1935— renderPagedCommitted::renderWindow has cognitive complexity 86 (threshold 15). Drivers by points: ternaries 14 (30 pts), if/else 20 (28 pts), boolean chains 23, loops 3 (5 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
importLegacyPreset (cognitive 85) dsp/bindings/js/src/preset.js:617— importLegacyPreset has cognitive complexity 85 (threshold 15). Drivers by points: if/else 15 (34 pts), ternaries 13 (28 pts), boolean chains 11, loops 4 (8 pts), other 4 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawGraph (cognitive 84) plugins/analyzer/spectrogram.js:1239— drawGraph has cognitive complexity 84 (threshold 15). Drivers by points: if/else 31 (52 pts), ternaries 17 (35 pts), other 14, boolean chains 13, loops 4 (7 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
decodeRhythmAnalyzer (cognitive 84) dsp/bindings/js/src/telemetry.js:596— decodeRhythmAnalyzer has cognitive complexity 84 (threshold 15). Drivers by points: boolean chains 35, ternaries 13 (25 pts), if/else 10 (18 pts), loops 4 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiMappings.dispatch (cognitive 83) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:153— MidiMappings.dispatch has cognitive complexity 83 (threshold 15). Drivers by points: ternaries 9 (35 pts), if/else 18 (31 pts), boolean chains 12, match/switch 1 (4 pts), loops 1 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
prepare (cognitive 82) js/ui/audio-player/rolling-pcm-transport.js:134— prepare has cognitive complexity 82 (threshold 15). Drivers by points: if/else 21 (22 pts), boolean chains 21, ternaries 16 (18 pts), other 16, error handling 5 (nesting depth added 3). Of this number, 79 points are the body's own statements and 3 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
openUserDataBackupDialog.renderList (cognitive 82) js/user-data-backup/dialog.js:320— openUserDataBackupDialog.renderList has cognitive complexity 82 (threshold 15). Drivers by points: if/else 19 (50 pts), boolean chains 15, ternaries 4 (10 pts), loops 3 (7 pts) (nesting depth added 41). Of this number, 62 points are the body's own statements and 20 belong to 8 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.
commitPreparedTrackCandidate (cognitive 81) js/ui/audio-player/audio-context-manager.js:5838— commitPreparedTrackCandidate has cognitive complexity 81 (threshold 15). Drivers by points: if/else 31 (41 pts), ternaries 13 (20 pts), boolean chains 15, other 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
network-music-upnp.parseXml (cognitive 80) electron/network-music-upnp.cjs:25— network-music-upnp.parseXml has cognitive complexity 80 (threshold 15). Drivers by points: if/else 20 (57 pts), ternaries 4 (12 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 49). Of this number, 79 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenHomePlaybackAdapter.getSnapshot (cognitive 80) js/ui/audio-player/openhome-playback-adapter.js:1134— OpenHomePlaybackAdapter.getSnapshot has cognitive complexity 80 (threshold 15). Drivers by points: ternaries 33 (55 pts), boolean chains 21, if/else 2 (3 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.
dialog.openUserDataBackupDialog.renderList (cognitive 79) js/user-data-backup/dialog.js:320— dialog.openUserDataBackupDialog.renderList has cognitive complexity 79 (threshold 15). Drivers by points: if/else 19 (50 pts), boolean chains 17, loops 3 (7 pts), ternaries 2 (5 pts) (nesting depth added 38). Of this number, 59 points are the body's own statements and 20 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.
playlist-stream.parseXspfRecords (cognitive 79) js/library/playlists/playlist-stream.js:365— playlist-stream.parseXspfRecords has cognitive complexity 79 (threshold 15). Drivers by points: if/else 23 (53 pts), ternaries 4 (14 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 41). Of this number, 70 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiMappingStore.validateMapping (cognitive 79) js/midi/midi-mapping-store.js:203— MidiMappingStore.validateMapping has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 21 (32 pts), if/else 21 (24 pts), boolean chains 23 (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.
syncControls (cognitive 79) features/measurement/ui/analysis-controller.js:474— syncControls has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 12 (35 pts), if/else 15 (28 pts), boolean chains 15, loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiresSpectrum.step (cognitive 77) plugins/multires-spectrum.js:332— MultiresSpectrum.step has cognitive complexity 77 (threshold 15). Drivers by points: if/else 16 (43 pts), ternaries 8 (31 pts), boolean chains 2, loops 1 (nesting depth added 50). 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.
_renderMixer (cognitive 77) plugins/others/soundfont_player.js:800— _renderMixer has cognitive complexity 77 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 8 (23 pts), boolean chains 12, loops 4 (10 pts), other 5 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
lyrics-timeline.getMidiLyricsData (cognitive 76) js/midi/lyrics-timeline.js:16— lyrics-timeline.getMidiLyricsData has cognitive complexity 76 (threshold 15). Drivers by points: if/else 21 (45 pts), boolean chains 13, loops 4 (10 pts), ternaries 3 (8 pts) (nesting depth added 35). Of this number, 74 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
advanceSfzSampleForecast (cognitive 76) REDACTED:5589— advanceSfzSampleForecast has cognitive complexity 76 (threshold 15). Drivers by points: boolean chains 27, if/else 21 (23 pts), ternaries 11 (17 pts), other 8, loops 1 (nesting depth added 8). Of this number, 62 points are the body's own statements and 14 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
browseShared (cognitive 76) electron/network-music-host.cjs:555— browseShared has cognitive complexity 76 (threshold 15). Drivers by points: if/else 24 (44 pts), ternaries 7 (21 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 36). Of this number, 71 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
readSnapshot (cognitive 75) plugins/analyzer/rhythm_analyzer.js:387— readSnapshot has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 25, if/else 13 (24 pts), ternaries 10 (22 pts), loops 3 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawVisualizerRhythm (cognitive 75) plugins/analyzer/rhythm_analyzer.js:1315— drawVisualizerRhythm has cognitive complexity 75 (threshold 15). Drivers by points: ternaries 23 (40 pts), boolean chains 14, other 14, if/else 5 (7 pts) (nesting depth added 19). Of this number, 48 points are the body's own statements and 27 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
presetIntegration.openPresetFile (cognitive 74) js/electron/presetIntegration.js:40— presetIntegration.openPresetFile has cognitive complexity 74 (threshold 15). Drivers by points: if/else 22 (38 pts), error handling 9 (29 pts), boolean chains 7 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
controlDomain (cognitive 74) features/measurement/ui/analysis-controller.js:390— controlDomain has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 23 (45 pts), if/else 16 (17 pts), boolean chains 11, other 1 (nesting depth added 23). Of this number, 72 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
modulation-schema.targetFor (cognitive 73) js/sfz/modulation-schema.js:288— modulation-schema.targetFor has cognitive complexity 73 (threshold 15). Drivers by points: ternaries 19 (42 pts), if/else 26, boolean chains 5 (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.
Discovery.receive (cognitive 73) electron/network-music-upnp.cjs:311— Discovery.receive has cognitive complexity 73 (threshold 15). Drivers by points: if/else 24 (42 pts), boolean chains 21, loops 5 (8 pts), ternaries 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
#playPrevious (cognitive 73) js/ui/audio-player/playback-manager.js:1762— #playPrevious has cognitive complexity 73 (threshold 15). Drivers by points: if/else 26 (55 pts), boolean chains 14, other 2, ternaries 1 (2 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
_applyPointerMove (cognitive 73) plugins/spatial/phase_select_eq.js:1099— _applyPointerMove has cognitive complexity 73 (threshold 15). Drivers by points: if/else 23 (52 pts), ternaries 4 (17 pts), boolean chains 4 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
createBrowserController (cognitive 73) electron/browser-controller.cjs:177— createBrowserController has cognitive complexity 73 (threshold 15). Drivers by points: boolean chains 30, if/else 24 (28 pts), ternaries 6 (8 pts), error handling 3 (4 pts), loops 2 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 4 of the 73 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 900, 760, 882, …). 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.
UserDataBackupService.restore (cognitive 71) js/user-data-backup/service.js:175— UserDataBackupService.restore has cognitive complexity 71 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 6 (12 pts), boolean chains 10, ternaries 2 (6 pts), error handling 1 (2 pts) (nesting depth added 33). Of this number, 70 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smoothing.smoothLog (cognitive 71) features/measurement/peq-calculator/smoothing.js:12— smoothing.smoothLog has cognitive complexity 71 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 12, loops 9 (12 pts), error handling 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.
stageOfflineDspAssets (cognitive 71) js/audio/offline-processor.js:619— stageOfflineDspAssets has cognitive complexity 71 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 11, ternaries 5 (9 pts), error handling 3 (7 pts), loops 4 (6 pts), other 4 (nesting depth added 29). Of this number, 62 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
processOfflineHybridBlock (cognitive 71) js/audio/offline-processor.js:969— processOfflineHybridBlock has cognitive complexity 71 (threshold 15). Drivers by points: if/else 22 (45 pts), ternaries 5 (12 pts), boolean chains 7, loops 4, error handling 1 (2 pts), other 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateMidiPendingDemand (cognitive 70) REDACTED:8037— updateMidiPendingDemand has cognitive complexity 70 (threshold 15). Drivers by points: if/else 14 (45 pts), boolean chains 21, loops 1 (2 pts), other 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_pollTick (cognitive 70) js/audio/audio-io-manager.js:968— _pollTick has cognitive complexity 70 (threshold 15). Drivers by points: if/else 18 (27 pts), error handling 10 (23 pts), boolean chains 12, other 5, ternaries 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configure (cognitive 70) electron/network-music-host.cjs:105— configure has cognitive complexity 70 (threshold 15). Drivers by points: if/else 21 (50 pts), loops 3 (10 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
waterfall-surface.rasterizeWaterfallSurface (cognitive 69) features/measurement/ui/waterfall-surface.js:121— waterfall-surface.rasterizeWaterfallSurface has cognitive complexity 69 (threshold 15). Drivers by points: if/else 8 (34 pts), loops 7 (26 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderPagedCommitted (cognitive 69) js/ui/library/library-view.js:1814— renderPagedCommitted has cognitive complexity 69 (threshold 15). Drivers by points: if/else 51 (62 pts), ternaries 31 (49 pts), boolean chains 46, loops 4 (6 pts), other 6 (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.
presets._legacy_parameters (cognitive 67) dsp/bindings/python/src/effetune/presets.py:603— presets._legacy_parameters has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (47 pts), loops 4 (10 pts), error handling 1 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
visualizer-counter.drawCounter (cognitive 66) js/visualizer/visualizer-counter.js:90— visualizer-counter.drawCounter has cognitive complexity 66 (threshold 15). Drivers by points: if/else 19 (28 pts), ternaries 11 (22 pts), boolean chains 12, loops 2 (4 pts) (nesting depth added 22). Most of this is not in the body itself: 12 of the 66 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 122, a function literal at line 172, alignPaint, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AudioService.applyPipeline (cognitive 66) android/app/src/main/java/com/frieve/effetune/AudioService.java:485— AudioService.applyPipeline has cognitive complexity 66 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 10 (15 pts), boolean chains 10, ternaries 4 (9 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.
calculateJtJandJte (cognitive 66) features/measurement/peq-calculator/optimization.js:298— calculateJtJandJte has cognitive complexity 66 (threshold 15). Drivers by points: loops 12 (25 pts), ternaries 6 (25 pts), if/else 6 (14 pts), boolean chains 2 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ess.analyzeEssRecording (cognitive 65) js/utils/measurement-dsp/ess.js:113— ess.analyzeEssRecording has cognitive complexity 65 (threshold 15). Drivers by points: if/else 18 (31 pts), ternaries 11 (15 pts), loops 7 (11 pts), boolean chains 8 (nesting depth added 21). Of this number, 52 points are the body's own statements and 13 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.
sample-stream.pcmMetadata (cognitive 65) js/sfz/sample-stream.js:10— sample-stream.pcmMetadata has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (44 pts), boolean chains 14, ternaries 2 (6 pts), loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
processNetworkOutputStage (cognitive 65) REDACTED:3485— processNetworkOutputStage has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 10 (25 pts), if/else 15 (24 pts), boolean chains 8, loops 3 (7 pts), other 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setPowerProcessingState (cognitive 65) REDACTED:4306— setPowerProcessingState has cognitive complexity 65 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 20, ternaries 3 (5 pts), other 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.
_drawGraph (cognitive 65) plugins/eq/five_band_dynamic_eq.js:1016— _drawGraph has cognitive complexity 65 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 6 (15 pts), boolean chains 9, other 7, ternaries 4 (7 pts) (nesting depth added 24). Of this number, 64 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.
createUI (cognitive 65) plugins/eq/fifteen_band_peq.js:457— createUI has cognitive complexity 65 (threshold 15). Drivers by points: if/else 25 (44 pts), ternaries 5 (10 pts), boolean chains 8, loops 3 (nesting depth added 24). Most of this is not in the body itself: 8 of the 65 points are its own statements and the rest belongs to 25 function items inside it that branch (a function literal at line 759, a function literal at line 895, onTap, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
audioIntegration.showAudioConfigDialog::applyPreferences (cognitive 64) js/electron/audioIntegration.js:580— audioIntegration.showAudioConfigDialog::applyPreferences has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (38 pts), boolean chains 18, error handling 3 (6 pts), ternaries 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.
analysis-worker.prepareProcessor (cognitive 64) js/pipeline-analyzer/analysis-worker.js:225— analysis-worker.prepareProcessor has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 26, if/else 11 (20 pts), loops 10 (12 pts), ternaries 4 (6 pts) (nesting depth added 13). Of this number, 35 points are the body's own statements and 29 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cue-sheet.parseCueSheet (cognitive 64) js/library/metadata/cue-sheet.js:25— cue-sheet.parseCueSheet has cognitive complexity 64 (threshold 15). Drivers by points: if/else 24 (54 pts), boolean chains 8, error handling 1, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetTransfers.command (cognitive 64) android/app/src/main/java/com/frieve/effetune/AssetTransfers.java:133— AssetTransfers.command has cognitive complexity 64 (threshold 15). Drivers by points: if/else 23 (48 pts), boolean chains 5, loops 2 (5 pts), error handling 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reconcileDspPlugin (cognitive 63) REDACTED:4971— reconcileDspPlugin has cognitive complexity 63 (threshold 15). Drivers by points: if/else 25 (42 pts), boolean chains 14, ternaries 2 (5 pts), other 2 (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.
_drawMixerKeyboard (cognitive 63) plugins/others/soundfont_player.js:888— _drawMixerKeyboard has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 13 (36 pts), if/else 8 (17 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
python_golden_runner.semantic_parameters (cognitive 62) dsp/bindings/acceptance/python_golden_runner.py:202— python_golden_runner.semantic_parameters has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 8 (29 pts), if/else 12 (28 pts), boolean chains 4, loops 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
handleTelemetry (cognitive 62) plugins/analyzer/note_spectrogram.js:1196— handleTelemetry has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (33 pts), loops 7 (14 pts), boolean chains 11, ternaries 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawHud (cognitive 62) plugins/lofi/fm_radio_simulator.js:1353— drawHud has cognitive complexity 62 (threshold 15). Drivers by points: other 22, ternaries 15 (20 pts), if/else 8 (11 pts), loops 6, boolean chains 3 (nesting depth added 8). Of this number, 57 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initDragAndDrop (cognitive 62) js/ui/pipeline/ui-event-handler.js:337— initDragAndDrop has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (44 pts), boolean chains 9, error handling 2 (9 pts) (nesting depth added 34). Most of this is not in the body itself: 5 of the 62 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 473, a function literal at line 421, (anonymous)::onload, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
graph-document.structuralOrder (cognitive 61) dsp/bindings/js/src/graph-document.js:215— graph-document.structuralOrder has cognitive complexity 61 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 9 (16 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 29). Of this number, 52 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
telemetry._decode_rhythm_analyzer (cognitive 61) dsp/bindings/python/src/effetune/telemetry.py:991— telemetry._decode_rhythm_analyzer has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 26, if/else 11 (18 pts), ternaries 7 (12 pts), loops 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
activatePreparedTrackTransition (cognitive 61) js/ui/audio-player/audio-context-manager.js:5325— activatePreparedTrackTransition has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 27, error handling 1, other 1 (nesting depth added 10). Of this number, 46 points are the body's own statements and 15 belong to 10 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
refresh (cognitive 61) features/measurement/ui/analysis-controller.js:548— refresh has cognitive complexity 61 (threshold 15). Drivers by points: if/else 23 (29 pts), ternaries 12 (14 pts), boolean chains 12, loops 3 (4 pts), error handling 2 (nesting depth added 9). Of this number, 59 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
#handlePlayback (cognitive 61) js/library/operations/web-library-service-coordinator.js:461— #handlePlayback has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 11, ternaries 7 (11 pts), loops 4 (6 pts), other 3, error handling 1 (2 pts) (nesting depth added 19). Of this number, 55 points are the body's own statements and 6 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawGraph (cognitive 61) plugins/eq/tonal_balance_eq.js:759— drawGraph has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 8 (16 pts), ternaries 10 (13 pts), boolean chains 8, other 1 (nesting depth added 20). Of this number, 38 points are the body's own statements and 23 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smf-timeline.applyMidiEvent (cognitive 60) js/midi/smf-timeline.js:24— smf-timeline.applyMidiEvent has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (33 pts), loops 5 (16 pts), boolean chains 11 (nesting depth added 24). Of this number, 58 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configurePowerPolicy (cognitive 60) REDACTED:4123— configurePowerPolicy has cognitive complexity 60 (threshold 15). Drivers by points: boolean chains 23, ternaries 12 (17 pts), if/else 13 (16 pts), loops 3, other 1 (nesting depth added 8). Of this number, 59 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
traceNetworkPath (cognitive 60) REDACTED:6175— traceNetworkPath has cognitive complexity 60 (threshold 15). Drivers by points: if/else 11 (28 pts), ternaries 5 (12 pts), boolean chains 10, loops 6 (10 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drawChordLane (cognitive 60) plugins/analyzer/note_spectrogram.js:1954— _drawChordLane has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 17 (30 pts), if/else 8 (17 pts), loops 5 (7 pts), other 4, boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity· process (cognitive 60) · ×1
process (cognitive 60) plugins/analyzer/spectrogram.js:604— process has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (27 pts), ternaries 5 (21 pts), boolean chains 6, loops 5 (6 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
handlePlaybackOperation (cognitive 60) electron/library-service-coordinator.cjs:593— handlePlaybackOperation has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 11, ternaries 6 (10 pts), loops 4 (6 pts), other 3, error handling 1 (2 pts) (nesting depth added 19). Of this number, 54 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draw (cognitive 60) js/visualizer/visualizer-analyzer-display.js:492— draw has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 14, ternaries 9 (12 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
postMidiTransport::listener (cognitive 60) js/ui/audio-player/midi-playback.js:133— postMidiTransport::listener has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (37 pts), boolean chains 14, other 6, error handling 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph_document._structure (cognitive 59) dsp/bindings/python/src/effetune/graph_document.py:231— graph_document._structure has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 8 (15 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
playAudioElement (cognitive 59) js/ui/audio-player/audio-context-manager.js:2892— playAudioElement has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 27, if/else 19 (25 pts), error handling 3 (6 pts), ternaries 1 (nesting depth added 9). Of this number, 39 points are the body's own statements and 20 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
createOfflineDspSession (cognitive 59) js/audio/offline-processor.js:435— createOfflineDspSession has cognitive complexity 59 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 17, error handling 2 (4 pts), loops 2 (nesting depth added 16). Of this number, 58 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
importFolderFiles (cognitive 59) js/sfz/service.js:305— importFolderFiles has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 9, loops 4 (5 pts), ternaries 2 (3 pts), error handling 2, other 1 (nesting depth added 16). Of this number, 47 points are the body's own statements and 12 belong to 19 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
remote-music-dispatcher.dispatchMusic (cognitive 58) electron/remote-music-dispatcher.cjs:180— remote-music-dispatcher.dispatchMusic has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 6 (20 pts), error handling 4 (8 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 29). Of this number, 57 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
ogg-vorbis.decodeOggVorbisFrames (cognitive 58) js/sf2/ogg-vorbis.js:122— ogg-vorbis.decodeOggVorbisFrames has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 11, loops 5 (8 pts), ternaries 2 (4 pts), error handling 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.
FiveBandDynamicEQ.setParameters (cognitive 58) plugins/eq/five_band_dynamic_eq.js:378— FiveBandDynamicEQ.setParameters has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (42 pts), boolean chains 14, loops 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_resolveVisualSyncDue (cognitive 58) js/audio-manager.js:2272— _resolveVisualSyncDue has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 20, ternaries 12 (17 pts), if/else 11 (15 pts), other 6 (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.
importMeasurementFromJSON (cognitive 58) features/measurement/dataStorage.js:1333— importMeasurementFromJSON has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 6 (10 pts), boolean chains 9, loops 5 (8 pts), error handling 4 (7 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
measureEss (cognitive 58) js/pipeline-analyzer/analysis-worker.js:665— measureEss has cognitive complexity 58 (threshold 15). Drivers by points: loops 9 (24 pts), if/else 7 (18 pts), ternaries 5 (7 pts), other 5, boolean chains 3, error handling 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DynamicSaturationPlugin.setParameters (cognitive 57) plugins/saturation/dynamic_saturation.js:163— DynamicSaturationPlugin.setParameters has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 18 (45 pts), if/else 12 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeParameterPacker.mustProcess (cognitive 57) android/app/src/main/java/com/frieve/effetune/NativeParameterPacker.java:98— NativeParameterPacker.mustProcess has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 5 (19 pts), loops 3 (8 pts), boolean chains 5 (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.
_finalizeParallelDspBarrier (cognitive 57) js/audio-manager.js:1524— _finalizeParallelDspBarrier has cognitive complexity 57 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 16, loops 6 (8 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 57 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1549, a function literal at line 1707, startTransition::assetExpectationsActive, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_collectFacts (cognitive 57) js/audio/power-policy-controller.js:881— _collectFacts has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 22, if/else 10 (17 pts), ternaries 14 (15 pts), other 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity· field (cognitive 57) · ×1
field (cognitive 57) js/visualizer/visualizer-editor.js:400— field has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 14 (25 pts), if/else 13 (21 pts), loops 3 (5 pts), boolean chains 3, other 3 (nesting depth added 21). Of this number, 47 points are the body's own statements and 10 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawMeter (cognitive 57) plugins/analyzer/stereo_meter.js:548— drawMeter has cognitive complexity 57 (threshold 15). Drivers by points: if/else 41 (58 pts), other 20, loops 7 (10 pts), ternaries 6 (10 pts), boolean chains 3 (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.
assets.prepareFirFilterAsset (cognitive 56) dsp/bindings/js/src/assets.js:693— assets.prepareFirFilterAsset has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 25, ternaries 2 (3 pts), error handling 1 (nesting depth added 9). Of this number, 52 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalysisPlot.draw (cognitive 56) features/measurement/ui/analysis-plot.js:127— AnalysisPlot.draw has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 3 (10 pts), ternaries 3 (10 pts), boolean chains 5 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Stream.__init__ (cognitive 56) dsp/bindings/python/src/effetune/chain.py:364— Stream.__init__ has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 11, error handling 3 (5 pts), loops 4 (5 pts), ternaries 1 (3 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.
parseDspScopeTelemetryFrame (cognitive 56) plugins/analyzer/oscilloscope.js:682— parseDspScopeTelemetryFrame has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (31 pts), boolean chains 17, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 17). Of this number, 54 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
playSelection (cognitive 56) electron/network-music-host.cjs:624— playSelection has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 11, ternaries 5 (7 pts), loops 3 (4 pts), other 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prepareMidiTransport (cognitive 56) js/ui/audio-player/midi-playback.js:308— prepareMidiTransport has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 13, other 5, loops 3 (4 pts), ternaries 2 (4 pts), error handling 2 (3 pts) (nesting depth added 15). Most of this is not in the body itself: 7 of the 56 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 365, a function literal at line 325, (anonymous)::(anonymous)::beforeReplay, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
parser.normalizeRegion (cognitive 55) js/sfz/parser.js:116— parser.normalizeRegion has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 12, ternaries 4 (12 pts), loops 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.
remote-music-dispatcher.validate (cognitive 55) electron/remote-music-dispatcher.cjs:56— remote-music-dispatcher.validate has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 8 (18 pts), boolean chains 11, loops 1 (2 pts), match/switch 1 (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ClipboardManager.handlePaste (cognitive 55) js/ui/pipeline/clipboard-manager.js:89— ClipboardManager.handlePaste has cognitive complexity 55 (threshold 15). Drivers by points: if/else 22 (43 pts), boolean chains 6, error handling 3 (6 pts) (nesting depth added 24). Of this number, 51 points are the body's own statements and 4 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.
AudioService.sourceSnapshot (cognitive 55) android/app/src/main/java/com/frieve/effetune/AudioService.java:861— AudioService.sourceSnapshot has cognitive complexity 55 (threshold 15). Drivers by points: error handling 8 (24 pts), if/else 9 (16 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphStream.__init__ (cognitive 55) dsp/bindings/python/src/effetune/graph.py:429— GraphStream.__init__ has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (25 pts), error handling 6 (11 pts), ternaries 5 (9 pts), boolean chains 6, loops 4 (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.
setParameters (cognitive 55) plugins/eq/room_eq.js:1183— setParameters has cognitive complexity 55 (threshold 15). Drivers by points: if/else 34 (38 pts), boolean chains 7, ternaries 5 (6 pts), other 3, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
drawGraph (cognitive 55) plugins/analyzer/pitch_meter.js:545— drawGraph has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 8 (15 pts), boolean chains 9, loops 7 (nesting depth added 16). Of this number, 54 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
asset.sfzAssetTailSeconds (cognitive 54) js/sfz/asset.js:47— asset.sfzAssetTailSeconds has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 11, ternaries 3 (8 pts), loops 2 (3 pts) (nesting depth added 25). Of this number, 52 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
remote-client-window.registerIntegratedRemoteClientIpc (cognitive 54) electron/remote-client-window.cjs:121— remote-client-window.registerIntegratedRemoteClientIpc has cognitive complexity 54 (threshold 15). Drivers by points: if/else 25 (29 pts), boolean chains 16, ternaries 4 (5 pts), error handling 3, loops 1 (nesting depth added 5). Most of this is not in the body itself: 6 of the 54 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 175, saveConnection, savedConnection, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AudioManager._transitionDspConfiguration (cognitive 54) js/audio-manager.js:3101— AudioManager._transitionDspConfiguration has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 4 (11 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 30). Of this number, 51 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
asset-library-browser.openAssetLibraryBrowser.render (cognitive 54) js/ui/asset-library-browser.js:172— asset-library-browser.openAssetLibraryBrowser.render has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 9, error handling 4 (8 pts), loops 1 (nesting depth added 22). Of this number, 21 points are the body's own statements and 33 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.
PluginProcessor.applyNetworkOutputDelay (cognitive 54) REDACTED:3597— PluginProcessor.applyNetworkOutputDelay has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 5 (20 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MidiInputState.apply (cognitive 53) js/midi/smf-timeline.js:103— MidiInputState.apply has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 7 (18 pts), ternaries 4 (10 pts), boolean chains 5 (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.
AudioManager._pruneInactiveDspWorklets (cognitive 53) js/audio-manager.js:1272— AudioManager._pruneInactiveDspWorklets has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 9 (20 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
signal-processing.calculateFFT (cognitive 53) features/measurement/audio-utils/signal-processing.js:15— signal-processing.calculateFFT has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 7 (14 pts), boolean chains 10 (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.
prepareNextTrackBufferForTrack (cognitive 53) js/ui/audio-player/audio-context-manager.js:4691— prepareNextTrackBufferForTrack has cognitive complexity 53 (threshold 15). Drivers by points: if/else 24 (36 pts), boolean chains 8, other 4, error handling 2 (3 pts), ternaries 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.
drag (cognitive 53) js/visualizer/visualizer-editor.js:1529— drag has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 16 (31 pts), if/else 12 (15 pts), boolean chains 7 (nesting depth added 18). Of this number, 52 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drawLane (cognitive 53) plugins/analyzer/rhythm_analyzer.js:1796— _drawLane has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 8 (16 pts), loops 5 (10 pts), boolean chains 7, other 2 (nesting depth added 18). Of this number, 42 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
asset-library-browser.openAssetLibraryBrowser (cognitive 52) js/ui/asset-library-browser.js:37— asset-library-browser.openAssetLibraryBrowser has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28 (31 pts), boolean chains 15, error handling 2 (3 pts), loops 2, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 52 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 547, 475, 427, …). 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.
renderGraph (cognitive 52) js/pipeline-analyzer/ui.js:1402— renderGraph has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 12 (24 pts), if/else 10 (14 pts), boolean chains 6, loops 5, other 3 (nesting depth added 16). Of this number, 49 points are the body's own statements and 3 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.
handleLibraryKeyDown (cognitive 52) js/network-music/view.js:907— handleLibraryKeyDown has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 17, ternaries 8 (16 pts) (nesting depth added 11). Of this number, 50 points are the body's own statements and 2 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
effect.validateParameterValue (cognitive 51) REDACTED:42— effect.validateParameterValue has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (29 pts), ternaries 4 (11 pts), boolean chains 10, loops 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
archive.createArchive (cognitive 51) js/user-data-backup/archive.js:138— archive.createArchive has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 5 (18 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 31). Of this number, 49 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
MidiMappingEngine.queueMapping (cognitive 51) js/midi/midi-mapping-engine.js:127— MidiMappingEngine.queueMapping has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 10, loops 1 (3 pts), ternaries 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.
enableParallelPipelines (cognitive 51) js/audio-manager.js:4192— enableParallelPipelines has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 19, error handling 4 (7 pts), ternaries 4 (nesting depth added 5). Of this number, 46 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AvTransportPlayers.read (cognitive 50) electron/network-music-av-player.cjs:22— AvTransportPlayers.read has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 25, if/else 9 (15 pts), ternaries 8 (9 pts), error handling 1 (nesting depth added 7). Of this number, 48 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
effetune_bench.html.runBenchmarks (cognitive 50) features/effetune_bench.html:937— effetune_bench.html.runBenchmarks has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (28 pts), loops 5 (13 pts), boolean chains 5, ternaries 1 (3 pts), error handling 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.
LogicalSelection.setSelected (cognitive 50) js/ui/library/logical-selection.js:79— LogicalSelection.setSelected has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 12 (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.
advanceClock (cognitive 50) plugins/analyzer/rhythm_analyzer.js:720— advanceClock has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 11, ternaries 3 (5 pts), loops 4 (nesting depth added 16). Of this number, 48 points are the body's own statements and 2 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.
_drawLens (cognitive 50) plugins/analyzer/rhythm_analyzer.js:2061— _drawLens has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 10 (25 pts), if/else 9 (13 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 24). Of this number, 37 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
syncPlaybackControls (cognitive 50) REDACTED:584— syncPlaybackControls has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 10, ternaries 4 (9 pts), loops 2 (nesting depth added 18). Of this number, 42 points are the body's own statements and 8 belong to 10 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.
modulation.compileSfzModulation (cognitive 49) js/sfz/modulation.js:407— modulation.compileSfzModulation has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 10, loops 4 (6 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.
visualizer-lyrics.lyricsFrame (cognitive 49) js/visualizer/visualizer-lyrics.js:32— visualizer-lyrics.lyricsFrame has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 11 (14 pts), boolean chains 11, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
playback-selection-router.resolveWebPlaybackSelection (cognitive 49) js/ui/playback-selection-router.js:17— playback-selection-router.resolveWebPlaybackSelection has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (31 pts), ternaries 5 (7 pts), error handling 3 (5 pts), boolean chains 4, loops 2 (nesting depth added 14). Of this number, 44 points are the body's own statements and 5 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.
NoteSpectrogramPlugin._readNote (cognitive 49) plugins/analyzer/note_spectrogram.js:2430— NoteSpectrogramPlugin._readNote has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 12 (20 pts), if/else 12 (19 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 17). Of this number, 46 points are the body's own statements and 3 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.
requestInputRelease (cognitive 49) js/audio/power-policy-controller.js:3175— requestInputRelease has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 18, ternaries 4 (5 pts), error handling 2 (4 pts), other 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handlePortMessage (cognitive 49) electron/network-output-host.cjs:909— handlePortMessage has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 10, loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setupEventConnections (cognitive 49) features/measurement/app.js:329— setupEventConnections has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15, boolean chains 13, ternaries 9 (11 pts), error handling 8 (10 pts) (nesting depth added 4). None of this is in the body itself: all 49 points belong to 20 function literals inside it that branch (lines 331, 554, 523, …). 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.
decodeOscilloscope (cognitive 49) dsp/bindings/js/src/telemetry.js:105— decodeOscilloscope has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 11, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 17). Of this number, 47 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_handleSfzRuntimeMessage (cognitive 49) js/audio/audio-manager-sfz-runtime.js:284— _handleSfzRuntimeMessage has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 9, ternaries 3 (9 pts), other 8 (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.
FileProcessor.setupFileDropHandlers (cognitive 48) js/ui/pipeline/file-processor.js:221— FileProcessor.setupFileDropHandlers has cognitive complexity 48 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 9 (nesting depth added 14). None of this is in the body itself: all 48 points belong to 8 function literals inside it that branch (lines 223, 273, 334, …). 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.
visualizer-model.normalizeParams (cognitive 48) js/visualizer/visualizer-model.js:335— visualizer-model.normalizeParams has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 14 (27 pts), if/else 18, boolean chains 3 (nesting depth added 13). Of this number, 43 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smoothing.smoothFrequencyResponse (cognitive 48) js/utils/measurement-dsp/smoothing.js:10— smoothing.smoothFrequencyResponse has cognitive complexity 48 (threshold 15). Drivers by points: loops 11 (26 pts), if/else 9 (14 pts), boolean chains 8 (nesting depth added 20). 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.
MidiMixerDisplay.drawLevel (cognitive 48) js/visualizer/visualizer-midi-mixer.js:172— MidiMixerDisplay.drawLevel has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 7 (12 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 14). Of this number, 46 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MeasurementController.startNewMeasurementOperation (cognitive 48) features/measurement/measurement-controller/index.js:179— MeasurementController.startNewMeasurementOperation has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 9, ternaries 7 (8 pts), error handling 4 (7 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
optimization.solveEquation (cognitive 48) features/measurement/peq-calculator/optimization.js:393— optimization.solveEquation has cognitive complexity 48 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 10 (18 pts), ternaries 3 (9 pts), boolean chains 3 (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.
waterfall-surface.buildWaterfallMesh (cognitive 48) features/measurement/ui/waterfall-surface.js:24— waterfall-surface.buildWaterfallMesh has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 7 (14 pts), boolean chains 8, ternaries 6 (nesting depth added 19). Of this number, 43 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frequency-axis.shadeKeyboard (cognitive 48) plugins/frequency-axis.js:67— frequency-axis.shadeKeyboard has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 17 (22 pts), if/else 11 (14 pts), loops 8 (10 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 11 of the 48 points are its own statements and the rest belongs to 10 function items inside it that branch (rect, fillDepthGradient, a function literal at line 115, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SpectrumOverlayInstance._drawDifference (cognitive 48) plugins/spectrum-overlay.js:492— SpectrumOverlayInstance._drawDifference has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 12 (25 pts), if/else 11 (19 pts), boolean chains 2, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handleMidiSnapshot (cognitive 48) plugins/analyzer/note_spectrogram.js:1122— handleMidiSnapshot has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 8 (15 pts), boolean chains 6, loops 3 (4 pts), other 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drawEdcGraph (cognitive 48) plugins/reverb/ir_reverb.js:1853— _drawEdcGraph has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (15 pts), other 14, ternaries 4 (7 pts), boolean chains 6, loops 5 (6 pts) (nesting depth added 8). Of this number, 41 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executeAvTransport (cognitive 48) js/ui/audio-player/openhome-playback-adapter.js:528— executeAvTransport has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 16, ternaries 4 (7 pts), other 2 (nesting depth added 10). Of this number, 46 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draw (cognitive 48) features/measurement/ui/analysis-controller.js:754— draw has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (21 pts), ternaries 15 (21 pts), boolean chains 6 (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.
materializeSelection (cognitive 48) electron/library-service-coordinator.cjs:1001— materializeSelection has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 4 (6 pts), ternaries 3 (6 pts), boolean chains 4, other 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawStaticBackground (cognitive 48) plugins/analyzer/level_meter.js:405— drawStaticBackground has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 14 (26 pts), if/else 6 (10 pts), other 6, boolean chains 5, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openPagedAddToPlaylistMenu (cognitive 48) js/ui/library/library-view-menus.js:22— openPagedAddToPlaylistMenu has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (24 pts), error handling 6 (10 pts), ternaries 6, boolean chains 5, other 3 (nesting depth added 10). Most of this is not in the body itself: 3 of the 48 points are its own statements and the rest belongs to 24 function items inside it that branch (a function literal at line 102, openQuery, releaseContext, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
drawItem (cognitive 48) js/visualizer/visualizer-renderer.js:386— drawItem has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (26 pts), ternaries 9 (19 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dsp-wasm-loader.createDspParamPackers (cognitive 47) js/audio/dsp-wasm-loader.js:156— dsp-wasm-loader.createDspParamPackers has cognitive complexity 47 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 7 (17 pts), boolean chains 9, loops 2 (3 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.
UIEventHandler.setupParameterOperationEvents (cognitive 47) js/ui/pipeline/ui-event-handler.js:175— UIEventHandler.setupParameterOperationEvents has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29, boolean chains 16, loops 1, ternaries 1. Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 13 function items inside it that branch (a function literal at line 232, a function literal at line 180, a function literal at line 188, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
signal-generation.startWhiteNoise (cognitive 47) features/measurement/audio-utils/signal-generation.js:229— signal-generation.startWhiteNoise has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 8, error handling 3 (5 pts), ternaries 2 (5 pts), loops 1 (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.
SfzSamplePageProvider.pump (cognitive 47) js/sfz/sample-page-provider.js:194— SfzSamplePageProvider.pump has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 5 (9 pts), boolean chains 8, ternaries 2 (4 pts), error handling 1 (nesting depth added 17). Of this number, 21 points are the body's own statements and 26 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_reconcileOutputDevice (cognitive 47) js/app.js:1582— _reconcileOutputDevice has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (25 pts), error handling 6 (13 pts), boolean chains 7, other 1, ternaries 1 (nesting depth added 16). Of this number, 38 points are the body's own statements and 9 belong to 5 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.
_selectedHandles (cognitive 47) plugins/spatial/phase_select_eq.js:1249— _selectedHandles has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 16 (38 pts), if/else 5 (7 pts), loops 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parseDidlLite (cognitive 47) js/ui/audio-player/openhome-playback-adapter.js:1395— parseDidlLite has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 11, ternaries 5 (8 pts), loops 3 (4 pts), error handling 2, other 1 (nesting depth added 12). Of this number, 39 points are the body's own statements and 8 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderDetails (cognitive 47) js/midi/midi-mapping-dialog.js:672— renderDetails has cognitive complexity 47 (threshold 15). Drivers by points: loops 6 (14 pts), ternaries 6 (12 pts), if/else 9 (11 pts), boolean chains 10 (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.
errorFunctionLogSpace (cognitive 47) features/measurement/peq-calculator/optimization.js:69— errorFunctionLogSpace has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 7 (20 pts), loops 6 (11 pts), if/else 5 (9 pts), boolean chains 7 (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.
ir-library-ipc.registerIrLibraryIpc (cognitive 46) electron/ir-library-ipc.js:128— ir-library-ipc.registerIrLibraryIpc has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (25 pts), error handling 10, boolean chains 6, loops 3, ternaries 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 3 of the 46 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 291, a function literal at line 175, getNamespace, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MultibandTransientPlugin.setParameters (cognitive 46) plugins/dynamics/multiband_transient.js:657— MultibandTransientPlugin.setParameters has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 3 (nesting depth added 22). Of this number, 22 points are the body's own statements and 24 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.
_finishPowerRender (cognitive 46) REDACTED:7426— _finishPowerRender has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 14, error handling 1 (4 pts), ternaries 2 (4 pts), other 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.
_drawTempogram (cognitive 46) plugins/analyzer/rhythm_analyzer.js:1927— _drawTempogram has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 7 (11 pts), loops 6 (8 pts), boolean chains 3, other 2 (nesting depth added 17). Of this number, 19 points are the body's own statements and 27 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initKeyboardShortcuts::keydownHandler (cognitive 46) js/ui/audio-player/playback-manager.js:2517— initKeyboardShortcuts::keydownHandler has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 8, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
#materializeSelection (cognitive 46) js/library/operations/web-library-service-coordinator.js:902— #materializeSelection has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 4 (6 pts), ternaries 3 (6 pts), boolean chains 4, other 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PresetManager.loadPreset (cognitive 45) js/ui/pipeline/preset-manager.js:278— PresetManager.loadPreset has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 9, error handling 2 (3 pts), ternaries 1 (nesting depth added 11). Of this number, 28 points are the body's own statements and 17 belong to 6 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.
automatic-playlist-import.importAutomaticPlaylists (cognitive 45) js/library/playlists/automatic-playlist-import.js:47— automatic-playlist-import.importAutomaticPlaylists has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 8, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PagedPlaylistService.#exportEntries (cognitive 45) js/library/playlists/paged-playlist-service.js:278— PagedPlaylistService.#exportEntries has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (30 pts), ternaries 2 (8 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sync-ops.validateOps (cognitive 45) js/remote/sync-ops.mjs:65— sync-ops.validateOps has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 10, match/switch 1 (2 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
script-compiler.tokenize (cognitive 45) js/sfz/script-compiler.js:62— script-compiler.tokenize has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 3 (7 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChannelDividerPlugin.setParameters (cognitive 45) plugins/basics/channel_divider.js:496— ChannelDividerPlugin.setParameters has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 9 (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.
MultibandCompressorPlugin.setParameters (cognitive 45) plugins/dynamics/multiband_compressor.js:1041— MultibandCompressorPlugin.setParameters has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (45 pts) (nesting depth added 21). Of this number, 25 points are the body's own statements and 20 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.
MultibandExpanderPlugin.setParameters (cognitive 45) plugins/dynamics/multiband_expander.js:908— MultibandExpanderPlugin.setParameters has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (45 pts) (nesting depth added 21). Of this number, 25 points are the body's own statements and 20 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.
MeasurementCapture.command (cognitive 45) android/app/src/main/java/com/frieve/effetune/MeasurementCapture.java:40— MeasurementCapture.command has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 10, loops 1 (2 pts), match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
processMidiTransport (cognitive 45) REDACTED:8076— processMidiTransport has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 10, error handling 2 (3 pts), loops 2 (3 pts), other 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
playLibraryContext (cognitive 45) js/network-music/view.js:516— playLibraryContext has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 9, ternaries 4 (7 pts), loops 2 (3 pts) (nesting depth added 18). Most of this is not in the body itself: 1 of the 45 points is its own statement and the rest belongs to one function literal inside it that branches (line 518). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
handleWorkerMessage (cognitive 45) js/ui/audio-player/rolling-pcm-transport.js:597— handleWorkerMessage has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 14, ternaries 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
showDownloadLink (cognitive 45) js/ui/pipeline/file-processor.js:885— showDownloadLink has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 11 (21 pts), if/else 8 (12 pts), error handling 3 (8 pts), boolean chains 4 (nesting depth added 19). Of this number, 24 points are the body's own statements and 21 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawGraph (cognitive 45) plugins/eq/narrow_range.js:530— drawGraph has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 12, other 5, ternaries 4 (5 pts), loops 1 (nesting depth added 6). Of this number, 21 points are the body's own statements and 24 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DragDropManager.findPotentialInsertionTarget (cognitive 44) js/ui/plugin-list/drag-drop-manager.js:54— DragDropManager.findPotentialInsertionTarget has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 3 (8 pts), boolean chains 5 (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.
flac-stream.subframe (cognitive 44) js/sfz/flac-stream.js:92— flac-stream.subframe has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 6 (14 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginProcessor.reconcileVisualizerInstances (cognitive 44) REDACTED:4818— PluginProcessor.reconcileVisualizerInstances has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 5 (16 pts), boolean chains 6, loops 3 (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.
SubSynthPlugin.setParameters (cognitive 44) plugins/saturation/sub_synth.js:271— SubSynthPlugin.setParameters has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (25 pts), ternaries 8 (16 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioService.onCreate (cognitive 44) android/app/src/main/java/com/frieve/effetune/AudioService.java:151— AudioService.onCreate has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (28 pts), error handling 6 (7 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_applyDecision (cognitive 44) js/audio/power-policy-controller.js:1237— _applyDecision has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 17, error handling 1 (3 pts), ternaries 1 (nesting depth added 9). Of this number, 43 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resolveImportedPlaylistTrack (cognitive 44) js/library/repository/web-sqlite-runtime.js:1995— resolveImportedPlaylistTrack has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 8, other 2, ternaries 1 (nesting depth added 15). Of this number, 42 points are the body's own statements and 2 belong to 7 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.
semantics.fromPlainEffect (cognitive 43) dsp/bindings/js/src/semantics.js:66— semantics.fromPlainEffect has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 5 (7 pts), error handling 4 (5 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
text-encoding.scoreDecodedText (cognitive 43) js/library/metadata/text-encoding.js:396— text-encoding.scoreDecodedText has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 6, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
measurement-model.averageResponses (cognitive 43) features/measurement/measurement-model.js:63— measurement-model.averageResponses has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 5 (12 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 23). Of this number, 41 points are the body's own statements and 2 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.
midi-offline.prepareOfflineMidiSession (cognitive 43) js/audio/midi-offline.js:20— midi-offline.prepareOfflineMidiSession has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 6 (15 pts), boolean chains 7, loops 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.
drawHud (cognitive 43) plugins/lofi/am_radio_simulator.js:2256— drawHud has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 11 (14 pts), other 13, if/else 10, boolean chains 6 (nesting depth added 3). Of this number, 29 points are the body's own statements and 14 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
receiveOperation (cognitive 43) electron/library-catalog-worker.cjs:1687— receiveOperation has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 7 (9 pts), boolean chains 7, other 4, error handling 2, loops 1 (nesting depth added 7). Of this number, 31 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
statement (cognitive 43) js/sfz/script-compiler.js:153— statement has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 4 (13 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parse (cognitive 43) js/sfz/script-compiler.js:205— parse has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 3 (10 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 26). Of this number, 37 points are the body's own statements and 6 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.
showTrackProperties (cognitive 43) js/ui/library/library-view-menus.js:419— showTrackProperties has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 12, ternaries 8 (10 pts), other 4, error handling 1 (2 pts) (nesting depth added 9). Of this number, 38 points are the body's own statements and 5 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
visualizer-counter.counterFrame (cognitive 42) js/visualizer/visualizer-counter.js:7— visualizer-counter.counterFrame has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 15 (27 pts), if/else 8 (9 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 14). Of this number, 27 points are the body's own statements and 15 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.
AndroidAudioManager.hydratePipeline (cognitive 42) js/android/audio-manager.js:78— AndroidAudioManager.hydratePipeline has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (14 pts), loops 4 (6 pts), ternaries 2 (nesting depth added 7). Of this number, 26 points are the body's own statements and 16 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
remote-client.startRemoteClient (cognitive 42) js/remote/remote-client.js:126— remote-client.startRemoteClient has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 7 (9 pts), boolean chains 8, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 13 of the 42 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 358, a function literal at line 385, a function literal at line 130, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
flac-stream.readFlacMetadata (cognitive 42) js/sfz/flac-stream.js:160— flac-stream.readFlacMetadata has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 9, loops 3 (8 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.
_applyWorkletState (cognitive 42) js/audio/power-policy-controller.js:1674— _applyWorkletState has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 7 (11 pts), boolean chains 9, error handling 2 (6 pts), other 4 (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.
render (cognitive 42) js/visualizer/visualizer-editor.js:548— render has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 11, loops 4 (5 pts), ternaries 3 (4 pts), other 1 (nesting depth added 5). Of this number, 32 points are the body's own statements and 10 belong to 22 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.
PipelineRoutingDialog.updateBusInfo (cognitive 41) js/ui/pipeline/pipeline-routing-dialog.js:305— PipelineRoutingDialog.updateBusInfo has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (23 pts), ternaries 3 (9 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
musicxml-parser.xmlDocument (cognitive 41) js/midi/musicxml-parser.js:36— musicxml-parser.xmlDocument has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
keyboard-shortcut-handler.handlePipelineKeyboardShortcut (cognitive 41) js/ui/pipeline/keyboard-shortcut-handler.js:20— keyboard-shortcut-handler.handlePipelineKeyboardShortcut has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 10, ternaries 3 (4 pts) (nesting depth added 10). Of this number, 35 points are the body's own statements and 6 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.
riff-info.parsePcmWaveFormatFromBytes (cognitive 41) js/library/metadata/riff-info.js:86— riff-info.parsePcmWaveFormatFromBytes has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 13, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
brand-animation.startBrandAnimation (cognitive 41) js/ui/brand-animation.js:52— brand-animation.startBrandAnimation has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 7 (12 pts), loops 9 (11 pts), boolean chains 4 (nesting depth added 9). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to 10 function items inside it that branch (drawWaveform, drawEqCurve, drawParticles, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AudioService.handleNativeMusic (cognitive 41) android/app/src/main/java/com/frieve/effetune/AudioService.java:1113— AudioService.handleNativeMusic has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (31 pts), error handling 2 (3 pts), ternaries 1 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_mixFrequencyPreview (cognitive 41) REDACTED:8246— _mixFrequencyPreview has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 4 (10 pts), loops 4 (7 pts), boolean chains 4 (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.
reorderPlaylistItem (cognitive 41) js/library/repository/catalog-runtime-core.js:2695— reorderPlaylistItem has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 10 (16 pts), boolean chains 6, other 2 (nesting depth added 9). Of this number, 36 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
onStageKeyDown (cognitive 41) js/visualizer/visualizer-editor.js:1755— onStageKeyDown has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 15, ternaries 1 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderAnalysisGraph (cognitive 41) js/pipeline-analyzer/ui.js:1522— renderAnalysisGraph has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 9 (19 pts), boolean chains 15, if/else 5 (6 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
onMessage (cognitive 41) electron/remote-control-host.cjs:1050— onMessage has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 11 (17 pts), boolean chains 11, if/else 10 (11 pts), error handling 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.
readBoundedResponse (cognitive 41) dsp/bindings/js/src/assets.js:64— readBoundedResponse has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, ternaries 3 (8 pts), loops 2 (4 pts), other 3, error handling 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.
parser.parseSf2 (cognitive 40) js/sf2/parser.js:17— parser.parseSf2 has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 10, loops 5 (6 pts), ternaries 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.
lyrics.parseLrc (cognitive 40) js/library/metadata/lyrics.js:32— lyrics.parseLrc has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (9 pts), ternaries 3 (6 pts), boolean chains 4 (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.
AudioContextManager.initAudioContext (cognitive 40) js/audio/audio-context-manager.js:128— AudioContextManager.initAudioContext has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 13, ternaries 4 (11 pts), error handling 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.
PluginBase.layoutMarkerLabels (cognitive 40) REDACTED:1937— PluginBase.layoutMarkerLabels has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 8 (14 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 18). Of this number, 38 points are the body's own statements and 2 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.
Bundle._validate_entry (cognitive 40) dsp/bindings/python/src/effetune/bundle.py:250— Bundle._validate_entry has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 13, loops 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.
applyTransitionGain (cognitive 40) REDACTED:8177— applyTransitionGain has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 5 (10 pts), boolean chains 3, other 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
palette (cognitive 40) js/visualizer/visualizer-editor.js:1246— palette has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 7 (11 pts), boolean chains 6, other 4, loops 1 (2 pts) (nesting depth added 11). Of this number, 29 points are the body's own statements and 11 belong to 27 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
receiveOperation (cognitive 40) js/library/repository/web-sqlite-runtime.js:1745— receiveOperation has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 7 (9 pts), boolean chains 7, other 4, error handling 1, loops 1 (nesting depth added 6). Of this number, 27 points are the body's own statements and 13 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
drawHud (cognitive 40) plugins/lofi/tv_audio_simulator.js:1939— drawHud has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 10 (12 pts), other 10, loops 4, boolean chains 2 (nesting depth added 5). Of this number, 38 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
createWindow (cognitive 40) electron/main.js:570— createWindow has cognitive complexity 40 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 11, error handling 2 (nesting depth added 3). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 29 function items inside it that branch (finalizeClose, a function literal at line 856, a function literal at line 690, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
getPlayerState (cognitive 40) electron/network-music-host.cjs:283— getPlayerState has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 16, if/else 7, ternaries 3 (6 pts), error handling 2 (5 pts), loops 3 (4 pts), other 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawGraphs (cognitive 40) plugins/dynamics/multiband_transient.js:766— drawGraphs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (8 pts), loops 4 (7 pts), boolean chains 6, other 5 (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.
_loadBank (cognitive 40) plugins/sfz-instrument.js:134— _loadBank has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 5, other 3, loops 1 (2 pts), error handling 1 (nesting depth added 15). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 157, (anonymous)::isCurrent, (anonymous)::current, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
stepLevels (cognitive 40) js/visualizer/visualizer-guitar.js:167— stepLevels has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (12 pts), boolean chains 6, ternaries 4 (nesting depth added 17). Of this number, 37 points are the body's own statements and 3 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
archive.openArchive (cognitive 39) js/user-data-backup/archive.js:204— archive.openArchive has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 9, loops 4 (5 pts), ternaries 3 (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.
VisualizerSources.setLayout (cognitive 39) js/visualizer/visualizer-sources.js:139— VisualizerSources.setLayout has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 7, boolean chains 6, ternaries 1 (2 pts) (nesting depth added 14). Of this number, 36 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioManager.registerPipelineProcessors (cognitive 39) js/audio-manager.js:2972— AudioManager.registerPipelineProcessors has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 3 (7 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analysis-worker.measurePeriodic (cognitive 39) js/pipeline-analyzer/analysis-worker.js:515— analysis-worker.measurePeriodic has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 6 (9 pts), ternaries 6 (8 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.
pipeline-apply.applyOpsToPipeline (cognitive 39) js/remote/pipeline-apply.js:99— pipeline-apply.applyOpsToPipeline has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 6, loops 2 (3 pts), match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 2 of the 39 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 135, a function literal at line 114, release). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ogg-vorbis.readOggVorbisMetadata (cognitive 39) js/sf2/ogg-vorbis.js:72— ogg-vorbis.readOggVorbisMetadata has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 8, loops 5 (7 pts), error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DigitalErrorEmulatorPlugin.setParameters (cognitive 39) plugins/lofi/digital_error_emulator.js:940— DigitalErrorEmulatorPlugin.setParameters has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 4 (14 pts), boolean chains 2 (nesting depth added 19). Of this number, 35 points are the body's own statements and 4 belong to one function item inside it that branches. 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.
embed_models.read_model (cognitive 39) dsp/plugins/analyzer/tree_models/embed_models.py:58— embed_models.read_model has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 10, loops 3, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
handleSfzSampleStreamControl (cognitive 39) REDACTED:5695— handleSfzSampleStreamControl has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 13, ternaries 2 (5 pts), error handling 1, other 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.
openWebPlaybackSelection (cognitive 39) js/ui-manager.js:1775— openWebPlaybackSelection has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 11, other 10, ternaries 3 (4 pts), error handling 1 (nesting depth added 3). Of this number, 31 points are the body's own statements and 8 belong to 10 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.
setParameters (cognitive 39) plugins/analyzer/note_spectrogram.js:337— setParameters has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 9, loops 1 (2 pts), other 2, ternaries 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
_draw (cognitive 39) plugins/spectrum-overlay.js:367— _draw has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (23 pts), ternaries 4 (6 pts), other 5, boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-engine.createGraphEngineSession (cognitive 38) dsp/bindings/js/src/graph-engine.js:291— graph-engine.createGraphEngineSession has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (28 pts), error handling 2 (4 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 17). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parser.instrumentPresentation (cognitive 38) js/sfz/parser.js:187— parser.instrumentPresentation has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (20 pts), ternaries 4 (9 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser-preload.installVirtualMidi::parseMessages (cognitive 38) electron/browser-preload.js:31— browser-preload.installVirtualMidi::parseMessages has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser-preload.installMediaWatcher (cognitive 38) electron/browser-preload.js:237— browser-preload.installMediaWatcher has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 19, if/else 14 (15 pts), ternaries 2, error handling 1, loops 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 38 points are its own statements and the rest belongs to 7 function items inside it that branch (snapshot, update, onMediaEvent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PlaybackManager.#playNext (cognitive 38) js/ui/audio-player/playback-manager.js:1888— PlaybackManager.#playNext has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 10, ternaries 2, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LazyArtworkService.#extract (cognitive 38) js/library/artwork/lazy-artwork-service.js:104— LazyArtworkService.#extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 4, error handling 2 (3 pts), ternaries 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.
MidiControllerManager.onMidiMessage (cognitive 38) js/midi/midi-controller-manager.js:338— MidiControllerManager.onMidiMessage has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 7 (19 pts), if/else 9 (12 pts), boolean chains 7 (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.
streamed-bank.prepareStreamedSfzBank::build (cognitive 38) js/sfz/streamed-bank.js:71— streamed-bank.prepareStreamedSfzBank::build has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 5 (10 pts), ternaries 4, boolean chains 3 (nesting depth added 11). 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.
EarphoneCableSimPlugin.setParameters (cognitive 38) plugins/eq/earphone_cable_sim.js:492— EarphoneCableSimPlugin.setParameters has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (36 pts), loops 1, ternaries 1 (nesting depth added 15). Of this number, 37 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PhaseSelectEqPlugin._logicalHandlePoint (cognitive 38) plugins/spatial/phase_select_eq.js:1224— PhaseSelectEqPlugin._logicalHandlePoint has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 10 (33 pts), if/else 4 (5 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.
updateNetworkRoute (cognitive 38) REDACTED:3327— updateNetworkRoute has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 6 (8 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
applyStreamBoundary (cognitive 38) REDACTED:3831— applyStreamBoundary has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 3, loops 2, other 2, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
effects (cognitive 38) js/visualizer/visualizer-editor.js:1334— effects has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 4 (8 pts), boolean chains 7, other 3, ternaries 1 (2 pts) (nesting depth added 10). None of this is in the body itself: all 38 points belong to 30 function items inside it that branch (a function literal at line 1347, a function literal at line 1371, (anonymous)::addParameters, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
handleTimbreTelemetry (cognitive 38) plugins/analyzer/note_spectrogram.js:640— handleTimbreTelemetry has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_prepareAndStage (cognitive 38) plugins/reverb/ir_reverb.js:407— _prepareAndStage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 11). Of this number, 37 points are the body's own statements and 1 belongs to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setParameters (cognitive 38) plugins/basics/multi_channel_panel.js:274— setParameters has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 7 (16 pts), loops 3, 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.
#validateAndAcceptCueSheets (cognitive 38) js/library/scan/bounded-scan-service.js:476— #validateAndAcceptCueSheets has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 3 (10 pts), loops 6 (8 pts), error handling 1 (3 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.
GuitarFretboardDisplay.solveChordShape (cognitive 37) js/visualizer/visualizer-guitar.js:289— GuitarFretboardDisplay.solveChordShape has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 3 (7 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 17). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 3 function items inside it that branch (search, a function literal at line 303, a function literal at line 319). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
OfflineProcessor.tryProcessOfflineDspPipeline (cognitive 37) js/audio/offline-processor.js:852— OfflineProcessor.tryProcessOfflineDspPipeline has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 6, loops 2, error handling 1 (nesting depth added 13). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioManager._applyParallelRouting (cognitive 37) js/audio-manager.js:4415— AudioManager._applyParallelRouting has cognitive complexity 37 (threshold 15). Drivers by points: error handling 13 (21 pts), if/else 9 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resample.resampleWindowedSinc (cognitive 37) js/utils/measurement-dsp/resample.js:61— resample.resampleWindowedSinc has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 6 (11 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup.runSetup (cognitive 37) mcp/src/setup.mjs:104— setup.runSetup has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 8, loops 2 (3 pts), error handling 2, ternaries 1 (nesting depth added 12). Of this number, 36 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Handler.channelRead0 (cognitive 37) android/app/src/main/java/com/frieve/effetune/RemoteControlServer.java:108— Handler.channelRead0 has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 6, ternaries 2 (5 pts), error handling 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.
telemetry._decode_oscilloscope (cognitive 37) dsp/bindings/python/src/effetune/telemetry.py:401— telemetry._decode_oscilloscope has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_handleParallelDspReady (cognitive 37) js/audio-manager.js:1779— _handleParallelDspReady has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (3 pts), other 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.
drawGraph (cognitive 37) plugins/spatial/phase_select_eq.js:1584— drawGraph has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 6 (9 pts), other 9, ternaries 4 (8 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initializeApp (cognitive 37) electron/main.js:1318— initializeApp has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 10, ternaries 4, error handling 2 (nesting depth added 2). Most of this is not in the body itself: 15 of the 37 points are its own statements and the rest belongs to 37 function items inside it that branch (approvePairing, getCatalog, getDesktopPowerStatus, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_renderStatus (cognitive 37) plugins/others/soundfont_player.js:327— _renderStatus has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 20, ternaries 9, if/else 5 (7 pts), other 1 (nesting depth added 2). Of this number, 33 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
expression (cognitive 37) js/sfz/script-compiler.js:106— expression has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 5 (13 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createSpectrumSmoother (cognitive 37) js/visualizer/visualizer-analyzer-display.js:65— createSpectrumSmoother has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 10 (24 pts), loops 6 (9 pts), if/else 3, boolean chains 1 (nesting depth added 17). None of this is in the body itself: all 37 points belong to one function literal inside it that branches (line 67). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
resolveChainAssets (cognitive 37) dsp/bindings/js/src/assets.js:516— resolveChainAssets has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 4 (8 pts), other 3, boolean chains 2 (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.
_startSfzSampleStream (cognitive 37) js/audio/audio-manager-sfz-runtime.js:398— _startSfzSampleStream has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 11, error handling 3 (4 pts), other 3, loops 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 21 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MusicServer.control (cognitive 36) REDACTED:160— MusicServer.control has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 6 (11 pts), boolean chains 8, error handling 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.
library-shared-query.querySharedLibrary (cognitive 36) electron/library-shared-query.cjs:22— library-shared-query.querySharedLibrary has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 9, ternaries 5 (6 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ir-plugin-contract.resolveIrProcessingConfig (cognitive 36) js/ir-library/ir-plugin-contract.js:106— ir-plugin-contract.resolveIrProcessingConfig has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 6, ternaries 4 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
web-cue-source-resolver.resolveWebCueSiblingFiles (cognitive 36) js/ui/web-cue-source-resolver.js:11— web-cue-source-resolver.resolveWebCueSiblingFiles has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (6 pts), error handling 2 (5 pts), loops 3 (5 pts), boolean chains 4 (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.
PipelineAnalyzerUI.renderCursorReadout (cognitive 36) js/pipeline-analyzer/ui.js:1304— PipelineAnalyzerUI.renderCursorReadout has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 3 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SfzSamplePageProvider.prepare (cognitive 36) js/sfz/sample-page-provider.js:69— SfzSamplePageProvider.prepare has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 9, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
script-compiler.compileSfzScript (cognitive 36) js/sfz/script-compiler.js:276— script-compiler.compileSfzScript has cognitive complexity 36 (threshold 15). Drivers by points: if/else 171 (306 pts), ternaries 44 (95 pts), boolean chains 93, loops 28 (47 pts) (nesting depth added 205). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (script-compiler.compileSfzScript::literal, script-compiler.compileSfzScript::staticCoefficient, script-compiler.compileSfzScript::collect, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
playBufferSource (cognitive 36) js/ui/audio-player/audio-context-manager.js:2772— playBufferSource has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 13, error handling 1, ternaries 1 (nesting depth added 8). Of this number, 27 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getSnapshot (cognitive 36) js/audio/power-policy-controller.js:3503— getSnapshot has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 13 (17 pts), boolean chains 11, other 5, if/else 3 (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.
_designAndStage (cognitive 36) plugins/eq/room_eq.js:1829— _designAndStage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 15, error handling 1, ternaries 1 (nesting depth added 3). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
onTrackEnded (cognitive 36) js/ui/audio-player/playback-manager.js:2106— onTrackEnded has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 4 (12 pts), boolean chains 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setupEventListeners (cognitive 36) js/app.js:1360— setupEventListeners has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (23 pts), error handling 5 (8 pts), boolean chains 5 (nesting depth added 8). Most of this is not in the body itself: 5 of the 36 points are its own statements and the rest belongs to 18 function items inside it that branch (resumeAudioFromInteraction, handleDocumentLifecycle, a function literal at line 1362, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
browse (cognitive 36) electron/network-music-host.cjs:208— browse has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 4 (9 pts), boolean chains 6, loops 1 (2 pts), other 1 (nesting depth added 13). Of this number, 30 points are the body's own statements and 6 belong to 5 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.
reselectStaleSelection (cognitive 36) js/ui/library/paged-view-controller.js:965— reselectStaleSelection has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (8 pts), boolean chains 5, other 5, ternaries 2 (4 pts), error handling 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.
createBrowserController.guardPage (cognitive 36) electron/browser-controller.cjs:542— createBrowserController.guardPage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 15, error handling 1 (3 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 579, a function literal at line 557, guardNavigation, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
prepare (cognitive 36) js/sfz/service.js:459— prepare has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 5, ternaries 3 (5 pts), error handling 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setParameters (cognitive 36) plugins/eq/loudness_equalizer.js:297— setParameters has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 14 (28 pts), if/else 8 (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.
PluginPresetDialog.renderContent (cognitive 35) js/ui/pipeline/plugin-preset-dialog.js:332— PluginPresetDialog.renderContent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 4 (8 pts), boolean chains 5 (nesting depth added 13). Of this number, 29 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.
PresetManager.addPresetToPipeline (cognitive 35) js/preset-manager.js:78— PresetManager.addPresetToPipeline has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (22 pts), error handling 4 (6 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PresetManager.addUserPresetToPipeline (cognitive 35) js/ui/plugin-list/preset-manager.js:382— PresetManager.addUserPresetToPipeline has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 12, if/else 11 (12 pts), error handling 4 (6 pts), ternaries 3 (4 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MidiInputState.hydration (cognitive 35) js/midi/smf-timeline.js:160— MidiInputState.hydration has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (8 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VisualizerSources._receive (cognitive 35) js/visualizer/visualizer-sources.js:264— VisualizerSources._receive has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 9, loops 5 (9 pts), ternaries 1 (3 pts) (nesting depth added 11). Of this number, 34 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pipeline-snapshot.collectProcessingSnapshot (cognitive 35) js/pipeline-analyzer/pipeline-snapshot.js:261— pipeline-snapshot.collectProcessingSnapshot has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9, loops 4 (5 pts), ternaries 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
design-core.designFIRCrossover (cognitive 35) js/fir-crossover/design-core.js:166— design-core.designFIRCrossover has cognitive complexity 35 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 9 (12 pts), ternaries 3 (5 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
3.run (cognitive 35) android/app/src/main/java/com/frieve/effetune/AudioService.java:1331— 3.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 8, ternaries 2 (6 pts), error handling 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setupBufferMonitoring (cognitive 35) js/ui/audio-player/audio-context-manager.js:3597— setupBufferMonitoring has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 5, other 1 (nesting depth added 15). None of this is in the body itself: all 35 points belong to one function literal inside it that branches (line 3601). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
prepareTrackTransitionRequest (cognitive 35) js/ui/audio-player/audio-context-manager.js:5229— prepareTrackTransitionRequest has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 7, other 7, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
handleTelemetry (cognitive 35) plugins/analyzer/rhythm_analyzer.js:588— handleTelemetry has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 16, if/else 13 (15 pts), ternaries 2, loops 1, other 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
updateControlsState (cognitive 35) js/ui/audio-player/audio-player-ui.js:277— updateControlsState has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), ternaries 4 (8 pts), other 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawGraph (cognitive 35) plugins/analyzer/spectrum_analyzer.js:900— drawGraph has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (18 pts), other 7, ternaries 5 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
analogMeterScale (cognitive 35) plugins/analyzer/analog_meter.js:93— analogMeterScale has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 14 (24 pts), if/else 8, boolean chains 2, other 1 (nesting depth added 10). Of this number, 25 points are the body's own statements and 10 belong to 21 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evaluateRollingEligibility (cognitive 35) REDACTED:385— evaluateRollingEligibility has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22, boolean chains 10, other 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
addBusInfo (cognitive 35) js/ui/pipeline/pipeline-item-builder.js:324— addBusInfo has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 3 (8 pts), boolean chains 6 (nesting depth added 12). Of this number, 32 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dispatchSidecarAction (cognitive 35) electron/openhome-control-host.cjs:397— dispatchSidecarAction has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 6 (10 pts), boolean chains 7, error handling 3 (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.
showAudioConfigDialog (cognitive 35) js/electron/audioIntegration.js:186— showAudioConfigDialog has cognitive complexity 35 (threshold 15). Drivers by points: if/else 41 (55 pts), boolean chains 31, ternaries 17 (20 pts), error handling 4 (7 pts) (nesting depth added 20). 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.
browser-controller.createBrowserController.guardPage (cognitive 34) electron/browser-controller.cjs:542— browser-controller.createBrowserController.guardPage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 16, loops 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 579, a function literal at line 557, a function literal at line 572, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
LocalOpenHomePlayer.invoke (cognitive 34) REDACTED:46— LocalOpenHomePlayer.invoke has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 10 (14 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
archive.inspectZip (cognitive 34) js/user-data-backup/archive.js:29— archive.inspectZip has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 14, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserDataBackupService.planRestore (cognitive 34) js/user-data-backup/service.js:122— UserDataBackupService.planRestore has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, ternaries 3 (6 pts), loops 4 (5 pts) (nesting depth added 12). Of this number, 27 points are the body's own statements and 7 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.
AndroidPlayerContext.resolveNativeSource (cognitive 34) js/android/player-context.js:110— AndroidPlayerContext.resolveNativeSource has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 7, ternaries 3 (4 pts), loops 1 (2 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.
catalog-runtime-core.normalizeContextQuery (cognitive 34) js/library/repository/catalog-runtime-core.js:627— catalog-runtime-core.normalizeContextQuery has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 13 (18 pts), boolean chains 10, if/else 6 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
dsd-speed-decoder.createDsdSpeedDecoder.synthesizeHop (cognitive 34) js/audio/dsd/dsd-speed-decoder.js:92— dsd-speed-decoder.createDsdSpeedDecoder.synthesizeHop has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4 (11 pts), ternaries 4 (8 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.
RemoteSession.onMessage (cognitive 34) js/remote/remote-session.js:185— RemoteSession.onMessage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 5, error handling 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.
NoteSpectrogramPlugin.flushTimbreHistory (cognitive 34) plugins/analyzer/note_spectrogram.js:703— NoteSpectrogramPlugin.flushTimbreHistory has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 6 (9 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
python_golden_runner.main (cognitive 34) dsp/bindings/acceptance/python_golden_runner.py:1081— python_golden_runner.main has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 5 (8 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
applySoundFontMixerAction (cognitive 34) REDACTED:7766— applySoundFontMixerAction has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 4 (10 pts), boolean chains 9, other 3, error handling 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.
captureSfzRuntimeCheckpoints (cognitive 34) REDACTED:7884— captureSfzRuntimeCheckpoints has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 10, other 2, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setupEventHandlers (cognitive 34) js/ui/audio-player/audio-context-manager.js:2486— setupEventHandlers has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23 (26 pts), boolean chains 6, other 2 (nesting depth added 3). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 8 function items inside it that branch (ended, error, timeupdate, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
consensusLowPhaseCorrection (cognitive 34) js/room-eq/design-core.js:1201— consensusLowPhaseCorrection has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 4 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 15). Of this number, 33 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.
executeAction (cognitive 34) js/ui/audio-player/openhome-playback-adapter.js:415— executeAction has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 12, match/switch 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
computeTonalBalanceEqView (cognitive 34) plugins/eq/tonal_balance_eq.js:182— computeTonalBalanceEqView has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 7 (11 pts), loops 4, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
applyEnabledTransition (cognitive 34) electron/openhome-control-host.cjs:203— applyEnabledTransition has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_evaluateSignedExternalAssetRequest (cognitive 34) js/audio/audio-manager-wasm-assets.js:621— _evaluateSignedExternalAssetRequest has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 7, loops 2 (3 pts), ternaries 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.
validateStatePreparation (cognitive 34) js/audio/power-snapshot.js:740— validateStatePreparation has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 18, if/else 12 (16 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
parser.validateExtraOpcode (cognitive 33) js/sfz/parser.js:33— parser.validateExtraOpcode has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UIEventHandler.setupDragEvents (cognitive 33) js/ui/pipeline/ui-event-handler.js:640— UIEventHandler.setupDragEvents has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 5 (nesting depth added 7). Most of this is not in the body itself: 2 of the 33 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 718, 672, 780, …). 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.
portable.references (cognitive 33) js/user-data-backup/portable.js:45— portable.references has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 4 (9 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 14). Of this number, 24 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
transitionToNextTrack (cognitive 33) js/ui/audio-player/audio-context-manager.js:5148— transitionToNextTrack has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 11, error handling 1, other 1, ternaries 1 (nesting depth added 5). Of this number, 30 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setParameters (cognitive 33) plugins/analyzer/rhythm_analyzer.js:271— setParameters has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 10, ternaries 1 (3 pts), loops 1 (nesting depth added 5). Of this number, 30 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
preparePlannedAutomaticMove (cognitive 33) js/ui/audio-player/playback-manager.js:388— preparePlannedAutomaticMove has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (18 pts), other 9, boolean chains 4, error handling 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createResolvedSequenceTrack (cognitive 33) js/ui/audio-player/playback-manager.js:2864— createResolvedSequenceTrack has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), other 8, boolean chains 6, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
render (cognitive 33) js/network-music/view.js:205— render has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 10, ternaries 2, other 1 (nesting depth added 8). Of this number, 32 points are the body's own statements and 1 belongs 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.
validateLayout (cognitive 33) js/visualizer/visualizer-model.js:704— validateLayout has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 13, ternaries 3 (5 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 6 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 733, same, a function literal at line 714, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
prepareConfigScreen (cognitive 33) features/measurement/ui/ui-manager.js:456— prepareConfigScreen has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 3 (12 pts), boolean chains 8, if/else 6 (8 pts), loops 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
remote-control-host.pickLanAddress (cognitive 32) electron/remote-control-host.cjs:140— remote-control-host.pickLanAddress has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 7, loops 2 (3 pts), ternaries 2 (nesting depth added 13). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UIEventHandler.setupPipelineDropZoneEvents (cognitive 32) js/ui/pipeline/ui-event-handler.js:1090— UIEventHandler.setupPipelineDropZoneEvents has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 9 (nesting depth added 5). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 1166, 1099, 1146, …). 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.
devices.startMicrophoneInput (cognitive 32) features/measurement/audio-utils/devices.js:47— devices.startMicrophoneInput has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 8, ternaries 3 (4 pts), error handling 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MeasurementDisplay.buildMeasurementDetailRows (cognitive 32) features/measurement/ui/measurement-display.js:312— MeasurementDisplay.buildMeasurementDetailRows has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, ternaries 8 (11 pts), loops 2 (4 pts), if/else 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.
app.loadPEQSettings (cognitive 32) features/measurement/app.js:750— app.loadPEQSettings has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidAssets.transfer (cognitive 32) js/android/assets.js:69— AndroidAssets.transfer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (8 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 16). Of this number, 28 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalInputSources.pollGamepads (cognitive 32) js/midi/local-input-sources.js:188— LocalInputSources.pollGamepads has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 10, ternaries 1 (4 pts), loops 1 (nesting depth added 11). Most of this is not in the body itself: 11 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 225, 204, 227, …). 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.
_syncControlsFromState (cognitive 32) plugins/saturation/tube_simulator.js:6195— _syncControlsFromState has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 5 (12 pts), loops 3 (7 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prepareTemporalStateAndResume (cognitive 32) REDACTED:4448— prepareTemporalStateAndResume has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (9 pts), ternaries 5, other 4 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
parseTelemetryFrame (cognitive 32) plugins/analyzer/note_spectrogram.js:832— parseTelemetryFrame has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 10, loops 4 (5 pts), other 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.
_paintVolumeFrame (cognitive 32) plugins/analyzer/note_spectrogram.js:1723— _paintVolumeFrame has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 4 (5 pts), ternaries 3 (5 pts), boolean chains 2, other 1 (nesting depth added 11). Of this number, 18 points are the body's own statements and 14 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.
#selectSequenceOrdinal (cognitive 32) js/ui/audio-player/playback-manager.js:687— #selectSequenceOrdinal has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 6 (8 pts), other 4, boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resolveImportedPlaylistTrack (cognitive 32) electron/library-catalog-worker.cjs:1929— resolveImportedPlaylistTrack has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 7, other 2, ternaries 1 (nesting depth added 8). Of this number, 30 points are the body's own statements and 2 belong to 7 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.
_drawPhaseMapGrid (cognitive 32) plugins/spatial/phase_select_eq.js:1477— _drawPhaseMapGrid has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 6 (12 pts), loops 2, other 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.
drawSpectrumBars (cognitive 32) plugins/analyzer/spectrum_analyzer.js:1341— drawSpectrumBars has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 6 (8 pts), other 5, 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.
adoptPreparedSeekCandidate (cognitive 32) js/ui/audio-player/rolling-pcm-transport.js:1064— adoptPreparedSeekCandidate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 5 (9 pts), boolean chains 7, ternaries 3, loops 2, other 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 14 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
listen (cognitive 32) electron/remote-control-host.cjs:501— listen has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (19 pts), error handling 4 (5 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 575, a function literal at line 565, handler, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
preprocess (cognitive 32) js/sfz/script-compiler.js:239— preprocess has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 242). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
drawGraph (cognitive 32) plugins/dynamics/auto_leveler.js:516— drawGraph has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 6 (8 pts), other 7, boolean chains 6, loops 3 (nesting depth added 4). Of this number, 22 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.
getSfzRuntimeCheckpoints (cognitive 32) js/audio/audio-manager-sfz-runtime.js:137— getSfzRuntimeCheckpoints has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (10 pts), loops 3 (5 pts), other 5, 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.
modulation.packSf2Modulation (cognitive 31) js/sf2/modulation.js:8— modulation.packSf2Modulation has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 5 (9 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.
IrLibraryService.importFiles (cognitive 31) js/ir-library/service.js:184— IrLibraryService.importFiles has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 3 (6 pts), boolean chains 4, loops 2 (nesting depth added 14). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lyrics.boundLyrics (cognitive 31) js/library/metadata/lyrics.js:195— lyrics.boundLyrics has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 6, loops 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LibraryView.loadPagedSearchEntitySections (cognitive 31) js/ui/library/library-view.js:1325— LibraryView.loadPagedSearchEntitySections has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 8 (11 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 10). None of this is in the body itself: all 31 points belong to 3 function literals inside it that branch (lines 1331, 1418, 1402). 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.
UIManager.updateUITexts (cognitive 31) js/ui-manager.js:1317— UIManager.updateUITexts has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28 (29 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PluginProcessor.finishDspPipelineBlock (cognitive 31) REDACTED:6659— PluginProcessor.finishDspPipelineBlock has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 6 (8 pts), boolean chains 4, ternaries 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.
python_golden_runner.generate_stimulus (cognitive 31) dsp/bindings/acceptance/python_golden_runner.py:126— python_golden_runner.generate_stimulus has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (12 pts), loops 4 (7 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appendPlaylistImportRecords (cognitive 31) js/library/repository/catalog-runtime-core.js:3286— appendPlaylistImportRecords has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, ternaries 2 (5 pts), loops 1, other 1 (nesting depth added 10). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 3294). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
probeLibraries (cognitive 31) electron/network-music-host.cjs:145— probeLibraries has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 10, ternaries 4 (9 pts), if/else 3 (7 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 11). Of this number, 29 points are the body's own statements and 2 belong to 10 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.
#stageCueSheetsAndMetadata (cognitive 31) js/library/scan/bounded-scan-service.js:371— #stageCueSheetsAndMetadata has cognitive complexity 31 (threshold 15). Drivers by points: error handling 3 (10 pts), if/else 3 (10 pts), loops 6 (8 pts), ternaries 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity· process (cognitive 31) · ×1
process (cognitive 31) plugins/analyzer/level_meter.js:248— process has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 10 (13 pts), boolean chains 2, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EffeTuneNode._handleMessage (cognitive 30) dsp/bindings/js/src/worklet.js:232— EffeTuneNode._handleMessage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 3 (9 pts), error handling 1 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
schema.canonicalSfzOpcode (cognitive 30) js/sfz/schema.js:87— schema.canonicalSfzOpcode has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (24 pts), if/else 4 (5 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.
file-handlers.processCommandLineArgs (cognitive 30) electron/file-handlers.js:178— file-handlers.processCommandLineArgs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 2 (8 pts), boolean chains 2, loops 1 (2 pts), ternaries 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.
CastSession.receive (cognitive 30) electron/cast-sender.cjs:179— CastSession.receive has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 2, error handling 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteControlHost.onPutIrChunk (cognitive 30) electron/remote-control-host.cjs:1235— RemoteControlHost.onPutIrChunk has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 5). Of this number, 29 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
bank.readSfzAudioHeader (cognitive 30) js/sfz/bank.js:12— bank.readSfzAudioHeader has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 6, loops 1 (2 pts), ternaries 2 (nesting depth added 11). Of this number, 28 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
library-shared-query.querySharedLibrary.addTracks (cognitive 30) electron/library-shared-query.cjs:39— library-shared-query.querySharedLibrary.addTracks has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 8 (11 pts), boolean chains 5 (nesting depth added 8). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HistoryManager.loadStateFromHistory (cognitive 30) js/ui/pipeline/history-manager.js:241— HistoryManager.loadStateFromHistory has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 2 (nesting depth added 12). None of this is in the body itself: all 30 points belong to 7 function literals inside it that branch (lines 242, 251, 257, …). 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.
multires-spectrum.decode (cognitive 30) plugins/multires-spectrum.js:91— multires-spectrum.decode has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 4 (6 pts), boolean chains 5, loops 3 (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.
archive.openArchive.hydrate (cognitive 30) js/user-data-backup/archive.js:296— archive.openArchive.hydrate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 6 (14 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioContextManager.loadAudioWorklet (cognitive 30) js/audio/audio-context-manager.js:328— AudioContextManager.loadAudioWorklet has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (20 pts), error handling 4 (8 pts), boolean chains 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.
ir-plugin-contract.selectedIrChannelCount (cognitive 30) js/ir-library/ir-plugin-contract.js:26— ir-plugin-contract.selectedIrChannelCount has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 11, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalysisController.controlResolution (cognitive 30) features/measurement/ui/analysis-controller.js:356— AnalysisController.controlResolution has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (16 pts), boolean chains 7, if/else 6 (7 pts) (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.
web-sqlite-runtime.createContextFilter (cognitive 30) js/library/repository/web-sqlite-runtime.js:1257— web-sqlite-runtime.createContextFilter has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 3 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dsd-decoder.readChannelBytes (cognitive 30) js/audio/dsd/dsd-decoder.js:73— dsd-decoder.readChannelBytes has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (15 pts), loops 5 (12 pts), if/else 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
service.prepareBankSource (cognitive 30) js/sfz/service.js:108— service.prepareBankSource has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (19 pts), error handling 2 (4 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 8). Of this number, 23 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChromaSpiralPlugin.drawGraph (cognitive 30) plugins/analyzer/chroma_spiral.js:301— ChromaSpiralPlugin.drawGraph has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21 (34 pts), loops 8 (18 pts), boolean chains 4 (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. This shape REPEATS in the file: one other method here (ChromaSpiralPlugin.drawGraph::drawSignal) 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.
FiveBandPEQPlugin.setParameters (cognitive 30) plugins/eq/five_band_peq.js:331— FiveBandPEQPlugin.setParameters has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
startSfzRuntime (cognitive 30) REDACTED:7987— startSfzRuntime has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (9 pts), boolean chains 6, other 3, error handling 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.
_recomputeVisualSyncDelay (cognitive 30) js/audio-manager.js:2403— _recomputeVisualSyncDelay has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 8, loops 3 (5 pts), ternaries 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dominantEnergyPosition (cognitive 30) js/room-eq/design-core.js:1426— dominantEnergyPosition has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 8 (9 pts), loops 4, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createTrackEntry (cognitive 30) js/ui/audio-player/playback-manager.js:182— createTrackEntry has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 16, if/else 5 (8 pts), ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity· process (cognitive 30) · ×1
process (cognitive 30) plugins/analyzer/spectrum_analyzer.js:472— process has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 4 (7 pts), boolean chains 6, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
playback (cognitive 30) REDACTED:440— playback has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 21, ternaries 9. Of this number, 22 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
drawSingleGraph (cognitive 30) plugins/dynamics/power_amp_sag.js:486— drawSingleGraph has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 7, other 4, loops 3 (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.
analyze (cognitive 30) plugins/spectrum-overlay.js:42— analyze has cognitive complexity 30 (threshold 15). Drivers by points: loops 11 (20 pts), ternaries 3 (7 pts), if/else 2, boolean chains 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
resolveFavoriteActionTrackUids (cognitive 30) js/ui/library/library-view-menus.js:242— resolveFavoriteActionTrackUids has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 7 (10 pts), boolean chains 6, other 3, loops 1 (nesting depth added 6). Of this number, 24 points are the body's own statements and 6 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.
telemetry.decodeMultiresHq (cognitive 29) dsp/bindings/js/src/telemetry.js:278— telemetry.decodeMultiresHq has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 5 (7 pts), boolean chains 4, loops 3 (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.
engine.createEngineSession (cognitive 29) dsp/bindings/js/src/engine.js:114— engine.createEngineSession has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (7 pts), loops 3 (6 pts), boolean chains 1, error handling 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.
serialization-utils.applySerializedState::applyState (cognitive 29) js/utils/serialization-utils.js:153— serialization-utils.applySerializedState::applyState has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (27 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
power-topology.computeGraphAmplitudeBound (cognitive 29) js/audio/power-topology.js:261— power-topology.computeGraphAmplitudeBound has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 3 (5 pts), boolean chains 4, loops 4 (nesting depth added 8). Of this number, 20 points are the body's own statements and 9 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.
analysis.analyzeBurstDecay (cognitive 29) js/utils/measurement-dsp/analysis.js:272— analysis.analyzeBurstDecay has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (8 pts), loops 3 (6 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.
portable.prepareItems::fingerprint (cognitive 29) js/user-data-backup/portable.js:203— portable.prepareItems::fingerprint has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, ternaries 2 (4 pts), error handling 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. This shape REPEATS in the file: one other method here (portable.prepareItems) 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.
AnalysisPlot.drawImpulse (cognitive 29) features/measurement/ui/analysis-plot.js:268— AnalysisPlot.drawImpulse has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (17 pts), if/else 4 (7 pts), loops 3 (4 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.
WebCatalogScanRuntime.scanFolders (cognitive 29) js/library/scan/web-scan-runtime.js:226— WebCatalogScanRuntime.scanFolders has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LibraryView.updatePagedActionToast (cognitive 29) js/ui/library/library-view.js:2576— LibraryView.updatePagedActionToast has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 17 (23 pts), boolean chains 5, if/else 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
subsonic-source.subsonicToken (cognitive 29) js/network-music/subsonic-source.js:7— subsonic-source.subsonicToken has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (24 pts), loops 3 (5 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.
SfzSampleStream.readFrames (cognitive 29) js/sfz/sample-stream.js:122— SfzSampleStream.readFrames has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, loops 4 (5 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.
NativeSfzLibraryService._readBank (cognitive 29) js/sfz/native-service.js:101— NativeSfzLibraryService._readBank has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 4, ternaries 3, loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 14 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AnalogMeterPlugin.setParameters (cognitive 29) plugins/analyzer/analog_meter.js:373— AnalogMeterPlugin.setParameters has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 6, ternaries 3 (4 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SFZNotePlayerPlugin.setParameters (cognitive 29) plugins/others/sfz_note_player.js:48— SFZNotePlayerPlugin.setParameters has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 4, loops 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compact_model.compact_model (cognitive 29) dsp/plugins/analyzer/tree_models/compact_model.py:25— compact_model.compact_model has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (8 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
publishNetworkPaths (cognitive 29) REDACTED:6223— publishNetworkPaths has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (10 pts), ternaries 2 (3 pts), loops 2, other 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createAndStartBufferSource (cognitive 29) js/ui/audio-player/audio-context-manager.js:6033— createAndStartBufferSource has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 6, ternaries 3, other 2, error handling 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 12 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_rebuildAudioGraph (cognitive 29) js/audio-manager.js:3523— _rebuildAudioGraph has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 8 (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.
#selectSequenceOrdinalOnce::mediaOperation (cognitive 29) js/ui/audio-player/playback-manager.js:818— #selectSequenceOrdinalOnce::mediaOperation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 11, other 3, ternaries 1 (2 pts), error handling 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.
processOfflineDspGraph (cognitive 29) js/audio/offline-processor.js:799— processOfflineDspGraph has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (3 pts), boolean chains 2, other 1 (nesting depth added 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
playCatalogItems (cognitive 29) js/ui/audio-player/openhome-playback-adapter.js:728— playCatalogItems has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 9, error handling 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
autoRange (cognitive 29) features/measurement/ui/analysis-controller.js:852— autoRange has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 9, if/else 5 (6 pts), loops 1 (nesting depth added 7). Of this number, 28 points are the body's own statements and 1 belongs to 7 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.
acceptFragment (cognitive 29) js/ui/audio-player/rolling-pcm-transport.js:671— acceptFragment has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, ternaries 3 (4 pts), error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
planLiveDelays (cognitive 29) electron/network-output-host.cjs:259— planLiveDelays has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 9, if/else 3 (4 pts), other 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
decodeAnalogMeter (cognitive 29) dsp/bindings/js/src/telemetry.js:542— decodeAnalogMeter has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 10, if/else 5 (7 pts), loops 1 (nesting depth added 8). Of this number, 27 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extractDidlAlbumArtUri (cognitive 29) electron/openhome-control-host.cjs:891— extractDidlAlbumArtUri has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (7 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawGraph (cognitive 29) plugins/eq/group_delay_eq.js:735— drawGraph has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, other 6, ternaries 5 (6 pts), loops 2 (nesting depth added 3). Of this number, 19 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
deriveFrequencyResponse (cognitive 29) js/pipeline-analyzer/analysis-core.js:578— deriveFrequencyResponse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 5 (6 pts), boolean chains 4, ternaries 3 (4 pts), other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_syncUI (cognitive 29) plugins/resonator/modal_resonator.js:455— _syncUI has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5, ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 12). Of this number, 28 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
runtime.validateEvents (cognitive 28) dsp/bindings/js/src/runtime.js:115— runtime.validateEvents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
modulation.packSfzModulation (cognitive 28) js/sfz/modulation.js:453— modulation.packSfzModulation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenHomeControlHost.commitMediaRegistration (cognitive 28) electron/openhome-control-host.cjs:534— OpenHomeControlHost.commitMediaRegistration has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
library-catalog-worker.browseFolderChildren (cognitive 28) electron/library-catalog-worker.cjs:1431— library-catalog-worker.browseFolderChildren has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 5 (6 pts), boolean chains 5, 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.
IrLibraryService.resolveDecodedPcm (cognitive 28) js/ir-library/service.js:297— IrLibraryService.resolveDecodedPcm has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 3 (5 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 6). Of this number, 24 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
FileProcessor.createFileDropArea (cognitive 28) js/ui/pipeline/file-processor.js:47— FileProcessor.createFileDropArea has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (16 pts), boolean chains 9, if/else 3 (nesting depth added 8). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TelemetryHub._dispatch (cognitive 28) js/audio/telemetry-hub.js:268— TelemetryHub._dispatch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 10, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiVisualizerAdapter.snapshot (cognitive 28) js/visualizer/visualizer-midi.js:60— MidiVisualizerAdapter.snapshot has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (8 pts), ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 7). Of this number, 26 points are the body's own statements and 2 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.
lyrics.lyricsFromSylt (cognitive 28) js/library/metadata/lyrics.js:89— lyrics.lyricsFromSylt has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (7 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 13). Of this number, 25 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
web-sqlite-runtime.browseFolderChildren (cognitive 28) js/library/repository/web-sqlite-runtime.js:1374— web-sqlite-runtime.browseFolderChildren has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 5 (6 pts), boolean chains 5, 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.
PluginProcessor.setNetworkOutputLocalDelay (cognitive 28) REDACTED:3429— PluginProcessor.setNetworkOutputLocalDelay has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 9 (11 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.
PluginProcessor.rebuildDspLatencyPlan (cognitive 28) REDACTED:6127— PluginProcessor.rebuildDspLatencyPlan has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 8, loops 2 (3 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginBase.createResponsiveGraph (cognitive 28) REDACTED:1736— PluginBase.createResponsiveGraph has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8, ternaries 4 (6 pts) (nesting depth added 3). Of this number, 16 points are the body's own statements and 12 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Stream._prepare_events (cognitive 28) dsp/bindings/python/src/effetune/chain.py:685— Stream._prepare_events has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 5, error handling 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.
validation._validate_scalar (cognitive 28) dsp/bindings/python/src/effetune/validation.py:171— validation._validate_scalar has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stageDspAsset (cognitive 28) REDACTED:5442— stageDspAsset has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 9, ternaries 3 (7 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.
loadFiles (cognitive 28) js/ui/audio-player/playback-manager.js:70— loadFiles has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, ternaries 3 (4 pts), other 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.
_restoreResidentSnapshot (cognitive 28) plugins/reverb/ir_reverb.js:1299— _restoreResidentSnapshot has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (14 pts), if/else 6 (8 pts), boolean chains 6 (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.
updateTimeDisplay (cognitive 28) js/ui/audio-player/audio-player-ui.js:1955— updateTimeDisplay has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, ternaries 4 (6 pts), other 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.
initAudioOutput (cognitive 28) js/audio/audio-io-manager.js:744— initAudioOutput has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 4 (9 pts), boolean chains 7, other 1 (nesting depth added 9). Of this number, 23 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updatePowerGainBound (cognitive 28) plugins/basics/bass_management.js:408— _updatePowerGainBound has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
broadcastState (cognitive 28) electron/remote-control-host.cjs:934— broadcastState has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (9 pts), boolean chains 6, 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.
frame (cognitive 28) REDACTED:704— frame has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 8 (9 pts), boolean chains 7, other 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.
startCast (cognitive 28) electron/network-output-host.cjs:741— startCast has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 2, other 1, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 744, 757, 772, …). 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.
#drainMetadata (cognitive 28) js/library/scan/bounded-scan-service.js:741— #drainMetadata has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (6 pts), other 3, 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.
drawGraph (cognitive 28) plugins/basics/fir_crossover.js:851— drawGraph has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (6 pts), loops 4 (5 pts), other 5, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PwaNetworkHost.validatePlayerTrack (cognitive 27) REDACTED:203— PwaNetworkHost.validatePlayerTrack has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, error handling 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DelayLine.process (cognitive 27) electron/network-output-host.cjs:131— DelayLine.process has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 2, loops 1, ternaries 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.
LibraryCatalogUtilityHost.handleMessage (cognitive 27) electron/library-catalog-utility-host.cjs:234— LibraryCatalogUtilityHost.handleMessage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 3 (6 pts), boolean chains 1, error handling 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.
library-catalog-utility.handleMessage (cognitive 27) electron/library-catalog-utility.cjs:33— library-catalog-utility.handleMessage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 4 (7 pts), boolean chains 5, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StandardSelectManager.handleKeyDown (cognitive 27) js/ui/standard-select.js:99— StandardSelectManager.handleKeyDown has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5, ternaries 2 (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.
PluginPresetDialog.applySearch (cognitive 27) js/ui/pipeline/plugin-preset-dialog.js:291— PluginPresetDialog.applySearch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 3, loops 2 (3 pts), ternaries 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.
power-snapshot.normalizePowerSnapshot (cognitive 27) js/audio/power-snapshot.js:613— power-snapshot.normalizePowerSnapshot has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 24 (25 pts), boolean chains 1, if/else 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
midi-offline.prepareOfflineMidiPlayback (cognitive 27) js/audio/midi-offline.js:82— midi-offline.prepareOfflineMidiPlayback has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (6 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.
cue-sheet.resolveCueSheet (cognitive 27) js/library/metadata/cue-sheet.js:120— cue-sheet.resolveCueSheet has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (6 pts), boolean chains 3, loops 3 (nesting depth added 11). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NetworkLivePcm.beginReporting::report (cognitive 27) js/ui/audio-player/network-live-pcm.js:124— NetworkLivePcm.beginReporting::report has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 6, if/else 4 (5 pts), error handling 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.
bulk-operation-protocol.validateSequenceSaveDescriptor (cognitive 27) js/library/operations/bulk-operation-protocol.js:92— bulk-operation-protocol.validateSequenceSaveDescriptor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 10, loops 3 (4 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.
result-adapter.smoothFiniteRuns (cognitive 27) js/pipeline-analyzer/result-adapter.js:158— result-adapter.smoothFiniteRuns has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (11 pts), ternaries 3 (9 pts), boolean chains 5, if/else 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.
design-core.directPhaseAnalysis (cognitive 27) js/room-eq/design-core.js:1079— design-core.directPhaseAnalysis has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 6 (8 pts), boolean chains 5, loops 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.
compiler.zones (cognitive 27) js/sf2/compiler.js:60— compiler.zones has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 11, if/else 3 (8 pts), ternaries 3 (5 pts), loops 2 (3 pts) (nesting depth added 8). Of this number, 25 points are the body's own statements and 2 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.
source.readSfzBankDefines (cognitive 27) js/sfz/source.js:33— source.readSfzBankDefines has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 9, loops 3 (7 pts), ternaries 1 (nesting depth added 10). Of this number, 23 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RhythmAnalyzerPlugin.writeTempogram (cognitive 27) plugins/analyzer/rhythm_analyzer.js:655— RhythmAnalyzerPlugin.writeTempogram has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts), ternaries 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.
PluginProcessor.nextPluginState (cognitive 27) REDACTED:6915— PluginProcessor.nextPluginState has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 5 (8 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 13). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiChannelPanelPlugin.setLink (cognitive 27) plugins/basics/multi_channel_panel.js:585— MultiChannelPanelPlugin.setLink has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SFZNotePlayerPlugin.drawGraph (cognitive 27) plugins/others/sfz_note_player.js:222— SFZNotePlayerPlugin.drawGraph has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 6, boolean chains 5, ternaries 3 (5 pts) (nesting depth added 6). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PhaseSelectEqPlugin._hitTest (cognitive 27) plugins/spatial/phase_select_eq.js:1361— PhaseSelectEqPlugin._hitTest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 8, loops 5 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetData.__post_init__ (cognitive 27) dsp/bindings/python/src/effetune/assets.py:41— AssetData.__post_init__ has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_measurePowerWithDcBlock (cognitive 27) REDACTED:7316— _measurePowerWithDcBlock has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 6 (11 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
playRollingPcm (cognitive 27) js/ui/audio-player/audio-context-manager.js:2701— playRollingPcm has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 13, if/else 10 (12 pts), error handling 1, other 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
renderPagedLibrary (cognitive 27) js/ui/library/library-view.js:1066— renderPagedLibrary has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 4 (8 pts), boolean chains 5, other 1 (nesting depth added 9). Of this number, 16 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reusePagedCommittedSearchDom (cognitive 27) js/ui/library/library-view.js:1743— reusePagedCommittedSearchDom has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), loops 3, other 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 25 points are the body's own statements and 2 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.
_drawImpulseResponse (cognitive 27) plugins/eq/room_eq.js:2996— _drawImpulseResponse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (8 pts), loops 5 (6 pts), boolean chains 4, other 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.
canResumeCurrentTrack (cognitive 27) js/ui/audio-player/playback-manager.js:1598— canResumeCurrentTrack has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 10 (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.
processCommandLineArguments (cognitive 27) js/app.js:1789— processCommandLineArguments has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, error handling 1 (4 pts) (nesting depth added 12). Of this number, 20 points are the body's own statements and 7 belong to 2 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.
captureLocalQueue (cognitive 27) js/ui/audio-player/openhome-playback-adapter.js:760— captureLocalQueue has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 7, if/else 4 (5 pts), other 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bindWithFallback (cognitive 27) electron/remote-control-host.cjs:609— bindWithFallback has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (19 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 14). Of this number, 25 points are the body's own statements and 2 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
onEditKeyDown (cognitive 27) REDACTED:273— onEditKeyDown has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (12 pts), ternaries 1 (3 pts) (nesting depth added 5). Of this number, 24 points are the body's own statements and 3 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
onWasmAssetState (cognitive 27) plugins/sfz-instrument.js:249— onWasmAssetState has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, ternaries 3 (7 pts), other 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.
_replayPipelineWasmAssets (cognitive 27) js/audio/audio-manager-wasm-assets.js:302— _replayPipelineWasmAssets has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, loops 3 (4 pts), ternaries 2, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setParameters (cognitive 27) plugins/spatial/multiband_balance.js:527— setParameters has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 4 (12 pts), boolean chains 3 (nesting depth added 10). Of this number, 18 points are the body's own statements and 9 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.
prepareSfzSamples (cognitive 27) js/sfz/service.js:181— prepareSfzSamples has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, other 4, loops 2, ternaries 2 (nesting depth added 6). Of this number, 25 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
start (cognitive 27) js/ui/audio-player/catalog-playback-bridge.js:44— start has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, other 4, error handling 1 (2 pts), ternaries 2 (nesting depth added 3). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
MusicServer.handle (cognitive 26) REDACTED:103— MusicServer.handle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 8, ternaries 3 (5 pts) (nesting depth added 4). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
NetworkOutputHost.getStatus (cognitive 26) electron/network-output-host.cjs:224— NetworkOutputHost.getStatus has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (8 pts), boolean chains 3, loops 3 (nesting depth added 8). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 247, a function literal at line 238, merge). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
library-catalog-worker.createContextFilter (cognitive 26) electron/library-catalog-worker.cjs:1317— library-catalog-worker.createContextFilter has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (24 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.
power-topology.computeRuntimePipelineGraphBound (cognitive 26) js/audio/power-topology.js:433— power-topology.computeRuntimePipelineGraphBound has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (9 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
model.createPipelineModels (cognitive 26) extension/model.js:86— model.createPipelineModels has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 5, ternaries 2 (4 pts), error handling 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.
MultiresSpectrum.constructor (cognitive 26) plugins/multires-spectrum.js:145— MultiresSpectrum.constructor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (8 pts), ternaries 4 (8 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.
playback-source-policy.choosePlaybackMode (cognitive 26) js/ui/audio-player/playback-source-policy.js:46— playback-source-policy.choosePlaybackMode has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 6, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
library-view-components.bindLibraryTrackPointer (cognitive 26) js/ui/library/library-view-components.js:194— library-view-components.bindLibraryTrackPointer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 218, a function literal at line 238, selectFromLongPress, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ir-preparation.analyze (cognitive 26) js/ir-library/ir-preparation.js:287— ir-preparation.analyze has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 5 (9 pts), ternaries 5 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release-version.comparePrerelease (cognitive 26) js/release-version.mjs:34— release-version.comparePrerelease has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (10 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compiler.compileModulators (cognitive 26) js/sf2/compiler.js:31— compiler.compileModulators has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 8, loops 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 8). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sample-integrity.createSfzSampleIntegrity (cognitive 26) js/sfz/sample-integrity.js:42— sample-integrity.createSfzSampleIntegrity has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 7). Of this number, 16 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.
AnalogMeterPlugin.drawCell (cognitive 26) plugins/analyzer/analog_meter.js:776— AnalogMeterPlugin.drawCell has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 10 (11 pts), boolean chains 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
ChromaSpiralPlugin.drawGraph::drawSignal (cognitive 26) plugins/analyzer/chroma_spiral.js:344— ChromaSpiralPlugin.drawGraph::drawSignal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (11 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ChromaSpiralPlugin.drawGraph) 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.
PluginProcessor.pollDspAssetStates (cognitive 26) REDACTED:5777— PluginProcessor.pollDspAssetStates has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioService.publishRuntimeEvents (cognitive 26) android/app/src/main/java/com/frieve/effetune/AudioService.java:1257— AudioService.publishRuntimeEvents has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (10 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_normalizeTemporalCapability (cognitive 26) REDACTED:3731— _normalizeTemporalCapability has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (11 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resumeSfzRuntimesForRender (cognitive 26) REDACTED:7955— resumeSfzRuntimesForRender has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loadTrackData (cognitive 26) js/ui/audio-player/audio-context-manager.js:3856— loadTrackData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), other 2, error handling 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateResponse (cognitive 26) plugins/eq/room_eq.js:753— updateResponse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, loops 4, ternaries 2 (3 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 12 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initAudio (cognitive 26) js/ui-manager.js:942— initAudio has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 950, 982, 970, …). 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.
frequencyDependentLowSpectrum (cognitive 26) js/room-eq/design-core.js:879— frequencyDependentLowSpectrum has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 4, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
onWasmAssetState (cognitive 26) plugins/reverb/ir_reverb.js:1630— onWasmAssetState has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 10, ternaries 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openSpeedPopup (cognitive 26) js/ui/audio-player/audio-player-ui.js:1494— openSpeedPopup has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (11 pts), other 5, ternaries 4 (5 pts), boolean chains 4, loops 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 12 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
_configurationError (cognitive 26) plugins/basics/bass_management.js:263— _configurationError has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7, loops 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bindEvents (cognitive 26) extension/editor.js:496— bindEvents has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), error handling 4, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 26 points belong to 31 function items inside it that branch (a function literal at line 508, a function literal at line 599, (anonymous)::canApplyPreset, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
decodeNoteSpectrogram (cognitive 26) dsp/bindings/js/src/telemetry.js:431— decodeNoteSpectrogram has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 4 (5 pts), other 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.
getEffectiveActiveWasmAssetSnapshot (cognitive 26) js/audio/audio-manager-wasm-assets.js:124— getEffectiveActiveWasmAssetSnapshot has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (10 pts), ternaries 2 (3 pts), other 2, loops 1 (nesting depth added 6). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
waitForEffectiveActiveWasmAssets (cognitive 26) js/audio/audio-manager-wasm-assets.js:188— waitForEffectiveActiveWasmAssets has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 3, ternaries 3, other 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 252, (anonymous)::settle, (anonymous)::check, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
createPluginSession (cognitive 26) features/effetune-benchmark.js:716— createPluginSession has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5, error handling 2 (4 pts), loops 1, other 1, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
writeHistory (cognitive 26) plugins/analyzer/pitch_meter.js:272— writeHistory has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 6, if/else 5 (6 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compileRegion::instance (cognitive 26) js/sfz/modulation.js:130— compileRegion::instance has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (10 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
openPagedTrackContextMenu (cognitive 26) js/ui/library/library-view-menus.js:297— openPagedTrackContextMenu has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, ternaries 10, if/else 5, other 1. Of this number, 21 points are the body's own statements and 5 belong to 13 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
modulation.compileCurves (cognitive 25) js/sfz/modulation.js:26— modulation.compileCurves has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
modulation.compileRegion.instance (cognitive 25) js/sfz/modulation.js:130— modulation.compileRegion.instance has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (10 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
alac-playback-source.probeAlac::sampleDescription (cognitive 25) electron/alac-playback-source.cjs:60— alac-playback-source.probeAlac::sampleDescription has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (15 pts), if/else 4 (8 pts), boolean chains 1, loops 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.
network-music-resource.serveRemoteResource (cognitive 25) electron/network-music-resource.cjs:9— network-music-resource.serveRemoteResource has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (10 pts), error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 4). None of this is in the body itself: all 25 points belong to 3 function literals inside it that branch (lines 14, 11, 30). 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.
network-music-content.parseSearch (cognitive 25) electron/network-music-content.cjs:29— network-music-content.parseSearch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, loops 3 (nesting depth added 5). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (relation, conjunction, disjunction). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MusicServer.serveResource (cognitive 25) REDACTED:133— MusicServer.serveResource has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 7, ternaries 3 (5 pts), error handling 1 (nesting depth added 3). Of this number, 21 points are the body's own statements and 4 belong to 3 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.
UIEventHandler.handleNewPluginDrop (cognitive 25) js/ui/pipeline/ui-event-handler.js:931— UIEventHandler.handleNewPluginDrop has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, error handling 1 (nesting depth added 6). Of this number, 22 points are the body's own statements and 3 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.
visualizer-midi.drawMidiNotes (cognitive 25) js/visualizer/visualizer-midi.js:122— visualizer-midi.drawMidiNotes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 4 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 5 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.
SynchronizedVideo.frame (cognitive 25) js/ui/audio-player/synchronized-video.js:41— SynchronizedVideo.frame has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9 (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.
ExtensionEditor.clearDeletedMeasurementReferences (cognitive 25) extension/editor.js:1035— ExtensionEditor.clearDeletedMeasurementReferences has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 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.
offline-graph-descriptor.buildOfflineGraphDescriptor (cognitive 25) js/audio/offline-graph-descriptor.js:5— offline-graph-descriptor.buildOfflineGraphDescriptor has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (11 pts), loops 5 (7 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 11). Of this number, 21 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
signal-generation.createWhiteNoiseBuffer (cognitive 25) features/measurement/audio-utils/signal-generation.js:44— signal-generation.createWhiteNoiseBuffer has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (14 pts), ternaries 3 (6 pts), boolean chains 3, if/else 2 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AnalysisController.createControls (cognitive 25) features/measurement/ui/analysis-controller.js:211— AnalysisController.createControls has cognitive complexity 25 (threshold 15). Drivers by points: if/else 32 (50 pts), ternaries 13 (23 pts), boolean chains 14, loops 5 (9 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.
dsd-parser.parseDff (cognitive 25) js/audio/dsd/dsd-parser.js:85— dsd-parser.parseDff has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (11 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 105, a function literal at line 131, walk). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AudioContextManager.startMediaElementPlayback (cognitive 25) js/ui/audio-player/audio-context-manager.js:5682— AudioContextManager.startMediaElementPlayback has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (14 pts), error handling 3 (6 pts), boolean chains 5 (nesting depth added 5). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 5757, fail, removeListeners). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WebCatalogRepositoryClient.#handleMessage (cognitive 25) js/library/repository/web-catalog-client.js:195— WebCatalogRepositoryClient.#handleMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), loops 4 (8 pts), boolean chains 4, error handling 1 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
design-core.sourceRecord (cognitive 25) js/crosstalk-cancellation/design-core.js:79— design-core.sourceRecord has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, ternaries 4 (5 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
flac-stream.readFlacFrameHeader (cognitive 25) js/sfz/flac-stream.js:51— flac-stream.readFlacFrameHeader has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (15 pts), boolean chains 5, if/else 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sample-metadata.readSfzWaveLoop (cognitive 25) js/sfz/sample-metadata.js:6— sample-metadata.readSfzWaveLoop has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 1 (nesting depth added 10). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeSfzLibraryService.prepare (cognitive 25) js/sfz/native-service.js:203— NativeSfzLibraryService.prepare has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LivePcmCore.render (cognitive 25) js/ui/audio-player/live-pcm-core.js:69— LivePcmCore.render has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginProcessor.refreshDspPipeline (cognitive 25) REDACTED:6022— PluginProcessor.refreshDspPipeline has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, error handling 1, 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.
RoomEqPlugin._waveformPath (cognitive 25) plugins/eq/room_eq.js:2937— RoomEqPlugin._waveformPath has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 4 (8 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). Of this number, 21 points are the body's own statements and 4 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.
MidiMappings.configure (cognitive 25) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:66— MidiMappings.configure has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
assets.resolve_topology (cognitive 25) dsp/bindings/python/src/effetune/assets.py:203— assets.resolve_topology has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
telemetry._decode_telemetry_packet (cognitive 25) dsp/bindings/python/src/effetune/telemetry.py:1311— telemetry._decode_telemetry_packet has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 4 (9 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updateHudValues (cognitive 25) plugins/saturation/tube_simulator.js:6829— _updateHudValues has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, ternaries 6 (12 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.
findNoteAnalysisSources (cognitive 25) REDACTED:6272— findNoteAnalysisSources has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 9, loops 3 (4 pts) (nesting depth added 7). Of this number, 23 points are the body's own statements and 2 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.
tapVisualizerInstances (cognitive 25) REDACTED:6877— tapVisualizerInstances has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 9, ternaries 3 (6 pts), if/else 4 (5 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
listMetadataCandidates (cognitive 25) js/library/repository/catalog-runtime-core.js:5079— listMetadataCandidates has cognitive complexity 25 (threshold 15). Drivers by points: other 13, ternaries 9, boolean chains 2, if/else 1. Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 5112). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
rebindAudioElementAfterGraphRebuild (cognitive 25) js/ui/audio-player/audio-context-manager.js:1847— rebindAudioElementAfterGraphRebuild has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11, boolean chains 6, other 4, ternaries 4. Of this number, 20 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
schedulePreparedBufferTransition (cognitive 25) js/ui/audio-player/audio-context-manager.js:4815— schedulePreparedBufferTransition has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (8 pts), ternaries 3, error handling 1, other 1 (nesting depth added 1). Of this number, 18 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_readRhythm (cognitive 25) plugins/analyzer/rhythm_analyzer.js:2173— _readRhythm has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 7 (8 pts), boolean chains 1 (nesting depth added 8). Of this number, 23 points are the body's own statements and 2 belong to 5 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.
frequencyDependentLowPhaseAnalysis (cognitive 25) js/room-eq/design-core.js:980— frequencyDependentLowPhaseAnalysis has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 5 (10 pts), boolean chains 2, loops 1, other 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.
renderMeasurementSettings (cognitive 25) js/pipeline-analyzer/ui.js:1019— renderMeasurementSettings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (7 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sharedTrack (cognitive 25) electron/network-music-host.cjs:498— sharedTrack has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (5 pts), ternaries 5, other 4, loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
onConnection (cognitive 25) electron/remote-control-host.cjs:988— onConnection has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 18, if/else 4, error handling 2, ternaries 1. Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 8 function items inside it that branch (isCurrentMusicSession, a function literal at line 1030, isMusicAuthorized, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
loadPrefetchPages (cognitive 25) js/ui/library/paged-view-controller.js:702— loadPrefetchPages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 5 (8 pts), boolean chains 3, other 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
#readDirectory (cognitive 25) js/library/scan/bounded-scan-service.js:240— #readDirectory has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), other 3, ternaries 1 (3 pts), boolean chains 2, error handling 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.
updateMeter::drawSignal (cognitive 25) plugins/analyzer/level_meter.js:590— updateMeter::drawSignal has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 3 (5 pts), other 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setParameters (cognitive 25) plugins/eq/narrow_range.js:403— setParameters has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 5 (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.
attach.render (cognitive 25) plugins/graph-readout.js:435— attach.render has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10, boolean chains 9, if/else 3, loops 2, other 1. Of this number, 21 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
build.buildPackage (cognitive 24) dsp/bindings/js/scripts/build.mjs:11— build.buildPackage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 7 (9 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenHomeMediaGateway.proxy (cognitive 24) REDACTED:212— OpenHomeMediaGateway.proxy has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 24 points belong to 3 function literals inside it that branch (lines 230, 214, 281). 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.
SubsonicSource.browse (cognitive 24) electron/subsonic-source.cjs:54— SubsonicSource.browse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9, ternaries 2 (4 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.
measurement-backup-ipc.registerMeasurementBackupIpc (cognitive 24) electron/measurement-backup-ipc.cjs:78— measurement-backup-ipc.registerMeasurementBackupIpc has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, error handling 3, loops 2 (nesting depth added 5). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 126, a function literal at line 103, a function literal at line 116, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
IrLibraryStore.open (cognitive 24) js/ir-library/ir-library-store.js:167— IrLibraryStore.open has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 5 (6 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineItemBuilder.createHeader (cognitive 24) js/ui/pipeline/pipeline-item-builder.js:66— PipelineItemBuilder.createHeader has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (selectPlugin, shouldSkipItemSelection). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PresetManager.deletePresets (cognitive 24) js/ui/pipeline/preset-manager.js:482— PresetManager.deletePresets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 4 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.
FileProcessor._processMultipleFiles (cognitive 24) js/ui/pipeline/file-processor.js:654— FileProcessor._processMultipleFiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 9). Of this number, 21 points are the body's own statements and 3 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.
measurement-model.resolveIrRecordKey (cognitive 24) features/measurement/measurement-model.js:190— measurement-model.resolveIrRecordKey has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
portable.prepareItems (cognitive 24) js/user-data-backup/portable.js:169— portable.prepareItems has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 5 (9 pts), boolean chains 7, ternaries 2 (4 pts), error handling 2 (3 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. This shape REPEATS in the file: one other method here (portable.prepareItems::fingerprint) 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.
track-information.formatTrackInformation (cognitive 24) js/ui/audio-player/track-information.js:22— track-information.formatTrackInformation has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (13 pts), if/else 6 (7 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VisualizerView.counters (cognitive 24) REDACTED:640— VisualizerView.counters has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 6, if/else 4 (5 pts), loops 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
devices.stopMicrophoneInput (cognitive 24) features/measurement/audio-utils/devices.js:190— devices.stopMicrophoneInput has cognitive complexity 24 (threshold 15). Drivers by points: error handling 6 (13 pts), if/else 8 (10 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalysisController.frequencySeries (cognitive 24) features/measurement/ui/analysis-controller.js:720— AnalysisController.frequencySeries has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 4 (5 pts), loops 1 (3 pts) (nesting depth added 6). Of this number, 22 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dsd-source.openDsdRangeSource (cognitive 24) js/ui/audio-player/dsd-source.js:29— dsd-source.openDsdRangeSource has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, error handling 1 (3 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.
NetworkLivePcm.open (cognitive 24) js/ui/audio-player/network-live-pcm.js:31— NetworkLivePcm.open has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 6). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (pump, current, a function literal at line 101, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AirPlayPlayback.handleMessage (cognitive 24) js/ui/audio-player/airplay-playback.js:39— AirPlayPlayback.handleMessage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6 (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.
library-view.fallbackText (cognitive 24) js/ui/library/library-view.js:3763— library-view.fallbackText has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 24. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
pipeline-snapshot.normalizeAnalyzerSlots (cognitive 24) js/pipeline-analyzer/pipeline-snapshot.js:67— pipeline-snapshot.normalizeAnalyzerSlots has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 6, if/else 4 (6 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.
pipeline-apply.applyParamsToPlugin (cognitive 24) js/remote/pipeline-apply.js:42— pipeline-apply.applyParamsToPlugin has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dst-source.createDstSource.findPacket (cognitive 24) js/audio/dsd/dst-source.js:39— dst-source.createDstSource.findPacket has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2, ternaries 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.
flac-stream.decodeFlacFrame (cognitive 24) js/sfz/flac-stream.js:125— flac-stream.decodeFlacFrame has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, loops 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SfzSampleStreamWorker.receive (cognitive 24) js/sfz/sample-stream-worker.js:17— SfzSampleStreamWorker.receive has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser.openSfzLibraryBrowser (cognitive 24) js/sfz/browser.js:45— browser.openSfzLibraryBrowser has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 3 (6 pts), error handling 1 (2 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 5 function items inside it that branch (importFiles, a function literal at line 93, register, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TiltEQPlugin.drawGraph (cognitive 24) plugins/eq/tilt_eq.js:404— TiltEQPlugin.drawGraph has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (8 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 6 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.
FrequencyPreviewInstance.draw (cognitive 24) plugins/frequency-preview.js:134— FrequencyPreviewInstance.draw has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 7 (9 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IRReverbPlugin._importFiles (cognitive 24) plugins/reverb/ir_reverb.js:305— IRReverbPlugin._importFiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (6 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StereoDownmix.<init> (cognitive 24) android/app/src/main/java/com/frieve/effetune/StereoDownmix.java:9— StereoDownmix.<init> has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
telemetry._decode_multires_hq (cognitive 24) dsp/bindings/python/src/effetune/telemetry.py:604— telemetry._decode_multires_hq has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 5 (7 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
python_golden_runner.run_modulation_cross_field_contract (cognitive 24) dsp/bindings/acceptance/python_golden_runner.py:603— python_golden_runner.run_modulation_cross_field_contract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (8 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.
solveTubeSimulatorSeHudQuiescent (cognitive 24) plugins/saturation/tube_simulator.js:727— solveTubeSimulatorSeHudQuiescent has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 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.
resolveEntityAnchor (cognitive 24) js/library/repository/catalog-runtime-core.js:919— resolveEntityAnchor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 5, other 4 (nesting depth added 2). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
claimMetadataParse (cognitive 24) js/library/repository/catalog-runtime-core.js:5453— claimMetadataParse has cognitive complexity 24 (threshold 15). Drivers by points: other 8, boolean chains 7, if/else 4 (5 pts), ternaries 4 (nesting depth added 1). Of this number, 20 points are the body's own statements and 4 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.
seekRollingPcm (cognitive 24) js/ui/audio-player/audio-context-manager.js:3374— seekRollingPcm has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, other 2, ternaries 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
disconnect (cognitive 24) js/ui/audio-player/audio-context-manager.js:6157— disconnect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1, loops 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_deriveRouteAndPlayerFacts (cognitive 24) js/audio/power-policy-controller.js:654— _deriveRouteAndPlayerFacts has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 18, ternaries 2 (3 pts), if/else 2, other 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
updateSleepModeDisplay (cognitive 24) js/ui-manager.js:1022— updateSleepModeDisplay has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 2, other 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.
clockPosition (cognitive 24) plugins/analyzer/rhythm_analyzer.js:833— clockPosition has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 4 (6 pts), loops 2 (3 pts), boolean chains 2, other 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initialize (cognitive 24) js/app.js:545— initialize has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, error handling 3 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
enqueueAction (cognitive 24) js/ui/audio-player/openhome-playback-adapter.js:93— enqueueAction has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, ternaries 3 (5 pts), error handling 2 (nesting depth added 5). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 105, isCurrent, a function literal at line 147). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
drawDifferenceFrequency (cognitive 24) plugins/lofi/dsd64_imd_simulator.js:1056— drawDifferenceFrequency has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (8 pts), other 6, loops 4 (5 pts), boolean chains 3, ternaries 2 (nesting depth added 3). Of this number, 18 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
normalizeLiveMemoryEvidence (cognitive 24) REDACTED:1207— normalizeLiveMemoryEvidence has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 9, 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.
pollUpnp (cognitive 24) electron/network-output-host.cjs:707— pollUpnp has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, error handling 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.
validatePowerDecision (cognitive 24) js/audio/power-policy.js:1125— validatePowerDecision has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 23, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
#publishCueDirectory (cognitive 24) js/library/scan/bounded-scan-service.js:603— #publishCueDirectory has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 5 (12 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setupParameterUpdateHandling (cognitive 24) js/ui/pipeline/pipeline-item-builder.js:791— setupParameterUpdateHandling has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 2 (nesting depth added 13). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function item inside it that branches (updateParameters). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_designAndStage (cognitive 24) plugins/spatial/crosstalk_cancellation.js:340— _designAndStage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, error handling 1 (nesting depth added 3). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
createWasmBenchmarkRuntime (cognitive 24) features/effetune-benchmark.js:874— createWasmBenchmarkRuntime has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts), error handling 2 (3 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
postMidiTransport (cognitive 24) js/ui/audio-player/midi-playback.js:102— postMidiTransport has cognitive complexity 24 (threshold 15). Drivers by points: if/else 27 (82 pts), boolean chains 18, other 11, error handling 1 (5 pts), ternaries 3 (5 pts), loops 2 (nesting depth added 61). 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.
setFavoriteTrackUids (cognitive 24) js/ui/library/library-view-menus.js:196— setFavoriteTrackUids has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 1 (2 pts), loops 2, other 2, boolean chains 1, ternaries 1 (nesting depth added 7). Of this number, 23 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.
main.app.on("open-file") (cognitive 23) electron/main.js:1624— main.app.on("open-file") has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 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.
library-metadata-worker.validateParseMessage (cognitive 23) electron/library-metadata-worker.cjs:62— library-metadata-worker.validateParseMessage has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (11 pts), error handling 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
visualizer-ballistics.stepBallistics (cognitive 23) js/visualizer/visualizer-ballistics.js:26— visualizer-ballistics.stepBallistics has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 6 (8 pts), ternaries 5 (nesting depth added 7). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
visualizer-analyzer-display.createSpectrumSmoother.<returned closure> (cognitive 23) js/visualizer/visualizer-analyzer-display.js:67— visualizer-analyzer-display.createSpectrumSmoother.<returned closure> has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (10 pts), loops 6 (9 pts), if/else 3, 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.
MidiEventListDisplay.draw (cognitive 23) js/visualizer/visualizer-midi-event-list.js:41— MidiEventListDisplay.draw has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 3 (4 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 5). Of this number, 15 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
visualizer-playback-control.drawPlaybackControl (cognitive 23) js/visualizer/visualizer-playback-control.js:6— visualizer-playback-control.drawPlaybackControl has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 4 (6 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
VisualizerEditor.reorderedItems (cognitive 23) js/visualizer/visualizer-editor.js:318— VisualizerEditor.reorderedItems has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlaybackManager.setShuffleMode (cognitive 23) js/ui/audio-player/playback-manager.js:2352— PlaybackManager.setShuffleMode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 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.
library-manager-v2.normalizeCueWarnings (cognitive 23) js/library/library-manager-v2.js:769— library-manager-v2.normalizeCueWarnings has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 3 (7 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). Of this number, 17 points are the body's own statements and 6 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.
PwaNetworkMusicTransport.request (cognitive 23) js/network-music/pwa-transport.js:120— PwaNetworkMusicTransport.request has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (5 pts), boolean chains 2, error handling 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElectronIntegration.initEventListeners (cognitive 23) js/electron-integration.js:136— ElectronIntegration.initEventListeners has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6 (nesting depth added 6). None of this is in the body itself: all 23 points belong to 4 function literals inside it that branch (lines 167, 232, 148, …). 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.
SfzSampleStream.open (cognitive 23) js/sfz/sample-stream.js:84— SfzSampleStream.open has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 5). Of this number, 19 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RhythmAnalyzerPlugin._headerItems (cognitive 23) plugins/analyzer/rhythm_analyzer.js:1432— RhythmAnalyzerPlugin._headerItems has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 15 (20 pts), boolean chains 3 (nesting depth added 5). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginProcessor._prepareTemporalCapabilities (cognitive 23) REDACTED:4059— PluginProcessor._prepareTemporalCapabilities has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BassManagementPlugin._syncControls (cognitive 23) plugins/basics/bass_management.js:1037— BassManagementPlugin._syncControls has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (5 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.
MultiChannelPanelPlugin._syncChannelControls (cognitive 23) plugins/basics/multi_channel_panel.js:386— MultiChannelPanelPlugin._syncChannelControls has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-readout.attach.render (cognitive 23) plugins/graph-readout.js:435— graph-readout.attach.render has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, ternaries 8 (9 pts), if/else 3, loops 2 (nesting depth added 1). Of this number, 18 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
captureJsFallbackAdmissions (cognitive 23) REDACTED:5811— captureJsFallbackAdmissions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tryDspPipeline (cognitive 23) REDACTED:6612— tryDspPipeline has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, error handling 1, loops 1, other 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.
getPlaybackPositionForGraphRebind (cognitive 23) js/ui/audio-player/audio-context-manager.js:1229— getPlaybackPositionForGraphRebind has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 3 (6 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prepareTrackBuffer (cognitive 23) js/ui/audio-player/audio-context-manager.js:3743— prepareTrackBuffer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 2 (3 pts), other 2, error handling 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.
_rebindSfzDspGraph::execute (cognitive 23) js/audio-manager.js:3200— _rebindSfzDspGraph::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 3 (4 pts), other 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.
createPagedSectionHeader (cognitive 23) js/ui/library/library-view.js:2203— createPagedSectionHeader has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 6 (8 pts), boolean chains 4, other 2 (nesting depth added 5). Of this number, 22 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.
_updateDeadlineClocks (cognitive 23) js/audio/power-policy-controller.js:753— _updateDeadlineClocks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 11 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_configureWorklets (cognitive 23) js/audio/power-policy-controller.js:1096— _configureWorklets has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), ternaries 2, other 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
createAudioPlayer (cognitive 23) js/ui-manager.js:2634— createAudioPlayer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, other 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ensureDspTelemetrySubscription (cognitive 23) plugins/analyzer/note_spectrogram.js:766— ensureDspTelemetrySubscription has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 7, error handling 3 (6 pts), if/else 4 (6 pts), loops 3 (4 pts) (nesting depth added 6). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_writePixels (cognitive 23) plugins/analyzer/note_spectrogram.js:1013— _writePixels has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
artworkClaimMatchesCurrentTrack (cognitive 23) js/library/repository/web-sqlite-runtime.js:2225— artworkClaimMatchesCurrentTrack has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (8 pts), ternaries 1 (3 pts), other 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
buildOutputRow (cognitive 23) js/pipeline-analyzer/ui.js:1119— buildOutputRow has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (7 pts), loops 3 (4 pts) (nesting depth added 2). Of this number, 21 points are the body's own statements and 2 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous) (cognitive 23) electron/main.js:1624— (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 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.
readBackupSnapshot (cognitive 23) features/measurement/dataStorage.js:606— readBackupSnapshot has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 5 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initialize (cognitive 23) features/measurement/ui/analysis-controller.js:124— initialize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8, ternaries 6 (8 pts), boolean chains 5, loops 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 156, a function literal at line 128, a function literal at line 165, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
extractArtwork (cognitive 23) electron/library-catalog-scan-runtime.cjs:545— extractArtwork has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 3 (4 pts), boolean chains 3, error handling 2, other 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.
seek (cognitive 23) js/ui/audio-player/rolling-pcm-transport.js:410— seek has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (9 pts), ternaries 2, error handling 1, other 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
createUI (cognitive 23) plugins/dynamics/multiband_transient.js:937— createUI has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (8 pts), loops 2, boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 995, a function literal at line 1111, onclick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
createBrowserController.showContextMenu (cognitive 23) electron/browser-controller.cjs:665— createBrowserController.showContextMenu has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). Of this number, 17 points are the body's own statements and 6 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_prepareWasmAssetMapsForTarget (cognitive 23) js/audio/audio-manager-wasm-assets.js:358— _prepareWasmAssetMapsForTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 6, loops 2 (3 pts), other 2 (nesting depth added 8). Of this number, 20 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_waitForPendingExternalAssetDescriptors (cognitive 23) js/audio/audio-manager-wasm-assets.js:737— _waitForPendingExternalAssetDescriptors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, loops 2, ternaries 2 (nesting depth added 4). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 8 function items inside it that branch (evaluate, check, a function literal at line 740, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
onSpectrumMessage (cognitive 23) plugins/spectrum-overlay.js:332— onSpectrumMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7, other 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.
#initialize (cognitive 23) js/library/library-manager-v2.js:172— #initialize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9, boolean chains 7, other 4, error handling 2 (3 pts) (nesting depth added 1). Of this number, 22 points are the body's own statements and 1 belongs to 7 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
startSfzRuntimeForAsset (cognitive 23) js/audio/audio-manager-sfz-runtime.js:212— startSfzRuntimeForAsset has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 9, other 1. Of this number, 13 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
drawGraph (cognitive 23) plugins/eq/loudness_equalizer.js:433— drawGraph has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 6, ternaries 5 (6 pts), if/else 4 (5 pts), other 5, loops 1 (nesting depth added 2). Of this number, 15 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
detectPeaks (cognitive 23) js/visualizer/visualizer-guitar.js:126— detectPeaks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (6 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
semantics.packEffect (cognitive 22) dsp/bindings/js/src/semantics.js:276— semantics.packEffect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
assets.encodeEta1 (cognitive 22) dsp/bindings/js/src/assets.js:283— assets.encodeEta1 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 3 (4 pts), error handling 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirPlayReceiverHost.reconcile (cognitive 22) electron/airplay-receiver.cjs:186— AirPlayReceiverHost.reconcile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, boolean chains 8, error handling 2, ternaries 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 213, terminated, a function literal at line 239, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PresetManager.savePreset (cognitive 22) js/ui/pipeline/preset-manager.js:213— PresetManager.savePreset has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UIEventHandler.handlePluginReordering (cognitive 22) js/ui/pipeline/ui-event-handler.js:812— UIEventHandler.handlePluginReordering has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 3 (nesting depth added 4). Of this number, 12 points are the body's own statements and 10 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.
PowerPolicyController._setUiPowerGate (cognitive 22) js/audio/power-policy-controller.js:1934— PowerPolicyController._setUiPowerGate has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts), loops 2 (5 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioManager._captureBlindBranchAssets (cognitive 22) js/audio-manager.js:4109— AudioManager._captureBlindBranchAssets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, ternaries 3 (5 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.
graph-image-copy.copyGraphImage (cognitive 22) features/measurement/ui/graph-image-copy.js:7— graph-image-copy.copyGraphImage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, error handling 2, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 18 points are the body's own statements and 4 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.
AudioContextManager.prepareMediaTransitionCandidate (cognitive 22) js/ui/audio-player/audio-context-manager.js:5543— AudioContextManager.prepareMediaTransitionCandidate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (5 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
remote-music-service.createAndroidMusicService.playerCommand (cognitive 22) js/android/remote-music-service.js:75— remote-music-service.createAndroidMusicService.playerCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AudioPlayerUI.finishVideoGesture (cognitive 22) js/ui/audio-player/audio-player-ui.js:1296— AudioPlayerUI.finishVideoGesture has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (7 pts), boolean chains 4 (nesting depth added 8). Of this number, 19 points are the body's own statements and 3 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.
NetworkLivePcm.stop (cognitive 22) js/ui/audio-player/network-live-pcm.js:197— NetworkLivePcm.stop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, loops 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirPlayPlayback.release (cognitive 22) js/ui/audio-player/airplay-playback.js:146— AirPlayPlayback.release has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3 (nesting depth added 8). Of this number, 17 points are the body's own statements and 5 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.
MetadataParseService.processBatch (cognitive 22) js/library/scan/metadata-parse-service.js:153— MetadataParseService.processBatch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 2 (4 pts), loops 3, error handling 1 (nesting depth added 5). Of this number, 16 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.
playlist-stream.decodeByteChunks (cognitive 22) js/library/playlists/playlist-stream.js:140— playlist-stream.decodeByteChunks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3, 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.
library-view.getPagedInvalidationDecision (cognitive 22) js/ui/library/library-view.js:4004— library-view.getPagedInvalidationDecision has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, ternaries 3, loops 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NetworkPlaybackAdapter.sync (cognitive 22) js/network-music/playback-adapter.js:103— NetworkPlaybackAdapter.sync has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, ternaries 4 (7 pts), if/else 4, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
design-core.designFiveBandFirPeq (cognitive 22) js/five-band-fir-peq/design-core.js:327— design-core.designFiveBandFirPeq has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (7 pts), ternaries 3, boolean chains 2 (nesting depth added 5). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ir-preparation.routedL1GainUpperBound (cognitive 22) js/ir-library/ir-preparation.js:261— ir-preparation.routedL1GainUpperBound has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
group-delay-analysis.interpolateLinear (cognitive 22) js/room-eq/group-delay-analysis.js:14— group-delay-analysis.interpolateLinear has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sample-stream-worker.attachSfzSampleStreamWorker (cognitive 22) js/sfz/sample-stream-worker.js:74— sample-stream-worker.attachSfzSampleStreamWorker has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (10 pts), ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (directRead, read, a function literal at line 104, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
oscillator-source.prepareSfzOscillatorSources (cognitive 22) js/sfz/oscillator-source.js:58— oscillator-source.prepareSfzOscillatorSources has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, loops 1 (nesting depth added 9). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BassManagementPlugin._buildRoutingMatrix (cognitive 22) plugins/basics/bass_management.js:909— BassManagementPlugin._buildRoutingMatrix has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (7 pts) (nesting depth added 10). Of this number, 13 points are the body's own statements and 9 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.
FIRCrossoverPlugin.setParameters (cognitive 22) plugins/basics/fir_crossover.js:129— FIRCrossoverPlugin.setParameters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, loops 3, ternaries 1 (2 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.
EarphoneCableSimPlugin.setUIValues (cognitive 22) plugins/eq/earphone_cable_sim.js:657— EarphoneCableSimPlugin.setUIValues has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FifteenBandPEQPlugin.parseAndImportTXT (cognitive 22) plugins/eq/fifteen_band_peq.js:1311— FifteenBandPEQPlugin.parseAndImportTXT has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FiveBandFIRPEQPlugin.setParameters (cognitive 22) plugins/eq/five_band_fir_peq.js:136— FiveBandFIRPEQPlugin.setParameters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoomEqPlugin._readResponse (cognitive 22) plugins/eq/room_eq.js:2587— RoomEqPlugin._readResponse has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoundFontPlayerPlugin.setParameters (cognitive 22) plugins/others/soundfont_player.js:74— SoundFontPlayerPlugin.setParameters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetTransfers.select (cognitive 22) android/app/src/main/java/com/frieve/effetune/AssetTransfers.java:100— AssetTransfers.select has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 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.
GraphStream.set_param (cognitive 22) dsp/bindings/python/src/effetune/graph.py:668— GraphStream.set_param has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, ternaries 1 (2 pts), error handling 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.
validation.validate_bass_management (cognitive 22) dsp/bindings/python/src/effetune/validation.py:333— validation.validate_bass_management has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), loops 1 (2 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
pumpDspTelemetry (cognitive 22) REDACTED:6749— pumpDspTelemetry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 2 (3 pts), error handling 1, other 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.
prepareDsdPlaybackDecisionRecord (cognitive 22) js/ui/audio-player/audio-context-manager.js:4111— prepareDsdPlaybackDecisionRecord has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, other 2, error handling 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateNav (cognitive 22) js/ui/library/library-view.js:1230— updateNav has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 5 (7 pts), boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1248, 1237, 1234, …). 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.
requestSilentInputSelection (cognitive 22) js/audio/power-policy-controller.js:3084— requestSilentInputSelection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (6 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
processRoomEqAutomation (cognitive 22) plugins/eq/room_eq.js:47— processRoomEqAutomation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_renderMeasurement (cognitive 22) plugins/eq/room_eq.js:2312— _renderMeasurement has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), ternaries 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
storeEvent (cognitive 22) plugins/analyzer/rhythm_analyzer.js:896— storeEvent has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, ternaries 7, if/else 6, other 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
refreshProvisionalEvents (cognitive 22) plugins/analyzer/rhythm_analyzer.js:932— refreshProvisionalEvents has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, ternaries 2 (5 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.
alignedAverageAnalysis (cognitive 22) js/room-eq/design-core.js:497— alignedAverageAnalysis has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 pts), ternaries 3, boolean chains 2 (nesting depth added 8). Of this number, 20 points are the body's own statements and 2 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.
createPlayerUI (cognitive 22) js/ui/audio-player/audio-player-ui.js:438— createPlayerUI has cognitive complexity 22 (threshold 15). Drivers by points: if/else 23 (32 pts), ternaries 15, boolean chains 7, loops 3, error handling 2, other 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
parseDspSpectrumTelemetryFrame (cognitive 22) plugins/analyzer/spectrum_analyzer.js:386— parseDspSpectrumTelemetryFrame has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9, loops 1, other 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
beginReacquireAudioInput (cognitive 22) js/audio/audio-io-manager.js:1211— beginReacquireAudioInput has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateTransferGraphs (cognitive 22) plugins/dynamics/multiband_expander.js:1002— updateTransferGraphs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), other 5, boolean chains 3, ternaries 2, loops 1 (nesting depth added 2). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1027, 1020, 1055, …). 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.
refreshLibraryNowPlaying (cognitive 22) js/network-music/view.js:853— refreshLibraryNowPlaying has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 5, other 4, ternaries 3 (4 pts), loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
findMatrixCell (cognitive 22) REDACTED:810— findMatrixCell has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, other 5, ternaries 1. Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 811). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
_renderMeasurementOptions (cognitive 22) plugins/spatial/crosstalk_cancellation.js:614— _renderMeasurementOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). Of this number, 20 points are the body's own statements and 2 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.
_sync (cognitive 22) plugins/spectrum-overlay.js:261— _sync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 9 (nesting depth added 4). Of this number, 16 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.
createUI (cognitive 22) plugins/resonator/modal_resonator.js:503— createUI has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 5). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 572, createResonatorRow, a function literal at line 557, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
normalizeContextRequest (cognitive 22) js/library/library-manager-v2.js:64— normalizeContextRequest has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (10 pts), other 8, boolean chains 2, if/else 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handleMenuKeyDown (cognitive 22) js/ui/library/library-view-menus.js:541— handleMenuKeyDown has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 3 (6 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
effect.canonicalizeProcessingParameters (cognitive 21) REDACTED:92— effect.canonicalizeProcessingParameters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, loops 1 (2 pts), ternaries 1 (2 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.
semantics.validateBassManagement (cognitive 21) dsp/bindings/js/src/semantics.js:149— semantics.validateBassManagement has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
effects.packSfzEffects (cognitive 21) js/sfz/effects.js:186— effects.packSfzEffects has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, loops 5 (6 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser-preload.installMidiFileHook (cognitive 21) electron/browser-preload.js:163— browser-preload.installMidiFileHook has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 4, error handling 2, loops 1, ternaries 1. Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 12 function items inside it that branch (inspectRequest, offerText, offer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
cast-sender.decodeCastMessage (cognitive 21) electron/cast-sender.cjs:53— cast-sender.decodeCastMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (20 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.
NetworkMusicHost.resolveTrack (cognitive 21) electron/network-music-host.cjs:251— NetworkMusicHost.resolveTrack has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, 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.
playback-range-reader.registerPlaybackRangeReader (cognitive 21) electron/playback-range-reader.cjs:6— playback-range-reader.registerPlaybackRangeReader has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). None of this is in the body itself: all 21 points belong to 6 function items inside it that branch (a function literal at line 57, a function literal at line 15, a function literal at line 21, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
musicxml-parser.unzipScore::extract (cognitive 21) js/midi/musicxml-parser.js:105— musicxml-parser.unzipScore::extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (musicxml-parser.unzipScore) 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.
clipboard-utils.copyTextWithSelection (cognitive 21) js/utils/clipboard-utils.js:10— clipboard-utils.copyTextWithSelection has cognitive complexity 21 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserDataBackupService.readItems (cognitive 21) js/user-data-backup/service.js:43— UserDataBackupService.readItems has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GuitarFretboardDisplay.solveShape (cognitive 21) js/visualizer/visualizer-guitar.js:239— GuitarFretboardDisplay.solveShape has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 3 (5 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (search, a function literal at line 244, a function literal at line 278). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MidiLiveInput.onMessage (cognitive 21) js/midi/live-input.js:48— MidiLiveInput.onMessage has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), error handling 2 (3 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
VisualizerView.videoFrame (cognitive 21) REDACTED:749— VisualizerView.videoFrame has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 6, if/else 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.
OfflineProcessor.tryProcessOfflineDspInstance (cognitive 21) js/audio/offline-processor.js:1164— OfflineProcessor.tryProcessOfflineDspInstance has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (4 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OfflineProcessor.getOfflineChannelRouting (cognitive 21) js/audio/offline-processor.js:1376— OfflineProcessor.getOfflineChannelRouting has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
session.handle (cognitive 21) extension/session.js:162— session.handle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
measurement.captureAndroidSweep (cognitive 21) js/android/measurement.js:26— measurement.captureAndroidSweep has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 6 (8 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CorrectionHandler.generateCorrectionCurve (cognitive 21) features/measurement/ui/correction-handler.js:83— CorrectionHandler.generateCorrectionCurve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalysisPlot.read (cognitive 21) features/measurement/ui/analysis-plot.js:313— AnalysisPlot.read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (6 pts), boolean chains 5 (nesting depth added 5). Of this number, 17 points are the body's own statements and 4 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.
app.selectSavedAudioDevices (cognitive 21) features/measurement/app.js:809— app.selectSavedAudioDevices has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecorderProcessor.process (cognitive 21) features/measurement/audioWorkletProcessors.js:39— RecorderProcessor.process has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebCatalogScanRuntime.initializePermissions (cognitive 21) js/library/scan/web-scan-runtime.js:61— WebCatalogScanRuntime.initializePermissions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
App.openConfiguredStartupView (cognitive 21) js/app.js:867— App.openConfiguredStartupView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 4 (7 pts), boolean chains 6 (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.
remote-session.resolveRemoteTarget (cognitive 21) js/remote/remote-session.js:22— remote-session.resolveRemoteTarget has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (7 pts), error handling 3 (6 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
design-core.reverbExtendedConsensus (cognitive 21) js/room-eq/design-core.js:1357— design-core.reverbExtendedConsensus has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpectrogramPlugin.drawGraph::drawHistory (cognitive 21) plugins/analyzer/spectrogram.js:1294— SpectrogramPlugin.drawGraph::drawHistory has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (5 pts), ternaries 2 (5 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.
FiveBandDynamicEQ.updateUI (cognitive 21) plugins/eq/five_band_dynamic_eq.js:1225— FiveBandDynamicEQ.updateUI has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). Of this number, 12 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IRReverbPlugin._restagePrepared (cognitive 21) plugins/reverb/ir_reverb.js:502— IRReverbPlugin._restagePrepared has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, error handling 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpectrumOverlayInstance._drawSpectrum (cognitive 21) plugins/spectrum-overlay.js:454— SpectrumOverlayInstance._drawSpectrum has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 4 (8 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.
graph._encode_graph_descriptor (cognitive 21) dsp/bindings/python/src/effetune/graph.py:100— graph._encode_graph_descriptor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 4 (8 pts), loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
presets._expand_legacy_object_array_v1 (cognitive 21) dsp/bindings/python/src/effetune/presets.py:196— presets._expand_legacy_object_array_v1 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initializeDsp (cognitive 21) REDACTED:4567— initializeDsp has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), other 6, error handling 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
setupResolvedAudioElement (cognitive 21) js/ui/audio-player/audio-context-manager.js:4545— setupResolvedAudioElement has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, ternaries 2, other 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.
restorePagedAnchor (cognitive 21) js/ui/library/library-view.js:1526— restorePagedAnchor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, error handling 1, other 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.
annotateEvent (cognitive 21) plugins/analyzer/rhythm_analyzer.js:966— annotateEvent has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 9 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.
_tempogramImage (cognitive 21) plugins/analyzer/rhythm_analyzer.js:2021— _tempogramImage has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 4 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prepareCatalogTrackForGraphRebuild (cognitive 21) js/ui/audio-player/playback-manager.js:1282— prepareCatalogTrackForGraphRebuild has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_loadLibraryEntry (cognitive 21) plugins/reverb/ir_reverb.js:883— _loadLibraryEntry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, ternaries 3, error handling 1 (nesting depth added 2). Of this number, 20 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
_refreshUi (cognitive 21) plugins/spatial/phase_select_eq.js:976— _refreshUi has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (7 pts), loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_readGraph (cognitive 21) plugins/eq/five_band_dynamic_eq.js:758— _readGraph has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (5 pts), boolean chains 4, other 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawKeyboard (cognitive 21) plugins/analyzer/spectrum_analyzer.js:843— drawKeyboard has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 2 (4 pts), loops 3, other 3 (nesting depth added 5). Of this number, 20 points are the body's own statements and 1 belongs 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.
handleMixerTelemetry (cognitive 21) plugins/others/soundfont_player.js:725— handleMixerTelemetry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, loops 2 (3 pts), 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.
normalizeEffect (cognitive 21) js/visualizer/visualizer-model.js:214— normalizeEffect has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 12, boolean chains 6, if/else 2, other 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
loadLatestViewportOrdinal (cognitive 21) js/ui/library/paged-view-controller.js:480— loadLatestViewportOrdinal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, loops 1, other 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.
drawGraph (cognitive 21) plugins/basics/channel_divider.js:805— drawGraph has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), other 5, ternaries 4 (5 pts), boolean chains 1, loops 1 (nesting depth added 2). Of this number, 11 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
getTemporalFacts (cognitive 21) js/audio/power-policy.js:257— getTemporalFacts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8, ternaries 4 (6 pts), boolean chains 5, other 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
runFolder (cognitive 21) js/library/scan/bounded-scan-service.js:85— runFolder has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 2 (4 pts), ternaries 3 (4 pts), boolean chains 3, other 2, error handling 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 8 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createUI (cognitive 21) plugins/saturation/multiband_saturation.js:682— createUI has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 5 (8 pts), loops 2, boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 23 function items inside it that branch (a function literal at line 747, a function literal at line 880, onclick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
decodeTelemetryPacket (cognitive 21) dsp/bindings/js/src/telemetry.js:888— decodeTelemetryPacket has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initializeCorrectionControls (cognitive 21) features/measurement/ui/ui-manager.js:95— initializeCorrectionControls has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 9). Of this number, 11 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createSmoothingSpectrum (cognitive 21) js/pipeline-analyzer/analysis-core.js:496— createSmoothingSpectrum has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (16 pts), boolean chains 2, if/else 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resolverResult (cognitive 21) dsp/bindings/js/src/assets.js:198— resolverResult has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, other 3, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
handleTelemetry (cognitive 21) js/visualizer/visualizer-guitar.js:83— handleTelemetry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 2 (3 pts), loops 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.
solveShape::search (cognitive 21) js/visualizer/visualizer-guitar.js:252— solveShape::search has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openUserDataBackupDialog.applySelection (cognitive 21) js/user-data-backup/dialog.js:281— openUserDataBackupDialog.applySelection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, ternaries 1 (2 pts), error handling 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.
graph-engine.encodeGraphDescriptor (cognitive 20) dsp/bindings/js/src/graph-engine.js:74— graph-engine.encodeGraphDescriptor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5, ternaries 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.
preset.legacyParameters (cognitive 20) dsp/bindings/js/src/preset.js:577— preset.legacyParameters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2, 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.
local-playback-ingress.resolveElectronCueSelection (cognitive 20) electron/local-playback-ingress.cjs:165— local-playback-ingress.resolveElectronCueSelection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 3, error handling 2, ternaries 2 (nesting depth added 2). Of this number, 15 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
browser-controller.createBrowserController.showContextMenu (cognitive 20) electron/browser-controller.cjs:665— browser-controller.createBrowserController.showContextMenu has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 5). Of this number, 17 points are the body's own statements and 3 belong to 2 function 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.
network-music-upnp.requestXml (cognitive 20) electron/network-music-upnp.cjs:113— network-music-upnp.requestXml has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (5 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 5). None of this is in the body itself: all 20 points belong to 4 function literals inside it that branch (lines 127, 117, 115, …). 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.
RemotePairingHost.requestApproval (cognitive 20) electron/remote-pairing.cjs:78— RemotePairingHost.requestApproval has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 4, boolean chains 2, error handling 2, loops 1 (nesting depth added 2). Of this number, 15 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
pipeline-column-manager.partitionColumns (cognitive 20) js/ui/pipeline/pipeline-column-manager.js:355— pipeline-column-manager.partitionColumns has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (9 pts), ternaries 2 (6 pts), if/else 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PipelineSectionHandler.moveSectionDown (cognitive 20) js/ui/pipeline/pipeline-section-handler.js:132— PipelineSectionHandler.moveSectionDown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
text-encoding.getContextScriptsFromTexts (cognitive 20) js/library/metadata/text-encoding.js:242— text-encoding.getContextScriptsFromTexts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 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.
DataStorage.putMeasurement (cognitive 20) features/measurement/dataStorage.js:564— DataStorage.putMeasurement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (5 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
UserDataBackupService.createBackup (cognitive 20) js/user-data-backup/service.js:78— UserDataBackupService.createBackup has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts), loops 2 (3 pts) (nesting depth added 3). Of this number, 13 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
visualizer-sources.analysisSettings (cognitive 20) js/visualizer/visualizer-sources.js:65— visualizer-sources.analysisSettings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8, ternaries 4 (7 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PipelineProcessor.rebuildPipeline (cognitive 20) js/audio/pipeline-processor.js:56— PipelineProcessor.rebuildPipeline has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PowerPolicyController._prepareTemporalStateAndResume (cognitive 20) js/audio/power-policy-controller.js:1507— PowerPolicyController._prepareTemporalStateAndResume has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (7 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
signal-generation.renderPipelineNoise (cognitive 20) features/measurement/audio-utils/signal-generation.js:101— signal-generation.renderPipelineNoise has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (15 pts), boolean chains 2, loops 1 (2 pts), if/else 1 (nesting depth added 8). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 108). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
tsp.generateTspSequence (cognitive 20) js/pipeline-analyzer/tsp.js:30— tsp.generateTspSequence has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 4 (5 pts), ternaries 2 (4 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.
impulse-response-plot.sampleImpulseEnvelope (cognitive 20) features/measurement/ui/impulse-response-plot.js:79— impulse-response-plot.sampleImpulseEnvelope has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
design-utils.processCollisions (cognitive 20) features/measurement/peq-calculator/design-utils.js:14— design-utils.processCollisions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
riff-info.readRiffInfoTagsFromReader (cognitive 20) js/library/metadata/riff-info.js:31— riff-info.readRiffInfoTagsFromReader has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rolling-pcm-protocol.validateRollingPcmEnvelope (cognitive 20) js/ui/audio-player/rolling-pcm-protocol.js:72— rolling-pcm-protocol.validateRollingPcmEnvelope has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 10. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
OnboardingTour.showStep (cognitive 20) js/ui/onboarding-tour.js:109— OnboardingTour.showStep has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, ternaries 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.
scan-state-machine.reduceScanFolderState (cognitive 20) js/library/scan/scan-state-machine.js:29— scan-state-machine.reduceScanFolderState has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2 (4 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.
library-manager-v2.normalizeScanState (cognitive 20) js/library/library-manager-v2.js:727— library-manager-v2.normalizeScanState has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (16 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LibraryView.getPagedQuery (cognitive 20) js/ui/library/library-view.js:1137— LibraryView.getPagedQuery has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PwaDeviceRegistration.open (cognitive 20) js/network-music/pwa-registration.js:48— PwaDeviceRegistration.open has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 6 (8 pts), error handling 2, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 94, 86, 122, …). 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.
PwaNetworkMusicTransport.networkMusicPlayerCommand (cognitive 20) js/network-music/pwa-transport.js:290— PwaNetworkMusicTransport.networkMusicPlayerCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (5 pts), boolean chains 3, 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.
rolling-pcm-worker-entry.fill (cognitive 20) js/ui/audio-player/rolling-pcm-worker-entry.js:174— rolling-pcm-worker-entry.fill has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 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.
OscilloscopePlugin.paintEnvelopeColumns (cognitive 20) plugins/analyzer/oscilloscope.js:887— OscilloscopePlugin.paintEnvelopeColumns has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 5 (7 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EarphoneCableSimPlugin._roots (cognitive 20) plugins/eq/earphone_cable_sim.js:241— EarphoneCableSimPlugin._roots has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 9). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EarphoneCableSimPlugin._pairRoots (cognitive 20) plugins/eq/earphone_cable_sim.js:276— EarphoneCableSimPlugin._pairRoots has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FiveBandPEQPlugin.setUIValues (cognitive 20) plugins/eq/five_band_peq.js:663— FiveBandPEQPlugin.setUIValues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToneControlPlugin.drawGraph (cognitive 20) plugins/eq/tone_control.js:406— ToneControlPlugin.drawGraph has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 6, if/else 4 (5 pts), loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 6 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.
graph-readout.attach.occupiedRects (cognitive 20) plugins/graph-readout.js:383— graph-readout.attach.occupiedRects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VinylSimulatorPlugin._applyPhysicsMeasurements (cognitive 20) plugins/lofi/vinyl_simulator.js:1362— VinylSimulatorPlugin._applyPhysicsMeasurements has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), boolean chains 2, ternaries 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.
SoundFontPlayerPlugin._createMixerKnob (cognitive 20) plugins/others/soundfont_player.js:504— SoundFontPlayerPlugin._createMixerKnob has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3, loops 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 520, end, a function literal at line 540, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
IRReverbPlugin._emitAndStage (cognitive 20) plugins/reverb/ir_reverb.js:619— IRReverbPlugin._emitAndStage has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 8, ternaries 2. Of this number, 13 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SFZInstrumentPlugin._renderInstrumentDetails (cognitive 20) plugins/sfz-instrument.js:460— SFZInstrumentPlugin._renderInstrumentDetails has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, loops 6, if/else 3, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioService.remoteCommand (cognitive 20) android/app/src/main/java/com/frieve/effetune/AudioService.java:910— AudioService.remoteCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
python_golden_runner.run_graph_parity_contracts (cognitive 20) dsp/bindings/acceptance/python_golden_runner.py:995— python_golden_runner.run_graph_parity_contracts has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 4 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
_drawHud (cognitive 20) plugins/saturation/tube_simulator.js:7058— _drawHud has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 3, other 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
writeNetworkOutputFrames (cognitive 20) REDACTED:3546— writeNetworkOutputFrames has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 3 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setPluginAsset (cognitive 20) REDACTED:5262— setPluginAsset has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, ternaries 3 (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.
silentInsert (cognitive 20) REDACTED:7072— silentInsert has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, ternaries 1 (2 pts), loops 1, other 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.
captureSfzRuntimeCheckpoint (cognitive 20) REDACTED:7814— captureSfzRuntimeCheckpoint has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, other 3, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_requestDspModuleLoad (cognitive 20) js/audio-manager.js:823— _requestDspModuleLoad has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, other 3, error handling 2 (nesting depth added 2). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 846, 872, 857, …). 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.
_syncModeDependentControls (cognitive 20) plugins/lofi/cassette_artifacts.js:3359— _syncModeDependentControls has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (7 pts), boolean chains 6, loops 3 (5 pts), if/else 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.
_restoreWorkletCommandState (cognitive 20) js/audio/power-policy-controller.js:2538— _restoreWorkletCommandState has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, ternaries 3, other 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.
_noteDisplayColor (cognitive 20) plugins/analyzer/note_spectrogram.js:611— _noteDisplayColor has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (10 pts), boolean chains 5, other 3, if/else 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
normalizeConfig (cognitive 20) js/room-eq/design-core.js:2323— normalizeConfig has cognitive complexity 20 (threshold 15). Drivers by points: other 11, ternaries 5, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
setRepeatMode (cognitive 20) js/ui/audio-player/playback-manager.js:2452— setRepeatMode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 2 (4 pts), other 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.
updateVideoPresentation (cognitive 20) js/ui/audio-player/audio-player-ui.js:1160— updateVideoPresentation has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), ternaries 1 (2 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.
drawAxisLabels (cognitive 20) plugins/analyzer/spectrum_analyzer.js:1140— drawAxisLabels has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), other 8, ternaries 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
playLibrarySelection (cognitive 20) js/network-music/view.js:801— playLibrarySelection has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (7 pts), if/else 4, other 2 (nesting depth added 2). Of this number, 18 points are the body's own statements and 2 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
parseAnalogMeterFrame (cognitive 20) plugins/analyzer/analog_meter.js:224— parseAnalogMeterFrame has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getMaximumRoutedSilenceStatus (cognitive 20) js/audio/power-policy.js:436— getMaximumRoutedSilenceStatus has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 18, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
updateNetworkMarkerStatus (cognitive 20) js/ui/pipeline/pipeline-item-builder.js:273— updateNetworkMarkerStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, ternaries 3 (4 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.
stopSweepPlayback (cognitive 20) features/measurement/measurement-controller/audio-processing.js:741— stopSweepPlayback has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_bindPreview (cognitive 20) plugins/sfz-instrument.js:646— _bindPreview has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 4, loops 3 (4 pts), other 1, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 20 points belong to 8 function items inside it that branch ((anonymous)::pointerdown, _disposePreview, (anonymous)::end, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_updateWasmAssetState (cognitive 20) js/audio/audio-manager-wasm-assets.js:478— _updateWasmAssetState has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, boolean chains 6, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
isRouteTailSettled (cognitive 20) js/pipeline-analyzer/analysis-core.js:214— isRouteTailSettled has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (7 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
registerLibraryCatalogControlIpc (cognitive 20) electron/library-catalog-host.cjs:669— registerLibraryCatalogControlIpc has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, loops 3 (4 pts), error handling 3 (nesting depth added 2). Of this number, 11 points are the body's own statements and 9 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solveChordShape::search (cognitive 20) js/visualizer/visualizer-guitar.js:312— solveChordShape::search has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (7 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
expandLegacyShortKeyArraysV1 (cognitive 20) dsp/bindings/js/src/preset.js:337— expandLegacyShortKeyArraysV1 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (9 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.
openUserDataBackupDialog.run (cognitive 20) js/user-data-backup/dialog.js:554— openUserDataBackupDialog.run has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (6 pts), boolean chains 3, error handling 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
#resolveSequenceEntrySource (cognitive 20) js/ui/audio-player/catalog-playback-bridge.js:465— #resolveSequenceEntrySource has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (3 pts), boolean chains 2, other 1, ternaries 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
installHooks (cognitive 20) js/remote/remote-control.js:137— installHooks has cognitive complexity 20 (threshold 15). Drivers by points: error handling 7 (12 pts), boolean chains 4, if/else 4 (nesting depth added 5). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 8 function items inside it that branch (persistPresets, a function literal at line 179, updateURL, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
attach.occupiedRects (cognitive 20) plugins/graph-readout.js:383— attach.occupiedRects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoundFontBank.fromBytes (cognitive 19) dsp/bindings/js/src/soundfont.js:75— SoundFontBank.fromBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
soundfont.prepareSoundFont (cognitive 19) dsp/bindings/js/src/soundfont.js:112— soundfont.prepareSoundFont has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 2, loops 2, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-document.graphVisualizationSnapshot (cognitive 19) dsp/bindings/js/src/graph-document.js:410— graph-document.graphVisualizationSnapshot has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10 (19 pts) (nesting depth added 9). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 422, 442). 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.
graph-document.chainDocumentFromGraph (cognitive 19) dsp/bindings/js/src/graph-document.js:510— graph-document.chainDocumentFromGraph has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 2, ternaries 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
midi.normalizeMidiMessage (cognitive 19) dsp/bindings/js/src/midi.js:42— midi.normalizeMidiMessage has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
L16RtpReceiver.emit (cognitive 19) electron/airplay-rtp.cjs:119— L16RtpReceiver.emit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (7 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
file-access.assertPath (cognitive 19) electron/file-access.cjs:44— file-access.assertPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
file-handlers.openPlaybackSelection (cognitive 19) electron/file-handlers.js:104— file-handlers.openPlaybackSelection has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), boolean chains 4, if/else 3 (4 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
library-shared-query.searchSql (cognitive 19) electron/library-shared-query.cjs:161— library-shared-query.searchSql has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PluginPresetStore.readPresets (cognitive 19) js/ui/pipeline/plugin-preset-store.js:33— PluginPresetStore.readPresets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, error handling 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.
PresetManager.getPresets (cognitive 19) js/ui/pipeline/preset-manager.js:67— PresetManager.getPresets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
musicxml-parser.unzipScore (cognitive 19) js/midi/musicxml-parser.js:83— musicxml-parser.unzipScore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 21 (29 pts), boolean chains 9, loops 6 (7 pts), ternaries 1 (2 pts), error handling 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. This shape REPEATS in the file: one other method here (musicxml-parser.unzipScore::extract) 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.
wrd-parser.parseWrd::escape (cognitive 19) js/midi/wrd-parser.js:142— wrd-parser.parseWrd::escape has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 2 (4 pts), boolean chains 3 (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. This shape REPEATS in the file: one other method here (wrd-parser.parseWrd) 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.
DragDropManager.setupPresetItemDragEvents (cognitive 19) js/ui/plugin-list/drag-drop-manager.js:403— DragDropManager.setupPresetItemDragEvents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, ternaries 1 (nesting depth added 2). None of this is in the body itself: all 19 points belong to 9 function literals inside it that branch (lines 512, 461, 495, …). 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.
MultiresSpectrum.process (cognitive 19) plugins/multires-spectrum.js:429— MultiresSpectrum.process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dialog.openUserDataBackupDialog.applySelection (cognitive 19) js/user-data-backup/dialog.js:281— dialog.openUserDataBackupDialog.applySelection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
visualizer-drums-renderer.buildKit::pedal (cognitive 19) js/visualizer/visualizer-drums-renderer.js:122— visualizer-drums-renderer.buildKit::pedal has cognitive complexity 19 (threshold 15). Drivers by points: loops 9 (15 pts), if/else 3 (4 pts) (nesting depth added 7). 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.
PowerPolicyController._handoffPipelineToSilentSource (cognitive 19) js/audio/power-policy-controller.js:2412— PowerPolicyController._handoffPipelineToSilentSource has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AudioActivationCoordinator._activateNow (cognitive 19) js/audio/audio-activation-coordinator.js:188— AudioActivationCoordinator._activateNow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
power-config-store.cloneValue (cognitive 19) js/electron/power-config-store.js:22— power-config-store.cloneValue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OfflineProcessor.applyOfflineRoutingResult (cognitive 19) js/audio/offline-processor.js:1482— OfflineProcessor.applyOfflineRoutingResult has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (9 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AudioManager._registerProcessorsOnWorklet (cognitive 19) js/audio-manager.js:3923— AudioManager._registerProcessorsOnWorklet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app.loadUserSettings (cognitive 19) features/measurement/app.js:720— app.loadUserSettings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
metadata-mapper.getNativeNumber (cognitive 19) js/library/metadata/metadata-mapper.js:488— metadata-mapper.getNativeNumber has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 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.
AudioContextManager.releasePipelineSource (cognitive 19) js/ui/audio-player/audio-context-manager.js:611— AudioContextManager.releasePipelineSource has cognitive complexity 19 (threshold 15). Drivers by points: error handling 6 (10 pts), if/else 5, boolean chains 4 (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.
AndroidPlayerContext.acceptPlayback (cognitive 19) js/android/player-context.js:29— AndroidPlayerContext.acceptPlayback has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 14, if/else 4, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
bulk-operation-protocol.validateBulkOperationStart (cognitive 19) js/library/operations/bulk-operation-protocol.js:44— bulk-operation-protocol.validateBulkOperationStart has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
web-catalog-worker.installWebCatalogWorker::handleMessage (cognitive 19) js/library/repository/web-catalog-worker.js:167— web-catalog-worker.installWebCatalogWorker::handleMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (5 pts), boolean chains 4, error handling 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.
web-catalog-worker.measureWebCatalogMessageBytes::visit (cognitive 19) js/library/repository/web-catalog-worker.js:279— web-catalog-worker.measureWebCatalogMessageBytes::visit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
web-library-services.createWebLibraryServices (cognitive 19) js/library/scan/web-library-services.js:8— web-library-services.createWebLibraryServices has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 4, boolean chains 1, loops 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
PipelineAnalyzerController._handleWorkerMessage (cognitive 19) js/pipeline-analyzer/controller.js:748— PipelineAnalyzerController._handleWorkerMessage has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UIManager.getLocalizedDocPath (cognitive 19) js/ui-manager.js:1500— UIManager.getLocalizedDocPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6 (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.
storage-plan.sfzResidentRanges (cognitive 19) js/sfz/storage-plan.js:25— storage-plan.sfzResidentRanges has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (5 pts), boolean chains 2, 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.
SfzMd5.block (cognitive 19) js/sfz/md5.js:38— SfzMd5.block has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (18 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpectrumAnalyzerPlugin.collectSpectrumLevels (cognitive 19) plugins/analyzer/spectrum_analyzer.js:1210— SpectrumAnalyzerPlugin.collectSpectrumLevels has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginProcessor.observeMidiOwnership (cognitive 19) REDACTED:7709— PluginProcessor.observeMidiOwnership has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
FifteenBandGEQPlugin.drawGraph (cognitive 19) plugins/eq/fifteen_band_geq.js:422— FifteenBandGEQPlugin.drawGraph has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 3). Of this number, 12 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoomEqPlugin._groupDelayLimit (cognitive 19) plugins/eq/room_eq.js:2871— RoomEqPlugin._groupDelayLimit has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 3 (7 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginBase.replayWasmAssetsTo (cognitive 19) REDACTED:816— PluginBase.replayWasmAssetsTo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocumentStore.resolve (cognitive 19) android/app/src/main/java/com/frieve/effetune/DocumentStore.java:192— DocumentStore.resolve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Sonic.findPitchPeriod (cognitive 19) android/app/src/main/java/sonic/Sonic.java:582— Sonic.findPitchPeriod has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validation.validate_chain_document (cognitive 19) dsp/bindings/python/src/effetune/validation.py:457— validation.validate_chain_document has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_createTabbedControls (cognitive 19) plugins/saturation/tube_simulator.js:7351— _createTabbedControls has cognitive complexity 19 (threshold 15). Drivers by points: loops 8 (10 pts), ternaries 4 (9 pts) (nesting depth added 7). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 7490, create, create, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
dspAssetFootprintBytes (cognitive 19) REDACTED:5241— dspAssetFootprintBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 3, other 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executeEntityContextPage (cognitive 19) js/library/repository/catalog-runtime-core.js:1120— executeEntityContextPage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 7, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
setTrackFavorite (cognitive 19) js/library/repository/catalog-runtime-core.js:2359— setTrackFavorite has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2 (3 pts), boolean chains 2, other 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 7 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.
prepareSequencePlaylistSave (cognitive 19) js/library/repository/catalog-runtime-core.js:3105— prepareSequencePlaylistSave has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3129). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
setupAudioElement (cognitive 19) js/ui/audio-player/audio-context-manager.js:2407— setupAudioElement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), other 3, ternaries 3, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity· play (cognitive 19) · ×1
play (cognitive 19) js/ui/audio-player/audio-context-manager.js:2658— play has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
rearmPreparedAutomaticMove (cognitive 19) js/ui/audio-player/audio-context-manager.js:3545— rearmPreparedAutomaticMove has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 9 (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.
loadTrack (cognitive 19) js/ui/audio-player/audio-context-manager.js:3663— loadTrack has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
commitPowerTopologyMutation (cognitive 19) js/audio-manager.js:1144— commitPowerTopologyMutation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 pts), other 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
_sourcesFor (cognitive 19) plugins/eq/room_eq.js:1681— _sourcesFor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, ternaries 4 (5 pts), loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 5 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setParameters (cognitive 19) plugins/lofi/am_radio_simulator.js:1909— setParameters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, ternaries 4 (8 pts), boolean chains 3 (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
artworkClaimMatchesCurrentTrack (cognitive 19) electron/library-catalog-worker.cjs:2134— artworkClaimMatchesCurrentTrack has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 1 (3 pts), other 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.
refreshVideoRotation (cognitive 19) js/ui/audio-player/audio-player-ui.js:1248— refreshVideoRotation has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (4 pts), ternaries 3 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
runDeferredStartupTasks (cognitive 19) js/app.js:728— runDeferredStartupTasks has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 5 (6 pts), boolean chains 5 (nesting depth added 5). Of this number, 16 points are the body's own statements and 3 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateTransferGraphs (cognitive 19) plugins/dynamics/multiband_compressor.js:1141— updateTransferGraphs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), other 5, boolean chains 3, ternaries 2, loops 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 9 belong to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
handleDspSpectrogramTelemetry (cognitive 19) plugins/analyzer/spectrogram.js:494— handleDspSpectrogramTelemetry has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, other 2, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
insertEntries (cognitive 19) js/ui/audio-player/openhome-playback-adapter.js:797— insertEntries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5, boolean chains 4, other 4, ternaries 3 (4 pts), loops 1 (2 pts) (nesting depth added 2). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
createLibraryContainerGrid (cognitive 19) js/network-music/view.js:417— createLibraryContainerGrid has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). Of this number, 15 points are the body's own statements and 4 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateLibraryTrackActions (cognitive 19) js/network-music/view.js:879— updateLibraryTrackActions has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 5, if/else 3 (5 pts), ternaries 3 (5 pts), loops 2, other 2 (nesting depth added 4). Of this number, 18 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.
stagePlaylistImport (cognitive 19) electron/library-service-coordinator.cjs:873— stagePlaylistImport has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), other 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.
scheduleAvailable (cognitive 19) js/ui/audio-player/rolling-pcm-transport.js:812— scheduleAvailable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
#stagePlaylistImport (cognitive 19) js/library/operations/web-library-service-coordinator.js:790— #stagePlaylistImport has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), other 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.
_renderPresetSelection (cognitive 19) plugins/sfz-instrument.js:521— _renderPresetSelection has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 5 (7 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parseDspStereoFieldTelemetryFrame (cognitive 19) plugins/analyzer/stereo_meter.js:364— parseDspStereoFieldTelemetryFrame has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts), loops 2 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
drawMeter::drawField (cognitive 19) plugins/analyzer/stereo_meter.js:640— drawMeter::drawField has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), ternaries 2 (3 pts), other 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.
getAudioDevices (cognitive 19) js/electron/audioIntegration.js:27— getAudioDevices has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (6 pts), error handling 3 (5 pts), if/else 4 (5 pts), boolean chains 3 (nesting depth added 6). Of this number, 12 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getContextTextBonus (cognitive 19) js/library/metadata/text-encoding.js:647— getContextTextBonus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resolveEntityAnchor (cognitive 19) js/library/library-manager-v2.js:344— resolveEntityAnchor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), boolean chains 2, other 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.
playMidi (cognitive 19) js/ui/audio-player/midi-playback.js:499— playMidi has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 7, other 2. Of this number, 10 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
parser.stripComments (cognitive 18) js/sfz/parser.js:93— parser.stripComments has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (6 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MusicServer.subscription (cognitive 18) REDACTED:198— MusicServer.subscription has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
OpenHomeSidecarManager.handleLine (cognitive 18) electron/openhome-sidecar-manager.cjs:316— OpenHomeSidecarManager.handleLine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 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.
main.updateTrayMenuTemplate (cognitive 18) electron/main.js:1231— main.updateTrayMenuTemplate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 5). Of this number, 11 points are the body's own statements and 7 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.
power-topology.analyzeTemporalCapabilities (cognitive 18) js/audio/power-topology.js:343— power-topology.analyzeTemporalCapabilities has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HistoryManager.saveState (cognitive 18) js/ui/pipeline/history-manager.js:135— HistoryManager.saveState has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6 (nesting depth added 3). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wrd-parser.wrdCharacterWidth (cognitive 18) js/midi/wrd-parser.js:8— wrd-parser.wrdCharacterWidth has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SearchManager.filterPlugins (cognitive 18) js/ui/plugin-list/search-manager.js:149— SearchManager.filterPlugins has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 158, 173). 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.
DragDropManager.updateInsertionIndicator (cognitive 18) js/ui/plugin-list/drag-drop-manager.js:153— DragDropManager.updateInsertionIndicator has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mobile-number-keypad.editMobileNumberBuffer (cognitive 18) js/ui/mobile-number-keypad.js:27— mobile-number-keypad.editMobileNumberBuffer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
measurement-model.resolveDisplayedResponse (cognitive 18) features/measurement/measurement-model.js:298— measurement-model.resolveDisplayedResponse has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 4, 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.
adapters.createUserDataBackupAdapter.validateItem (cognitive 18) js/user-data-backup/adapters.js:63— adapters.createUserDataBackupAdapter.validateItem has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7, error handling 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
portable.validateItemShape (cognitive 18) js/user-data-backup/portable.js:113— portable.validateItemShape has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
event-list.describeEvent (cognitive 18) js/midi/event-list.js:55— event-list.describeEvent has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 5, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lyrics.lyricsFromMetadata (cognitive 18) js/library/metadata/lyrics.js:123— lyrics.lyricsFromMetadata has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiMixerDisplay.drawKeyboard (cognitive 18) js/visualizer/visualizer-midi-mixer.js:328— MidiMixerDisplay.drawKeyboard has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
service-worker.handleControl (cognitive 18) extension/service-worker.js:36— service-worker.handleControl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioManager.disableParallelPipelines::releaseParallelGraph (cognitive 18) js/audio-manager.js:4631— AudioManager.disableParallelPipelines::releaseParallelGraph has cognitive complexity 18 (threshold 15). Drivers by points: error handling 7 (8 pts), if/else 4 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WaterfallSurface.keyboardPoint (cognitive 18) features/measurement/ui/waterfall-surface.js:427— WaterfallSurface.keyboardPoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidAssets.synchronize (cognitive 18) js/android/assets.js:15— AndroidAssets.synchronize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, loops 2 (nesting depth added 8). Of this number, 10 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioContextManager.playbackEntriesMatch (cognitive 18) js/ui/audio-player/audio-context-manager.js:2081— AudioContextManager.playbackEntriesMatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
catalog-order-contract.encodeCanonicalSortKey (cognitive 18) js/library/repository/catalog-order-contract.js:36— catalog-order-contract.encodeCanonicalSortKey has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 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.
pipeline-snapshot.buildPipelineAnalyzerSnapshot (cognitive 18) js/pipeline-analyzer/pipeline-snapshot.js:448— pipeline-snapshot.buildPipelineAnalyzerSnapshot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UIManager.parsePipelineState (cognitive 18) js/ui-manager.js:603— UIManager.parsePipelineState has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 622). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RemoteControlDialog.render (cognitive 18) js/remote/remote-control-dialog.js:129— RemoteControlDialog.render has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
ElectronIntegration.showAboutDialog (cognitive 18) js/electron-integration.js:379— ElectronIntegration.showAboutDialog has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 4 (6 pts), boolean chains 3 (nesting depth added 4). Of this number, 13 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
sync-ops.deepEqual (cognitive 18) js/remote/sync-ops.mjs:26— sync-ops.deepEqual has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalInputSources.onKey (cognitive 18) js/midi/local-input-sources.js:121— LocalInputSources.onKey has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ir-preparation.emitPreparedIr (cognitive 18) js/ir-library/ir-preparation.js:444— ir-preparation.emitPreparedIr has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
group-delay-analysis.integrateRoomEqGroupDelayPhase (cognitive 18) js/room-eq/group-delay-analysis.js:355— group-delay-analysis.integrateRoomEqGroupDelayPhase has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 2 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
design-core.consensusDirectPhaseCorrection (cognitive 18) js/room-eq/design-core.js:1307— design-core.consensusDirectPhaseCorrection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 4 (5 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SfzSamplePageProvider.load (cognitive 18) js/sfz/sample-page-provider.js:165— SfzSamplePageProvider.load has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 4 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 3 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.
rolling-pcm-worker-entry.openSource (cognitive 18) js/ui/audio-player/rolling-pcm-worker-entry.js:72— rolling-pcm-worker-entry.openSource has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 8. 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.
PluginProcessor.mutationDiscontinuity (cognitive 18) REDACTED:7012— PluginProcessor.mutationDiscontinuity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 1 (2 pts), match/switch 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
CombFilterPlugin.drawGraph (cognitive 18) plugins/eq/comb_filter.js:321— CombFilterPlugin.drawGraph has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 6 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.
RoomEqAdditionalEqEditor.createUI (cognitive 18) plugins/eq/room_eq.js:204— RoomEqAdditionalEqEditor.createUI has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 5). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 277, now, a function literal at line 240, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AMRadioSimulatorPlugin._applyMeasurements (cognitive 18) plugins/lofi/am_radio_simulator.js:2028— AMRadioSimulatorPlugin._applyMeasurements has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, 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.
HumGeneratorPlugin.setParameters (cognitive 18) plugins/lofi/hum_generator.js:304— HumGeneratorPlugin.setParameters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 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.
SWRadioSimulatorPlugin._applyMeasurements (cognitive 18) plugins/lofi/sw_radio_simulator.js:1754— SWRadioSimulatorPlugin._applyMeasurements has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, 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.
SpatialMapperPlugin.setParameters (cognitive 18) plugins/spatial/spatial_mapper.js:161— SpatialMapperPlugin.setParameters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
index.html.document.addEventListener("keydown") (cognitive 18) streaming/index.html:369— index.html.document.addEventListener("keydown") has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (8 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.
DocumentStore.media (cognitive 18) android/app/src/main/java/com/frieve/effetune/DocumentStore.java:84— DocumentStore.media has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 2, error handling 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.
MidiInput.open (cognitive 18) android/app/src/main/java/com/frieve/effetune/MidiInput.java:53— MidiInput.open has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiMappings.write (cognitive 18) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:365— MidiMappings.write has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (5 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.
Bundle.pack (cognitive 18) dsp/bindings/python/src/effetune/bundle.py:73— Bundle.pack has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 3 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
graph_document.chain_document_from_graph (cognitive 18) dsp/bindings/python/src/effetune/graph_document.py:605— graph_document.chain_document_from_graph has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2, ternaries 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.
presets._expand_legacy_short_key_arrays_v1 (cognitive 18) dsp/bindings/python/src/effetune/presets.py:249— presets._expand_legacy_short_key_arrays_v1 has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (8 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.
normalizeScanLogicalCandidate (cognitive 18) js/library/repository/catalog-runtime-core.js:6439— normalizeScanLogicalCandidate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 6, boolean chains 5, other 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
connectPrivatePipelineSource (cognitive 18) js/ui/audio-player/audio-context-manager.js:427— connectPrivatePipelineSource has cognitive complexity 18 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 5 (7 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
connectToAudioContext (cognitive 18) js/ui/audio-player/audio-context-manager.js:2604— connectToAudioContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resolveProviderTrack (cognitive 18) js/ui/audio-player/audio-context-manager.js:3953— resolveProviderTrack has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 12, boolean chains 2, if/else 1 (2 pts), loops 1, other 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
announceFiniteStreamEnd (cognitive 18) js/ui/audio-player/audio-context-manager.js:5072— announceFiniteStreamEnd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, other 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
invalidateFolderBrowseCaches (cognitive 18) js/ui/library/library-view.js:399— invalidateFolderBrowseCaches has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 5, if/else 4 (5 pts), other 4, ternaries 3, loops 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_getSuspendedTemporalElapsed (cognitive 18) js/audio/power-policy-controller.js:1458— _getSuspendedTemporalElapsed has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (7 pts), if/else 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_enterSuspended (cognitive 18) js/audio/power-policy-controller.js:1826— _enterSuspended has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, error handling 2 (3 pts), ternaries 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
openWebMusicFilePicker (cognitive 18) js/ui-manager.js:1702— openWebMusicFilePicker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, error handling 1 (2 pts), other 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 6 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ensureLibraryManager (cognitive 18) js/ui-manager.js:2122— ensureLibraryManager has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2147, 2129). 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.
startDrag (cognitive 18) js/visualizer/visualizer-editor.js:1493— startDrag has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), ternaries 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_drawTimbreLegend (cognitive 18) plugins/analyzer/note_spectrogram.js:560— _drawTimbreLegend has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (6 pts), other 4, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commitCatalogDestination (cognitive 18) js/ui/audio-player/playback-manager.js:1217— commitCatalogDestination has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, other 3, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
acknowledgeWasmAssetOperation (cognitive 18) REDACTED:659— acknowledgeWasmAssetOperation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, other 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.
onWasmAssetRejected (cognitive 18) plugins/reverb/ir_reverb.js:1693— onWasmAssetRejected has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
setParameters (cognitive 18) plugins/lofi/vinyl_simulator.js:1215— setParameters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, ternaries 4 (7 pts), boolean chains 3 (nesting depth added 3). Of this number, 14 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
drawKeyboard (cognitive 18) plugins/analyzer/spectrogram.js:1165— drawKeyboard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), other 4, boolean chains 3, loops 3, ternaries 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 1 belongs 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.
executeRenderingControl (cognitive 18) js/ui/audio-player/openhome-playback-adapter.js:610— executeRenderingControl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
registerLibraryServiceIpc (cognitive 18) electron/library-service-coordinator.cjs:1299— registerLibraryServiceIpc has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (5 pts), boolean chains 4, error handling 2 (nesting depth added 2). Of this number, 11 points are the body's own statements and 7 belong to 13 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
deriveRollingProductionSelection (cognitive 18) REDACTED:621— deriveRollingProductionSelection has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 13, if/else 4, ternaries 1. Of this number, 17 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
inferRollingFormat (cognitive 18) REDACTED:1020— inferRollingFormat has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, other 3, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_renderPresetSelection (cognitive 18) plugins/others/soundfont_player.js:609— _renderPresetSelection has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 2 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commitPage (cognitive 18) js/ui/library/paged-view-controller.js:128— commitPage has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7, boolean chains 5, if/else 3, other 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
loadFirstPage (cognitive 18) js/ui/library/paged-view-controller.js:352— loadFirstPage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 1 (2 pts), other 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loadViewportOrdinal (cognitive 18) js/ui/library/paged-view-controller.js:535— loadViewportOrdinal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, error handling 1 (2 pts), ternaries 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.
playAndRecordSweep::(anonymous)::onmessage (cognitive 18) features/measurement/measurement-controller/audio-processing.js:390— playAndRecordSweep::(anonymous)::onmessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_pruneWasmAssetStatesForPlugin (cognitive 18) js/audio/audio-manager-wasm-assets.js:51— _pruneWasmAssetStatesForPlugin has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_capturePendingSignedExternalAssetRequests (cognitive 18) js/audio/audio-manager-wasm-assets.js:582— _capturePendingSignedExternalAssetRequests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 3 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.
opcodeFor (cognitive 18) js/sfz/modulation.js:84— opcodeFor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_run (cognitive 18) js/pipeline-analyzer/controller.js:679— _run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getScriptContextBonus (cognitive 18) js/library/metadata/text-encoding.js:618— getScriptContextBonus has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initAudioContext::onstatechange (cognitive 18) js/audio/audio-context-manager.js:188— initAudioContext::onstatechange has cognitive complexity 18 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 6 (8 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resumeAudioContext (cognitive 18) js/audio/audio-context-manager.js:541— resumeAudioContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 5). Of this number, 15 points are the body's own statements and 3 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.
playerState (cognitive 18) REDACTED:292— playerState has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), ternaries 2, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 294). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
(anonymous) (cognitive 18) assets/js/site.js:1— (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
semantics.channelRange (cognitive 17) dsp/bindings/js/src/semantics.js:362— semantics.channelRange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, ternaries 1 (2 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.
assets.prepareIrAsset (cognitive 17) dsp/bindings/js/src/assets.js:594— assets.prepareIrAsset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, ternaries 6 (7 pts), boolean chains 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
file-utils.saveFile (cognitive 17) electron/file-utils.js:24— file-utils.saveFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 3 (7 pts), boolean chains 1, ternaries 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.
file-utils.savePipelineStateToFile (cognitive 17) electron/file-utils.js:86— file-utils.savePipelineStateToFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
remote-client-window.openRemoteClientWindow (cognitive 17) electron/remote-client-window.cjs:56— remote-client-window.openRemoteClientWindow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, error handling 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NetworkMusicHost.sharedContainer (cognitive 17) electron/network-music-host.cjs:533— NetworkMusicHost.sharedContainer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NetworkOutputHost.reconcile (cognitive 17) electron/network-output-host.cjs:494— NetworkOutputHost.reconcile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
library-catalog-worker.resolveImportedTrackFromOrigin (cognitive 17) electron/library-catalog-worker.cjs:2037— library-catalog-worker.resolveImportedTrackFromOrigin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, error handling 2, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
power-topology.getZeroOutputProof (cognitive 17) js/audio/power-topology.js:161— power-topology.getZeroOutputProof has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
dsp-engine-binding.createDspImports (cognitive 17) js/audio/dsp-engine-binding.js:134— dsp-engine-binding.createDspImports has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (fdWrite). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
model.validatePreset (cognitive 17) extension/model.js:59— model.validatePreset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, 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.
StandardSelectManager.position (cognitive 17) js/ui/standard-select.js:281— StandardSelectManager.position has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 7, if/else 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FileProcessor._processFilesWithJSZip (cognitive 17) js/ui/pipeline/file-processor.js:810— FileProcessor._processFilesWithJSZip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SearchManager.filterPresets (cognitive 17) js/ui/plugin-list/search-manager.js:221— SearchManager.filterPresets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 229, 244). 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.
range-precision-controller.installRangePrecisionControl::onPointerMove (cognitive 17) js/ui/range-precision-controller.js:216— range-precision-controller.installRangePrecisionControl::onPointerMove has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
portable.chooseName (cognitive 17) js/user-data-backup/portable.js:263— portable.chooseName has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), loops 1, ternaries 1 (nesting depth added 2). Of this number, 9 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
visualizer-seek-bar.drawSeekBar (cognitive 17) js/visualizer/visualizer-seek-bar.js:1— visualizer-seek-bar.drawSeekBar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 5 (6 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.
VisualizerEditor.onViewportWheel (cognitive 17) js/visualizer/visualizer-editor.js:254— VisualizerEditor.onViewportWheel has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), boolean chains 6, if/else 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtensionEditor.restoreSnapshot (cognitive 17) extension/editor.js:799— ExtensionEditor.restoreSnapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, loops 2 (nesting depth added 1). Of this number, 16 points are the body's own statements and 1 belongs 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.
AudioIOManager.cleanupAudio (cognitive 17) js/audio/audio-io-manager.js:1311— AudioIOManager.cleanupAudio has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 6, loops 1 (2 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.
AudioEncoder.trimTrailingEncodedZeros (cognitive 17) js/audio/audio-encoder.js:228— AudioEncoder.trimTrailingEncodedZeros has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PowerPolicyController._maybeClearStaleManualResumeLatch (cognitive 17) js/audio/power-policy-controller.js:469— PowerPolicyController._maybeClearStaleManualResumeLatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
WebAppConfigRuntime.commitPowerSettings (cognitive 17) js/electron/webSettingsStorage.js:324— WebAppConfigRuntime.commitPowerSettings has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 6 (7 pts), boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 333). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
AudioManager.connectSourceToPipeline (cognitive 17) js/audio-manager.js:4489— AudioManager.connectSourceToPipeline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
interface-calibration.applyInterfaceCalibration (cognitive 17) js/utils/measurement-dsp/interface-calibration.js:54— interface-calibration.applyInterfaceCalibration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 4, ternaries 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
i18n.translateUI (cognitive 17) features/measurement/i18n.js:169— i18n.translateUI has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MeasurementDisplay.displayMeasurementDetails (cognitive 17) features/measurement/ui/measurement-display.js:226— MeasurementDisplay.displayMeasurementDetails has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (4 pts), ternaries 4, loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
catalog-runtime-core.createPlaylistWithItems (cognitive 17) js/library/repository/catalog-runtime-core.js:2541— catalog-runtime-core.createPlaylistWithItems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2573, 2612). 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.
WebCatalogScanRuntime.addFolder (cognitive 17) js/library/scan/web-scan-runtime.js:93— WebCatalogScanRuntime.addFolder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 pts), boolean chains 2, loops 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
result-adapter.impulseSampleIndices (cognitive 17) js/pipeline-analyzer/result-adapter.js:271— result-adapter.impulseSampleIndices has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 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.
NetworkMusicSettings.refresh (cognitive 17) js/network-music/settings-view.js:155— NetworkMusicSettings.refresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sync-ops.applyOps (cognitive 17) js/remote/sync-ops.mjs:122— sync-ops.applyOps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 7). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 127). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RemoteControl.opEdit (cognitive 17) js/remote/remote-control.js:388— RemoteControl.opEdit has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MidiMappingEngine.applyFrame::apply (cognitive 17) js/midi/midi-mapping-engine.js:232— MidiMappingEngine.applyFrame::apply has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), loops 3 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiMappingDialog.renderDevices (cognitive 17) js/midi/midi-mapping-dialog.js:439— MidiMappingDialog.renderDevices has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4, loops 2 (3 pts), boolean chains 1 (nesting depth added 6). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
App.openFeaturePage (cognitive 17) js/app.js:419— App.openFeaturePage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 4 (6 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
dst-source.createDstSource.packet (cognitive 17) js/audio/dsd/dst-source.js:74— dst-source.createDstSource.packet has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 7). 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.
source.openSf2Source (cognitive 17) js/sf2/source.js:6— source.openSf2Source has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server.createServer::musicRequest (cognitive 17) mcp/src/server.mjs:113— server.createServer::musicRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (4 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChromaSpiralPlugin.setParameters (cognitive 17) plugins/analyzer/chroma_spiral.js:98— ChromaSpiralPlugin.setParameters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 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.
PluginProcessor.reconcileDspInstances (cognitive 17) REDACTED:4924— PluginProcessor.reconcileDspInstances has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4, boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audio-processor.createDspImports (cognitive 17) REDACTED:140— audio-processor.createDspImports has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (fdWrite). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TransientShaperPlugin.drawGraph (cognitive 17) plugins/dynamics/transient_shaper.js:291— TransientShaperPlugin.drawGraph has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, loops 3, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
FifteenBandPEQPlugin.setParameters (cognitive 17) plugins/eq/fifteen_band_peq.js:369— FifteenBandPEQPlugin.setParameters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FifteenBandPEQPlugin.calculateBandResponse (cognitive 17) plugins/eq/fifteen_band_peq.js:1087— FifteenBandPEQPlugin.calculateBandResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 2 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FiveBandPEQPlugin.calculateBandResponse (cognitive 17) plugins/eq/five_band_peq.js:810— FiveBandPEQPlugin.calculateBandResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 2 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GroupDelayPEQPlugin.setParameters (cognitive 17) plugins/eq/group_delay_peq.js:204— GroupDelayPEQPlugin.setParameters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, 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.
TonalBalanceEQPlugin._fitDbRange (cognitive 17) plugins/eq/tonal_balance_eq.js:730— TonalBalanceEQPlugin._fitDbRange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (7 pts), loops 1 (2 pts) (nesting depth added 8). Of this number, 13 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AutoFilterPlugin.setParameters (cognitive 17) plugins/modulation/auto_filter.js:276— AutoFilterPlugin.setParameters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HornResonatorPlugin.setParameters (cognitive 17) plugins/resonator/horn_resonator.js:430— HornResonatorPlugin.setParameters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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.
HornResonatorPlusPlugin.setParameters (cognitive 17) plugins/resonator/horn_resonator_plus.js:461— HornResonatorPlusPlugin.setParameters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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.
CrosstalkCancellationPlugin.setParameters (cognitive 17) plugins/spatial/crosstalk_cancellation.js:142— CrosstalkCancellationPlugin.setParameters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AudioService.observePower (cognitive 17) android/app/src/main/java/com/frieve/effetune/AudioService.java:1208— AudioService.observePower has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 6, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioService.remoteStatus (cognitive 17) android/app/src/main/java/com/frieve/effetune/AudioService.java:969— AudioService.remoteStatus has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 2 (5 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MainActivity.onActivityResult (cognitive 17) android/app/src/main/java/com/frieve/effetune/MainActivity.java:380— MainActivity.onActivityResult has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 3 (4 pts), boolean chains 3, error handling 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MidiMappings.consume (cognitive 17) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:131— MidiMappings.consume has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (7 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.
MidiMappings.normalize (cognitive 17) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:391— MidiMappings.normalize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (4 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.
MidiMappings.tick (cognitive 17) android/app/src/main/java/com/frieve/effetune/MidiMappings.java:197— MidiMappings.tick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, 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.
python_golden_runner.supplied_semantic_names (cognitive 17) dsp/bindings/acceptance/python_golden_runner.py:288— python_golden_runner.supplied_semantic_names has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 2 (5 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rejectDspAssetCandidate (cognitive 17) REDACTED:5193— rejectDspAssetCandidate has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 3, ternaries 3, other 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
latencyPlansDiffer (cognitive 17) REDACTED:6466— latencyPlansDiffer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), other 5, boolean chains 3, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commitMidiTransport (cognitive 17) REDACTED:8137— commitMidiTransport has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, other 3, error handling 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
refreshActiveRegionTransportPlan (cognitive 17) js/ui/audio-player/audio-context-manager.js:1038— refreshActiveRegionTransportPlan has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts) (nesting depth added 3). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
getInjectedNativePcmWaveContract (cognitive 17) js/ui/audio-player/audio-context-manager.js:4170— getInjectedNativePcmWaveContract has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, other 6, if/else 2, ternaries 2. Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
teardownCommittedBackendForTransition (cognitive 17) js/ui/audio-player/audio-context-manager.js:5794— teardownCommittedBackendForTransition has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 7, error handling 1 (2 pts), other 1 (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.
_applyWorkletOutputDelays (cognitive 17) js/audio-manager.js:2457— _applyWorkletOutputDelays has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4 (nesting depth added 6). None of this is in the body itself: all 17 points belong to 2 function literals inside it that branch (lines 2468, 2461). 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.
startPagedEntityPlay (cognitive 17) js/ui/library/library-view.js:3024— startPagedEntityPlay has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 3, error handling 2. Of this number, 9 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_recoverAppliedInputRelease (cognitive 17) js/audio/power-policy-controller.js:3338— _recoverAppliedInputRelease has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
_getSnapshotWorkletNodes (cognitive 17) js/audio/power-policy-controller.js:3472— _getSnapshotWorkletNodes has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7, boolean chains 5, other 5. None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 3474). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
setUIBandValues (cognitive 17) plugins/eq/room_eq.js:541— setUIBandValues has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, other 1, ternaries 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
showLibraryView (cognitive 17) js/ui-manager.js:2239— showLibraryView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, other 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handleMidiSnapshot (cognitive 17) plugins/analyzer/rhythm_analyzer.js:164— handleMidiSnapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts), other 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.
lensSummary (cognitive 17) plugins/analyzer/rhythm_analyzer.js:1081— lensSummary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 4 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 3). Of this number, 12 points are the body's own statements and 5 belong to 3 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.
transportNext (cognitive 17) js/ui/audio-player/playback-manager.js:892— transportNext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (4 pts), error handling 2 (3 pts), other 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
#installBulkPlayProvisional (cognitive 17) js/ui/audio-player/playback-manager.js:1079— #installBulkPlayProvisional has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, error handling 2, other 2, ternaries 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
createPlayerUI::seek (cognitive 17) js/ui/audio-player/audio-player-ui.js:624— createPlayerUI::seek has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scheduleDesktopArtworkSwap (cognitive 17) js/ui/audio-player/audio-player-ui.js:981— scheduleDesktopArtworkSwap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, other 1 (nesting depth added 1). Of this number, 11 points are the body's own statements and 6 belong to 7 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
exportMeasurementToJSON (cognitive 17) features/measurement/dataStorage.js:1236— exportMeasurementToJSON has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 2 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.
connectAudioNodes (cognitive 17) js/audio/audio-io-manager.js:839— connectAudioNodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 4 (5 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.
updateLibraryNavCounts (cognitive 17) js/network-music/view.js:361— updateLibraryNavCounts has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 4, if/else 3 (4 pts), ternaries 2 (4 pts), error handling 1 (2 pts), loops 2, other 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 367, 371, 367, …). 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.
requestFolderAccess (cognitive 17) electron/library-catalog-scan-runtime.cjs:176— requestFolderAccess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 2 (4 pts), ternaries 3, boolean chains 2, error handling 1 (2 pts) (nesting depth added 4). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
resolvePlaybackSource (cognitive 17) electron/library-catalog-scan-runtime.cjs:502— resolvePlaybackSource has cognitive complexity 17 (threshold 15). Drivers by points: other 7, if/else 4 (6 pts), error handling 2, boolean chains 1, ternaries 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createApplicationMenuTemplate (cognitive 17) electron/ipc-handlers.js:338— createApplicationMenuTemplate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, error handling 5, boolean chains 4. None of this is in the body itself: all 17 points belong to 44 function items inside it that branch (click, click, click, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
constructor (cognitive 17) electron/network-music-host.cjs:27— constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 3, ternaries 3, boolean chains 2, error handling 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 66, getCatalog, resolveSource, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
resolveSequenceEntrySource (cognitive 17) js/library/operations/web-library-service-coordinator.js:378— resolveSequenceEntrySource has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 1 (2 pts), other 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_updateMidiMetering (cognitive 17) plugins/others/soundfont_player.js:261— _updateMidiMetering has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
itemPalette (cognitive 17) js/visualizer/visualizer-model.js:629— itemPalette has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (7 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.
drawText (cognitive 17) js/visualizer/visualizer-analyzer-display.js:744— drawText has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 4, if/else 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateTransferGraphs (cognitive 17) plugins/saturation/multiband_saturation.js:539— updateTransferGraphs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), other 4, loops 3, ternaries 2, boolean chains 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 550, 636). 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.
updateSweepFreqLimits (cognitive 17) features/measurement/app.js:861— updateSweepFreqLimits has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), loops 3 (4 pts), if/else 2 (3 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.
_ensureSwitchTelemetrySubscription (cognitive 17) plugins/sfz-instrument.js:423— _ensureSwitchTelemetrySubscription has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4, other 2. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 438, 445, 444). 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.
handleTelemetry (cognitive 17) plugins/analyzer/pitch_meter.js:330— handleTelemetry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
sfzModulationFootprint (cognitive 17) js/sfz/modulation.js:510— sfzModulationFootprint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 2 belong to 12 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.
updateMiniPlayer (cognitive 17) js/ui/mobile-nav.js:521— updateMiniPlayer has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 2 (4 pts), other 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
site.getLocalizablePageInfo (cognitive 16) assets/js/site.js:684— site.getLocalizablePageInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preset.expandLegacyObjectArrayV1 (cognitive 16) dsp/bindings/js/src/preset.js:370— preset.expandLegacyObjectArrayV1 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
embedded-sample.embeddedSfzRanges (cognitive 16) js/sfz/embedded-sample.js:3— embedded-sample.embeddedSfzRanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
embedded-sample.decodeEmbeddedSfzSample (cognitive 16) js/sfz/embedded-sample.js:26— embedded-sample.decodeEmbeddedSfzSample has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parser.parseSf2.chunks (cognitive 16) js/sf2/parser.js:35— parser.parseSf2.chunks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shortcuts.browserShortcut (cognitive 16) js/browser/shortcuts.js:1— shortcuts.browserShortcut has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
remote-static-server.parseAllowedHost (cognitive 16) electron/remote-static-server.cjs:45— remote-static-server.parseAllowedHost has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Discovery.search (cognitive 16) electron/network-music-upnp.cjs:237— Discovery.search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenHomeMediaGateway.handleRequest (cognitive 16) REDACTED:168— OpenHomeMediaGateway.handleRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LiveStream.feedback (cognitive 16) REDACTED:174— LiveStream.feedback has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4, ternaries 4. Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ir-library-store.validateEntry (cognitive 16) js/ir-library/ir-library-store.js:88— ir-library-store.validateEntry has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
range-fill.updateRangeFill (cognitive 16) js/ui/range-fill.js:41— range-fill.updateRangeFill has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 2, if/else 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.
text-encoding.repairLegacyMetadataMojibake (cognitive 16) js/library/metadata/text-encoding.js:86— text-encoding.repairLegacyMetadataMojibake has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, 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.
TelemetryHub.handleMessage (cognitive 16) js/audio/telemetry-hub.js:316— TelemetryHub.handleMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 4, ternaries 4, error handling 1. Of this number, 9 points are the body's own statements and 7 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.
output-routing.prepareMeasurementOutputRoute (cognitive 16) features/measurement/audio-utils/output-routing.js:155— output-routing.prepareMeasurementOutputRoute has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), error handling 1 (2 pts), ternaries 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FFT.transform (cognitive 16) js/utils/measurement-dsp/fft.js:62— FFT.transform has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 1 (4 pts), boolean chains 3, ternaries 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.
measurement-model.collectCalibrationIrCandidates (cognitive 16) features/measurement/measurement-model.js:258— measurement-model.collectCalibrationIrCandidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), boolean chains 2, 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.
VisualizerSources._publish (cognitive 16) js/visualizer/visualizer-sources.js:236— VisualizerSources._publish has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), if/else 3 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MidiMixerDisplay.patchName (cognitive 16) js/visualizer/visualizer-midi-mixer.js:155— MidiMixerDisplay.patchName has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebAppConfigRuntime.publishSnapshot (cognitive 16) js/electron/webSettingsStorage.js:242— WebAppConfigRuntime.publishSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioManager._runDspOutputTransition::execute (cognitive 16) js/audio-manager.js:1412— AudioManager._runDspOutputTransition::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (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.
TestPluginManager.loadPlugins (cognitive 16) features/effetune_bench.html:645— TestPluginManager.loadPlugins has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 657, 695). 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.
effetune_bench.html.window.addEventListener("load") (cognitive 16) features/effetune_bench.html:1184— effetune_bench.html.window.addEventListener("load") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1206, 1221, 1203). 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.
AudioUtils.initializeResources (cognitive 16) features/measurement/audio-utils/core.js:100— AudioUtils.initializeResources has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 7, boolean chains 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalysisPlot.renderImage (cognitive 16) features/measurement/ui/analysis-plot.js:192— AnalysisPlot.renderImage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 3 (6 pts), boolean chains 2, loops 2 (nesting depth added 4). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BrowserInputController.install (cognitive 16) js/audio/browser-input-controller.js:64— BrowserInputController.install has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3, boolean chains 2, error handling 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioPlayerUI.mountContainerForLayout (cognitive 16) js/ui/audio-player/audio-player-ui.js:693— AudioPlayerUI.mountContainerForLayout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioPlayer.loadFiles (cognitive 16) js/ui/audio-player.js:155— AudioPlayer.loadFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4 (nesting depth added 5). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
catalog-runtime-core.validateCueDirectoryStageSheet (cognitive 16) js/library/repository/catalog-runtime-core.js:4958— catalog-runtime-core.validateCueDirectoryStageSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 7). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 4961). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
playlist-stream.linesFromChunks (cognitive 16) js/library/playlists/playlist-stream.js:263— playlist-stream.linesFromChunks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DurableActionController.#attach (cognitive 16) js/ui/library/durable-action-controller.js:143— DurableActionController.#attach has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 7. Of this number, 11 points are the body's own statements and 5 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.
LibraryView.loadUIState (cognitive 16) js/ui/library/library-view.js:577— LibraryView.loadUIState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MeasurementStore.getImpulseResponses (cognitive 16) js/measurement-store/client.js:180— MeasurementStore.getImpulseResponses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 13 points are the body's own statements and 3 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.
NetworkMusicSettings.mount (cognitive 16) js/network-music/settings-view.js:59— NetworkMusicSettings.mount has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). Of this number, 10 points are the body's own statements and 6 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.
UIManager.initKeyboardShortcuts (cognitive 16) js/ui-manager.js:2946— UIManager.initKeyboardShortcuts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, match/switch 1 (nesting depth added 2). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 2947). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RemoteControl.handleRequest (cognitive 16) js/remote/remote-control.js:214— RemoteControl.handleRequest has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, error handling 3, if/else 2 (nesting depth added 3). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParamAdapter.apply (cognitive 16) js/midi/param-adapter.js:97— ParamAdapter.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MidiMappingDialog.populateParameterSelect (cognitive 16) js/midi/midi-mapping-dialog.js:639— MidiMappingDialog.populateParameterSelect has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 3 (4 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). Of this number, 14 points are the body's own statements and 2 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.
design-core.designGroupDelayFilter (cognitive 16) js/group-delay-eq/design-core.js:175— design-core.designGroupDelayFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 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.
design-core.normalizeBands (cognitive 16) js/group-delay-peq/design-core.js:133— design-core.normalizeBands has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 3 (6 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.
design-core.designGroupDelayPeqFilter (cognitive 16) js/group-delay-peq/design-core.js:274— design-core.designGroupDelayPeqFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 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.
group-delay-analysis.smoothRoomEqGroupDelayRuns (cognitive 16) js/room-eq/group-delay-analysis.js:110— group-delay-analysis.smoothRoomEqGroupDelayRuns has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (11 pts), boolean chains 3, if/else 1 (2 pts) (nesting depth added 7). 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.
group-delay-analysis.analyzeRoomEqGroupDelay (cognitive 16) js/room-eq/group-delay-analysis.js:156— group-delay-analysis.analyzeRoomEqGroupDelay has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4, boolean chains 2, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
design-core.verifySynthesis (cognitive 16) js/room-eq/design-core.js:1547— design-core.verifySynthesis has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NoteSpectrogramPlugin._layoutTimbreLegend (cognitive 16) plugins/analyzer/note_spectrogram.js:534— NoteSpectrogramPlugin._layoutTimbreLegend has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (5 pts), boolean chains 4, 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.
SpectrumAnalyzerPlugin.getSpectrumBinColumns (cognitive 16) plugins/analyzer/spectrum_analyzer.js:1173— SpectrumAnalyzerPlugin.getSpectrumBinColumns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginProcessor.captureExecutionLatencySnapshot (cognitive 16) REDACTED:5936— PluginProcessor.captureExecutionLatencySnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginProcessor.wasmOnlyExecutionState (cognitive 16) REDACTED:7165— PluginProcessor.wasmOnlyExecutionState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
audio-processor.encodeWorkletDspChannelSpec (cognitive 16) REDACTED:2507— audio-processor.encodeWorkletDspChannelSpec has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PowerAmpSagPlugin.setParameters (cognitive 16) plugins/dynamics/power_amp_sag.js:374— PowerAmpSagPlugin.setParameters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (6 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.
SubSynthPlugin.drawGraph (cognitive 16) plugins/saturation/sub_synth.js:433— SubSynthPlugin.drawGraph has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 3, if/else 3, loops 2 (nesting depth added 3). Of this number, 9 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TubeSimulatorPlugin._hudStatusText (cognitive 16) plugins/saturation/tube_simulator.js:6955— TubeSimulatorPlugin._hudStatusText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CrosstalkCancellationPlugin._getMeasurementStore (cognitive 16) plugins/spatial/crosstalk_cancellation.js:223— CrosstalkCancellationPlugin._getMeasurementStore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 1 (3 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.
chain._effect_channels (cognitive 16) dsp/bindings/python/src/effetune/chain.py:188— chain._effect_channels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph_document.graph_document_from_chain (cognitive 16) dsp/bindings/python/src/effetune/graph_document.py:538— graph_document.graph_document_from_chain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
soundfont._parse (cognitive 16) dsp/bindings/python/src/effetune/soundfont.py:76— soundfont._parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
telemetry._decode_note_spectrogram (cognitive 16) dsp/bindings/python/src/effetune/telemetry.py:782— telemetry._decode_note_spectrogram has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
python_golden_runner.discover_cases (cognitive 16) dsp/bindings/acceptance/python_golden_runner.py:46— python_golden_runner.discover_cases has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resolveCuePlaylistTrack (cognitive 16) js/library/repository/catalog-runtime-core.js:3466— resolveCuePlaylistTrack has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 4 (5 pts), ternaries 4, other 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
handleTrackEnded (cognitive 16) js/ui/audio-player/audio-context-manager.js:3486— handleTrackEnded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, other 1, ternaries 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.
schedulePreparedRollingTransition (cognitive 16) js/ui/audio-player/audio-context-manager.js:4884— schedulePreparedRollingTransition has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 4, other 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
samePlaybackEntry (cognitive 16) js/ui/audio-player/audio-context-manager.js:6464— samePlaybackEntry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, other 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
render (cognitive 16) js/ui/library/library-view.js:1017— render has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
capturePagedAnchor (cognitive 16) js/ui/library/library-view.js:2274— capturePagedAnchor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6, boolean chains 5, if/else 3, other 2. Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
renderPagedStatusContent (cognitive 16) js/ui/library/library-view.js:3581— renderPagedStatusContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, other 2 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
applyLibraryRecoveryState (cognitive 16) js/ui-manager.js:1987— applyLibraryRecoveryState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (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.
parseChordKeyTelemetryFrame (cognitive 16) plugins/analyzer/note_spectrogram.js:451— parseChordKeyTelemetryFrame has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 3. Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
getContext (cognitive 16) js/library/repository/web-sqlite-runtime.js:1593— getContext has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 3, ternaries 1 (3 pts), other 2 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resolvePlaylistEntryRelativePath (cognitive 16) js/library/repository/web-sqlite-runtime.js:2136— resolvePlaylistEntryRelativePath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 1, loops 1, other 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_getWasmAssetRevisionDescriptor (cognitive 16) REDACTED:494— _getWasmAssetRevisionDescriptor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, loops 1 (2 pts), other 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_normalizeWasmAssetDescriptor (cognitive 16) REDACTED:696— _normalizeWasmAssetDescriptor has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, other 6, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
applyArtwork (cognitive 16) js/ui/audio-player/audio-player-ui.js:1132— applyArtwork has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getHeatmapLuts (cognitive 16) plugins/analyzer/spectrogram.js:945— getHeatmapLuts has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (6 pts), ternaries 2 (5 pts), if/else 2 (4 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.
playClassifiedLive (cognitive 16) js/ui/audio-player/openhome-playback-adapter.js:1239— playClassifiedLive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (nesting depth added 3). Of this number, 12 points are the body's own statements and 4 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
enumerateDirectory (cognitive 16) electron/library-catalog-scan-runtime.cjs:895— enumerateDirectory has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), error handling 2 (3 pts), loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
acceptScopeSnapshot (cognitive 16) plugins/analyzer/oscilloscope.js:842— acceptScopeSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), ternaries 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
drawTransferCurve (cognitive 16) plugins/lofi/dsd64_imd_simulator.js:896— drawTransferCurve has cognitive complexity 16 (threshold 15). Drivers by points: other 5, if/else 3 (4 pts), loops 3, ternaries 3, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
browseLocal (cognitive 16) electron/network-music-host.cjs:178— browseLocal has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), other 2, loops 1, ternaries 1 (nesting depth added 1). Of this number, 11 points are the body's own statements and 5 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.
normalizeConfiguration (cognitive 16) electron/network-output-host.cjs:58— normalizeConfiguration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 66). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
setDelay (cognitive 16) electron/network-output-host.cjs:102— setDelay has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 5 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateRoute (cognitive 16) electron/network-output-host.cjs:323— updateRoute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
normalizeLayout (cognitive 16) js/visualizer/visualizer-model.js:665— normalizeLayout has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, boolean chains 5, if/else 2. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 672, 668). 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.
_updateResponsePaths (cognitive 16) plugins/eq/five_band_fir_peq.js:1176— _updateResponsePaths has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), loops 3 (5 pts), boolean chains 3, if/else 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawSignal (cognitive 16) js/visualizer/visualizer-analyzer-display.js:647— drawSignal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
displayMeasurementPoints (cognitive 16) features/measurement/ui/measurement-display.js:494— displayMeasurementPoints has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (5 pts), ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 520, 556, 513, …). 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.
decodeNoteChordKey (cognitive 16) dsp/bindings/js/src/telemetry.js:373— decodeNoteChordKey has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
processRecordedBuffer (cognitive 16) features/measurement/measurement-controller/audio-processing.js:658— processRecordedBuffer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (3 pts), boolean chains 1, other 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch ((anonymous)::finish, a function literal at line 676, (anonymous)::onmessage, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_syncWasmAssetMembership (cognitive 16) js/audio/audio-manager-wasm-assets.js:273— _syncWasmAssetMembership has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (3 pts), boolean chains 2, loops 2, other 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.
constructor (cognitive 16) js/pipeline-analyzer/controller.js:211— constructor has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, ternaries 3, if/else 1. Of this number, 15 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
normalizeFormat (cognitive 16) dsp/bindings/js/src/assets.js:386— normalizeFormat has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), loops 2 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
captureMidiCheckpoints::(anonymous)::finish (cognitive 16) js/ui/audio-player/midi-playback.js:260— captureMidiCheckpoints::(anonymous)::finish has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (2 pts), other 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.
storeSfzRuntimeCheckpoints (cognitive 16) js/audio/audio-manager-sfz-runtime.js:112— storeSfzRuntimeCheckpoints has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 2 (3 pts), other 2, ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sfzModulationTarget (cognitive 16) js/sfz/modulation-schema.js:342— sfzModulationTarget has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 8). 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.
appendSaveSegments (cognitive 16) js/ui/audio-player/catalog-playback-bridge.js:635— appendSaveSegments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1, other 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.
Change coupling: app.js ↔ pipeline-manager.js js/app.js:1— `js/app.js` and `js/ui/pipeline-manager.js` change together 50% of the time (7 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 7 shared commits counted here, the most recent 3 are `12d03544` Add A/B switching comparison function for pipelines; `d6ec795d` Fix; `dbc504c8` Build for Mac and Linux — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) android/app/src/main/java/sonic/Sonic.java:363— android/app/src/main/java/sonic/Sonic.java:363-380 | android/app/src/main/java/sonic/Sonic.java:409-426 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) android/app/src/main/java/sonic/Sonic.java:811— android/app/src/main/java/sonic/Sonic.java:811-825 | android/app/src/main/java/sonic/Sonic.java:833-848 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) android/app/src/main/java/sonic/Sonic.java:957— android/app/src/main/java/sonic/Sonic.java:957-970 | android/app/src/main/java/sonic/Sonic.java:983-996 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) android/app/src/main/java/sonic/Sonic.java:294— android/app/src/main/java/sonic/Sonic.java:294-304 | android/app/src/main/java/sonic/Sonic.java:310-321 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (11 lines × 2) android/app/src/main/java/sonic/Sonic.java:364— android/app/src/main/java/sonic/Sonic.java:364-374 | android/app/src/main/java/sonic/Sonic.java:410-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `android/app/src/main/java/sonic/Sonic.java:364` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (52–53 lines × 2) dsp/bindings/python/src/effetune/chain.py:481— dsp/bindings/python/src/effetune/chain.py:481-533 | dsp/bindings/python/src/effetune/graph.py:352-403 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dsp/bindings/python/src/effetune/chain.py:481` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) dsp/bindings/python/src/effetune/graph_document.py:718— dsp/bindings/python/src/effetune/graph_document.py:718-736 | dsp/bindings/python/src/effetune/graph_document.py:748-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–11 lines × 2) dsp/bindings/python/src/effetune/chain.py:535— dsp/bindings/python/src/effetune/chain.py:535-545 | dsp/bindings/python/src/effetune/graph.py:405-412 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8–9 lines × 2) dsp/bindings/python/src/effetune/graph_document.py:483— dsp/bindings/python/src/effetune/graph_document.py:483-490 | dsp/bindings/python/src/effetune/graph_document.py:506-514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dsp/bindings/python/src/effetune/graph_document.py:483` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) tools/rhythm-analyzer/numeric.py:78— tools/rhythm-analyzer/numeric.py:78-90 | tools/rhythm-analyzer/numeric.py:95-110 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (8 lines × 2) tools/rhythm-analyzer/numeric.py:121— tools/rhythm-analyzer/numeric.py:121-128 | tools/rhythm-analyzer/numeric.py:130-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplication concentrated across 10 sibling directories (218 clone groups) js/audio/dsp-engine-binding.js:944— 218 duplicated blocks under the repository root have copies in at least two of the sibling directories dsp, electron, experiments, extension, features, js (+4 more sibling(s) not listed) — 164 of them are reported below, and 54 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 218 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 218 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 218 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.
Duplication concentrated across 14 sibling directories (169 clone groups) plugins/basics/fir_crossover.js:97— 169 duplicated blocks under plugins/ have copies in at least two of the sibling directories analyzer, basics, control, delay, dynamics, eq (+8 more sibling(s) not listed) — 111 of them are reported below, and 58 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 169 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 169 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 169 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.
Duplication concentrated across 21 sibling directories (62 clone groups) js/group-delay-eq/design-core.js:141— 62 duplicated blocks under js/ have copies in at least two of the sibling directories android, audio, bass-management, browser, crosstalk-cancellation, electron (+15 more sibling(s) not listed) — 44 of them are reported below, and 18 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 62 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 62 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 62 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.
Duplication concentrated across 6 sibling directories (9 clone groups) js/library/operations/web-library-service-coordinator.js:401— 9 duplicated blocks under js/library/ have copies in at least two of the sibling directories artwork, metadata, operations, playlists, repository, scan — 8 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 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.
Duplication concentrated across 2 sibling directories (7 clone groups) js/ui/audio-player/audio-player-ui.js:1927— 7 duplicated blocks under js/ui/ have copies in at least two of the sibling directories audio-player, library — 6 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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.
Wholesale file copy (557 identical lines × 2 files) plugins/dynamics/multiband_compressor.js:8— plugins/dynamics/multiband_compressor.js:8 · plugins/dynamics/multiband_expander.js:8 — these 2 files are line-for-line copies of one another — 557 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.
Duplicated block (434 lines × 2 locations) js/audio/dsp-engine-binding.js:944— js/audio/dsp-engine-binding.js:944 · REDACTED:950 — 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 (414 lines × 2 locations) js/audio/dsp-engine-binding.js:207— js/audio/dsp-engine-binding.js:207 · REDACTED:213 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (331 matched lines × 2 locations) · ×1
Duplicated block with local edits (331 matched lines × 2 locations) plugins/basics/fir_crossover.js:97— plugins/basics/fir_crossover.js:97 · plugins/eq/five_band_fir_peq.js:107 — the two spans are one implementation copied and then locally edited — 2048 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 (316 matched lines × 2 locations) · ×1
Duplicated block with local edits (316 matched lines × 2 locations) electron/library-service-coordinator.cjs:565— electron/library-service-coordinator.cjs:565 · js/library/operations/web-library-service-coordinator.js:436 — the two spans are one implementation copied and then locally edited — 2017 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 (310 matched lines × 2 locations) · ×1
Duplicated block with local edits (310 matched lines × 2 locations) plugins/dynamics/auto_leveler.js:26— plugins/dynamics/auto_leveler.js:26 · plugins/dynamics/transient_shaper.js:18 — the two spans are one implementation copied and then locally edited — 2279 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 (301 lines × 2 locations) js/midi/smf-scheduler.js:109— js/midi/smf-scheduler.js:109 · REDACTED:1647 — 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.
Wholesale file copy (284 identical lines × 2 files) plugins/dynamics/compressor.js:6— plugins/dynamics/compressor.js:6 · plugins/dynamics/expander.js:6 — these 2 files are line-for-line copies of one another — 284 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.
Wholesale file copy (272 identical lines × 2 files) plugins/dynamics/compressor.js:6— plugins/dynamics/compressor.js:6 · plugins/dynamics/gate.js:6 — these 2 files are line-for-line copies of one another — 272 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.
Wholesale file copy (228 identical lines × 3 files) plugins/eq/band_pass_filter.js:250— plugins/eq/band_pass_filter.js:250 · plugins/eq/hi_pass_filter.js:318 · plugins/eq/lo_pass_filter.js:318 — these 3 files are line-for-line copies of one another — 228 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 with local edits (214 matched lines × 2 locations) · ×1
Duplicated block with local edits (214 matched lines × 2 locations) plugins/dynamics/auto_leveler.js:320— plugins/dynamics/auto_leveler.js:320 · plugins/dynamics/power_amp_sag.js:243 — the two spans are one implementation copied and then locally edited — 1485 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 (165 matched lines × 2 locations) · ×1
Duplicated block with local edits (165 matched lines × 2 locations) plugins/eq/five_band_peq.js:416— plugins/eq/five_band_peq.js:416 · plugins/eq/room_eq.js:224 — the two spans are one implementation copied and then locally edited — 1360 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 (159 lines × 2 locations) electron/library-catalog-worker.cjs:3— electron/library-catalog-worker.cjs:3 · electron/library-catalog-worker.cjs:518 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
Duplicated block (145 lines × 2 locations) electron/library-catalog-worker.cjs:310— electron/library-catalog-worker.cjs:310 · js/library/repository/web-sqlite-runtime.js:409 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (144 lines × 2 locations) js/midi/smf-scheduler.js:460— js/midi/smf-scheduler.js:460 · REDACTED:1998 — 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 (144 matched lines × 2 locations) · ×1
Duplicated block with local edits (144 matched lines × 2 locations) plugins/saturation/harmonic_distortion.js:148— plugins/saturation/harmonic_distortion.js:148 · plugins/saturation/saturation.js:123 — the two spans are one implementation copied and then locally edited — 1228 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 (143 lines × 2 locations) plugins/eq/group_delay_eq.js:183— plugins/eq/group_delay_eq.js:183 · plugins/eq/group_delay_peq.js:269 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (130 lines × 2 locations) electron/library-catalog-worker.cjs:172— electron/library-catalog-worker.cjs:172 · js/library/repository/web-sqlite-runtime.js:274 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (127 lines × 2 locations) plugins/restoration/click_remover.js:29— plugins/restoration/click_remover.js:29 · plugins/restoration/clip_restorer.js:29 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication· Duplicated block with local edits (118 matched lines × 2 locations) · ×1
Duplicated block with local edits (118 matched lines × 2 locations) electron/library-artwork-worker-pool.cjs:8— electron/library-artwork-worker-pool.cjs:8 · electron/library-metadata-worker-pool.cjs:9 — the two spans are one implementation copied and then locally edited — 993 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 (117 lines × 2 locations) js/audio/dsp-engine-binding.js:1— js/audio/dsp-engine-binding.js:1 · REDACTED: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.
Duplicated block (113 lines × 2 locations) plugins/basics/channel_divider.js:937— plugins/basics/channel_divider.js:937 · plugins/eq/band_pass_filter.js:497 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (111 matched lines × 2 locations) · ×1
Duplicated block with local edits (111 matched lines × 2 locations) plugins/analyzer/level_meter.js:137— plugins/analyzer/level_meter.js:137 · plugins/basics/multi_channel_panel.js:632 — the two spans are one implementation copied and then locally edited — 670 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 (100 lines × 2 locations) plugins/dynamics/expander.js:776— plugins/dynamics/expander.js:776 · plugins/dynamics/gate.js:846 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (97 lines × 2 locations) js/group-delay-eq/design-core.js:141— js/group-delay-eq/design-core.js:141 · js/group-delay-peq/design-core.js:240 — 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 (97 matched lines × 2 locations) · ×1
Duplicated block with local edits (97 matched lines × 2 locations) js/ui/audio-player/playback-sequence.js:105— js/ui/audio-player/playback-sequence.js:105 · js/ui/audio-player/playback-sequence.js:336 — the two spans are one implementation copied and then locally edited — 744 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 (95 matched lines × 2 locations) · ×1
Duplicated block with local edits (95 matched lines × 2 locations) dsp/bindings/js/src/telemetry.js:107— dsp/bindings/js/src/telemetry.js:107 · plugins/analyzer/oscilloscope.js:697 — the two spans are one implementation copied and then locally edited — 862 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 (92 matched lines × 2 locations) · ×1
Duplicated block with local edits (92 matched lines × 2 locations) plugins/eq/fifteen_band_peq.js:18— plugins/eq/fifteen_band_peq.js:18 · plugins/eq/five_band_peq.js:8 — the two spans are one implementation copied and then locally edited — 921 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 (91 lines × 2 locations) js/audio/dsp-engine-binding.js:672— js/audio/dsp-engine-binding.js:672 · REDACTED:678 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (86 lines × 2 locations) electron/library-catalog-worker.cjs:1842— electron/library-catalog-worker.cjs:1842 · js/library/repository/web-sqlite-runtime.js:1908 — 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 (83 lines × 2 locations) electron/library-catalog-worker.cjs:1431— electron/library-catalog-worker.cjs:1431 · js/library/repository/web-sqlite-runtime.js:1374 — 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 (82 lines × 2 locations) plugins/eq/tilt_eq.js:369— plugins/eq/tilt_eq.js:369 · plugins/eq/tone_control.js:371 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (80 lines × 2 locations) plugins/lofi/am_radio_simulator.js:2030— plugins/lofi/am_radio_simulator.js:2030 · plugins/lofi/sw_radio_simulator.js:1756 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Complex function compileRegion (cyclomatic 231, cognitive 369) js/sfz/modulation.js:127— compileRegion has cyclomatic complexity 231 and cognitive complexity 369; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function processPipeline (cyclomatic 227, cognitive 486) REDACTED:8315— processPipeline has cyclomatic complexity 227 and cognitive complexity 486; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handleWorkletMessage (cyclomatic 181, cognitive 218) js/audio-manager.js:2619— handleWorkletMessage has cyclomatic complexity 181 and cognitive complexity 218; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseMusicXml (cyclomatic 149, cognitive 388) js/midi/musicxml-parser.js:156— parseMusicXml has cyclomatic complexity 149 and cognitive complexity 388; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function packSfzAsset (cyclomatic 140, cognitive 183) js/sfz/asset.js:137— packSfzAsset has cyclomatic complexity 140 and cognitive complexity 183; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function typeOf (cyclomatic 128, cognitive 188) js/sfz/script-compiler.js:430— typeOf has cyclomatic complexity 128 and cognitive complexity 188; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawFrame (cyclomatic 115, cognitive 189) js/visualizer/visualizer-renderer.js:130— drawFrame has cyclomatic complexity 115 and cognitive complexity 189; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rebindCurrentPlayback (cyclomatic 113, cognitive 155) js/ui/audio-player/audio-context-manager.js:1407— rebindCurrentPlayback has cyclomatic complexity 113 and cognitive complexity 155; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseSmf (cyclomatic 110, cognitive 202) js/midi/smf-parser.js:47— parseSmf has cyclomatic complexity 110 and cognitive complexity 202; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function applyPortMessage (cyclomatic 110, cognitive 136) REDACTED:2992— applyPortMessage has cyclomatic complexity 110 and cognitive complexity 136; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function decidePowerTarget (cyclomatic 105, cognitive 170) js/audio/power-policy.js:721— decidePowerTarget has cyclomatic complexity 105 and cognitive complexity 170; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function update (cyclomatic 97, cognitive 107) js/visualizer/visualizer-analyzer-display.js:209— update has cyclomatic complexity 97 and cognitive complexity 107; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseSfz (cyclomatic 94, cognitive 121) js/sfz/parser.js:218— parseSfz has cyclomatic complexity 94 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function decodeRhythmAnalyzer (cyclomatic 94, cognitive 84) dsp/bindings/js/src/telemetry.js:596— decodeRhythmAnalyzer has cyclomatic complexity 94 and cognitive complexity 84; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function apply (cyclomatic 90, cognitive 159) js/visualizer/visualizer-effects.js:246— apply has cyclomatic complexity 90 and cognitive complexity 159; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function showConfigDialog (cyclomatic 89, cognitive 88) js/electron/configIntegration.js:55— showConfigDialog has cyclomatic complexity 89 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function initializeAndBuildPipeline (cyclomatic 88, cognitive 143) js/app.js:929— initializeAndBuildPipeline has cyclomatic complexity 88 and cognitive complexity 143; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderLibrary (cyclomatic 87, cognitive 112) js/network-music/view.js:557— renderLibrary has cyclomatic complexity 87 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createPagedRow (cyclomatic 84, cognitive 105) js/ui/library/library-view.js:2746— createPagedRow has cyclomatic complexity 84 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function serve (cyclomatic 82, cognitive 144) REDACTED:327— serve has cyclomatic complexity 82 and cognitive complexity 144; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handleWorkletPowerEvent (cyclomatic 82, cognitive 118) js/audio/power-policy-controller.js:2057— handleWorkletPowerEvent has cyclomatic complexity 82 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function hasValidImportedScalars (cyclomatic 80, cognitive 79) features/measurement/dataStorage.js:130— hasValidImportedScalars has cyclomatic complexity 80 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawGraph (cyclomatic 79, cognitive 96) plugins/analyzer/note_spectrogram.js:2076— drawGraph has cyclomatic complexity 79 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function prepare (cyclomatic 79, cognitive 79) js/ui/audio-player/rolling-pcm-transport.js:134— prepare has cyclomatic complexity 79 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readSnapshot (cyclomatic 79, cognitive 75) plugins/analyzer/rhythm_analyzer.js:387— readSnapshot has cyclomatic complexity 79 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function prepareLegacyParametersV1 (cyclomatic 78, cognitive 113) dsp/bindings/js/src/preset.js:416— prepareLegacyParametersV1 has cyclomatic complexity 78 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 76, cognitive 30) tests/esm/visualizer-layout-browser.test.mjs:1179— (anonymous) has cyclomatic complexity 76 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function command (cyclomatic 75, cognitive 116) electron/network-music-av-player.cjs:99— command has cyclomatic complexity 75 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawGraph (cyclomatic 73, cognitive 92) js/visualizer/visualizer-guitar.js:346— drawGraph has cyclomatic complexity 73 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawGroove (cyclomatic 73, cognitive 81) plugins/analyzer/rhythm_analyzer.js:1475— drawGroove has cyclomatic complexity 73 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function verifyDesignInvariants (cyclomatic 72, cognitive 58) scripts/derive-tube-circuit-design.mjs:3351— verifyDesignInvariants has cyclomatic complexity 72 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawCellContent (cyclomatic 71, cognitive 105) plugins/analyzer/analog_meter.js:842— drawCellContent has cyclomatic complexity 71 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function advanceSfzSampleForecast (cyclomatic 71, cognitive 62) REDACTED:5589— advanceSfzSampleForecast has cyclomatic complexity 71 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function designRoomEq (cyclomatic 70, cognitive 149) js/room-eq/design-core.js:2492— designRoomEq has cyclomatic complexity 70 and cognitive complexity 149; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderWindow (cyclomatic 70, cognitive 86) js/ui/library/library-view.js:1935— renderWindow has cyclomatic complexity 70 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getSnapshot (cyclomatic 70, cognitive 65) js/ui/audio-player/openhome-playback-adapter.js:1134— getSnapshot has cyclomatic complexity 70 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function isValidReadyMessage (cyclomatic 69, cognitive 15) js/ui/audio-player/rolling-pcm-transport.js:1304— isValidReadyMessage has cyclomatic complexity 69 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.
Complex function parameters (cyclomatic 68, cognitive 99) js/visualizer/visualizer-editor.js:803— parameters has cyclomatic complexity 68 and cognitive complexity 99; 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: 8957 lines of code REDACTED:1— REDACTED has 8957 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/saturation/tube_simulator.js · ×1
plugins/saturation/tube_simulator.js: 7402 lines of code plugins/saturation/tube_simulator.js:1— plugins/saturation/tube_simulator.js has 7402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/library/repository/catalog-runtime-core.js · ×1
js/library/repository/catalog-runtime-core.js: 6870 lines of code js/library/repository/catalog-runtime-core.js:1— js/library/repository/catalog-runtime-core.js has 6870 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/ui/audio-player/audio-context-manager.js · ×1
js/ui/audio-player/audio-context-manager.js: 6037 lines of code js/ui/audio-player/audio-context-manager.js:1— js/ui/audio-player/audio-context-manager.js has 6037 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
js/audio-manager.js: 4677 lines of code js/audio-manager.js:1— js/audio-manager.js has 4677 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/ui/library/library-view.js · ×1
js/ui/library/library-view.js: 3869 lines of code js/ui/library/library-view.js:1— js/ui/library/library-view.js has 3869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/audio/power-policy-controller.js · ×1
js/audio/power-policy-controller.js: 3524 lines of code js/audio/power-policy-controller.js:1— js/audio/power-policy-controller.js has 3524 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/lofi/cassette_artifacts.js · ×1
plugins/lofi/cassette_artifacts.js: 3345 lines of code plugins/lofi/cassette_artifacts.js:1— plugins/lofi/cassette_artifacts.js has 3345 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
plugins/eq/room_eq.js: 3203 lines of code plugins/eq/room_eq.js:1— plugins/eq/room_eq.js has 3203 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
js/room-eq/design-core.js: 2773 lines of code js/room-eq/design-core.js:1— js/room-eq/design-core.js has 2773 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
js/ui-manager.js: 2708 lines of code js/ui-manager.js:1— js/ui-manager.js has 2708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/ui/audio-player/playback-manager.js · ×1
js/ui/audio-player/playback-manager.js: 2706 lines of code js/ui/audio-player/playback-manager.js:1— js/ui/audio-player/playback-manager.js has 2706 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/library/repository/web-sqlite-runtime.js · ×1
js/library/repository/web-sqlite-runtime.js: 2530 lines of code js/library/repository/web-sqlite-runtime.js:1— js/library/repository/web-sqlite-runtime.js has 2530 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/analyzer/note_spectrogram.js · ×1
plugins/analyzer/note_spectrogram.js: 2447 lines of code plugins/analyzer/note_spectrogram.js:1— plugins/analyzer/note_spectrogram.js has 2447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/electron/configIntegration.js · ×1
js/electron/configIntegration.js: 2413 lines of code js/electron/configIntegration.js:1— js/electron/configIntegration.js has 2413 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· electron/library-catalog-worker.cjs · ×1
electron/library-catalog-worker.cjs: 2388 lines of code electron/library-catalog-worker.cjs:1— electron/library-catalog-worker.cjs has 2388 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/lofi/am_radio_simulator.js · ×1
plugins/lofi/am_radio_simulator.js: 2263 lines of code plugins/lofi/am_radio_simulator.js:1— plugins/lofi/am_radio_simulator.js has 2263 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/analyzer/rhythm_analyzer.js · ×1
plugins/analyzer/rhythm_analyzer.js: 2178 lines of code plugins/analyzer/rhythm_analyzer.js:1— plugins/analyzer/rhythm_analyzer.js has 2178 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/reverb/ir_reverb.js · ×1
plugins/reverb/ir_reverb.js: 2108 lines of code plugins/reverb/ir_reverb.js:1— plugins/reverb/ir_reverb.js has 2108 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 2067 lines of code REDACTED:1— REDACTED has 2067 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/lofi/sw_radio_simulator.js · ×1
plugins/lofi/sw_radio_simulator.js: 2062 lines of code plugins/lofi/sw_radio_simulator.js:1— plugins/lofi/sw_radio_simulator.js has 2062 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/ui/audio-player/audio-player-ui.js · ×1
js/ui/audio-player/audio-player-ui.js: 2046 lines of code js/ui/audio-player/audio-player-ui.js:1— js/ui/audio-player/audio-player-ui.js has 2046 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/lofi/tv_audio_simulator.js · ×1
plugins/lofi/tv_audio_simulator.js: 1998 lines of code plugins/lofi/tv_audio_simulator.js:1— plugins/lofi/tv_audio_simulator.js has 1998 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/visualizer/visualizer-editor.js · ×1
js/visualizer/visualizer-editor.js: 1791 lines of code js/visualizer/visualizer-editor.js:1— js/visualizer/visualizer-editor.js has 1791 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
js/app.js: 1702 lines of code js/app.js:1— js/app.js has 1702 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/lofi/vinyl_simulator.js · ×1
plugins/lofi/vinyl_simulator.js: 1668 lines of code plugins/lofi/vinyl_simulator.js:1— plugins/lofi/vinyl_simulator.js has 1668 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
electron/main.js: 1613 lines of code electron/main.js:1— electron/main.js has 1613 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/spatial/phase_select_eq.js · ×1
plugins/spatial/phase_select_eq.js: 1593 lines of code plugins/spatial/phase_select_eq.js:1— plugins/spatial/phase_select_eq.js has 1593 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· electron/library-service-coordinator.cjs · ×1
electron/library-service-coordinator.cjs: 1542 lines of code electron/library-service-coordinator.cjs:1— electron/library-service-coordinator.cjs has 1542 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· tools/verify-dsp-library-goldens.mjs · ×1
tools/verify-dsp-library-goldens.mjs: 1514 lines of code tools/verify-dsp-library-goldens.mjs:1— tools/verify-dsp-library-goldens.mjs has 1514 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/dynamics/multiband_compressor.js · ×1
plugins/dynamics/multiband_compressor.js: 1507 lines of code plugins/dynamics/multiband_compressor.js:1— plugins/dynamics/multiband_compressor.js has 1507 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
js/pipeline-analyzer/ui.js: 1498 lines of code js/pipeline-analyzer/ui.js:1— js/pipeline-analyzer/ui.js has 1498 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/audio/offline-processor.js · ×1
js/audio/offline-processor.js: 1471 lines of code js/audio/offline-processor.js:1— js/audio/offline-processor.js has 1471 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/ui/audio-player/openhome-playback-adapter.js · ×1
js/ui/audio-player/openhome-playback-adapter.js: 1467 lines of code js/ui/audio-player/openhome-playback-adapter.js:1— js/ui/audio-player/openhome-playback-adapter.js has 1467 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/lofi/fm_radio_simulator.js · ×1
plugins/lofi/fm_radio_simulator.js: 1453 lines of code plugins/lofi/fm_radio_simulator.js:1— plugins/lofi/fm_radio_simulator.js has 1453 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· plugins/eq/five_band_dynamic_eq.js · ×1
plugins/eq/five_band_dynamic_eq.js: 1426 lines of code plugins/eq/five_band_dynamic_eq.js:1— plugins/eq/five_band_dynamic_eq.js has 1426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· features/measurement/dataStorage.js · ×1
features/measurement/dataStorage.js: 1420 lines of code features/measurement/dataStorage.js:1— features/measurement/dataStorage.js has 1420 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
electron/ipc-handlers.js: 1419 lines of code electron/ipc-handlers.js:1— electron/ipc-handlers.js has 1419 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/audio/dsp-engine-binding.js · ×1
js/audio/dsp-engine-binding.js: 1412 lines of code js/audio/dsp-engine-binding.js:1— js/audio/dsp-engine-binding.js has 1412 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· js/ui/audio-player/rolling-pcm-transport.js · ×1
js/ui/audio-player/rolling-pcm-transport.js: 1391 lines of code js/ui/audio-player/rolling-pcm-transport.js:1— js/ui/audio-player/rolling-pcm-transport.js has 1391 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
No typecheck script — test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Dead file (~439 LoC) scripts/generate-tube-phase-c-tables.mjs— no import path from any entry point (842 application, 32 tooling, 841 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 (~266 LoC) scripts/generate-tube-fir-coefficients.mjs— no import path from any entry point (842 application, 32 tooling, 841 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 (~175 LoC) tools/verify-airplay-startup.mjs— no import path from any entry point (842 application, 32 tooling, 841 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 (~111 LoC) experiments/dsp-library-phase0/verify_browser.mjs— no import path from any entry point (842 application, 32 tooling, 841 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 (~107 LoC) tools/generate-sfz-modulation-fixture.mjs— no import path from any entry point (842 application, 32 tooling, 841 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 (~103 LoC) tools/generate-sfz-future-main-fixture.mjs— no import path from any entry point (842 application, 32 tooling, 841 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 (~80 LoC) tools/verify-airplay-pcm.mjs— no import path from any entry point (842 application, 32 tooling, 841 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 (~36 LoC) tools/generate-sfz-storage-fixture.mjs— no import path from any entry point (842 application, 32 tooling, 841 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
redundant comment electron/file-handlers.js:168— "Get app path" repeats the code it sits on: 3 of its 3 words (get, app, path) are already in `const appPath = getSettingsPath(getUserDataPath());`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment electron/file-utils.js:85— "Save pipeline state to file" repeats the code it sits on: 4 of its 4 words (save, pipeline, state, file) are already in `async function savePipelineStateToFile(pipelineState, userDataPath, { allowEmpty = false } = {})`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment electron/ipc-handlers.js:311— 19 comments in this file only repeat the code they sit on (lines 311, 318, 638, 724, 753, 761, 786, 988, 1215, 1252, 1291, 1368, 1394, 1405, 1408, 1422, 1446, 1451, 1464), for example "Send key down event". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment electron/main.js:578— 5 comments in this file only repeat the code they sit on (lines 578, 1048, 1174, 1205, 1319), for example "Create the browser window". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/app.js:248— "Check browser audio support and limitations" repeats the code it sits on: 4 of its 5 words (check, browser, audio, support) are already in `checkBrowserAudioSupport();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/app.js:639— "Get the EQ band count" repeats the code it sits on: 4 of its 4 words (get, eq, band, count) are already in `const bandCount = parseInt(document.getElementById('eqBandCount').value);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/app.js:960— "Save PEQ settings when values change" repeats the code it sits on: 4 of its 5 words (save, peq, settings, change) are already in `document.getElementById('smoothing').addEventListener('change', savePEQSettings);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/core.js:130— "Create a new AudioContext with options" repeats the code it sits on: 5 of its 5 words (create, new, audio, context, options) are already in `this.audioContext = new (window.AudioContext || window.webkitAudioContext)(contextOptions);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/core.js:252— "If we have a current level from the AudioWorklet, use that" repeats the code it sits on: 4 of its 5 words (current, level, audio, worklet) are already in `if (this.audioWorkletSupported && this.currentInputLevel !== undefined)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/devices.js:91— "Create source from stream" repeats the code it sits on: 3 of its 3 words (create, source, stream) are already in `const micSource = this.audioContext.createMediaStreamSource(stream);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/devices.js:156— "Connect channel gain to level meter node" repeats the code it sits on: 6 of its 6 words (connect, channel, gain, level, meter, node) are already in `this.channelGain.connect(this.levelMeterNode);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/devices.js:289— "Create level meter AudioWorkletNode" repeats the code it sits on: 6 of its 6 words (create, level, meter, audio, worklet, node) are already in `const levelMeterNode = new AudioWorkletNode(this.audioContext, 'level-meter-processor', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/devices.js:327— "Create recorder AudioWorkletNode" repeats the code it sits on: 5 of its 5 words (create, recorder, audio, worklet, node) are already in `const recorderNode = new AudioWorkletNode(this.audioContext, 'recorder-processor', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/index.js:11— "Create a new AudioUtils instance" repeats the code it sits on: 4 of its 5 words (create, new, audio, utils) are already in `const audioUtils = new AudioUtils();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/signal-generation.js:316— "Create audio source from buffer" repeats the code it sits on: 4 of its 4 words (create, audio, source, buffer) are already in `resources.node = this.audioContext.createBufferSource();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/audio-utils/signal-processing.js:215— "First calculate the raw FFT response" repeats the code it sits on: 4 of its 5 words (calculate, raw, fft, response) are already in `const rawResponse = this.calculateFFT(timeDomainData, sampleRate, normalizeWithLastSweep);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/dataStorage.js:956— "Check if measurement with this ID already exists" repeats the code it sits on: 4 of its 5 words (check, measurement, id, exists) are already in `const existingIndex = this.measurements.findIndex(m => m.id === measurementId);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/measurement-controller/audio-processing.js:354— "Check if AudioWorklet is supported" repeats the code it sits on: 4 of its 4 words (check, audio, worklet, supported) are already in `if (!audioUtils.audioWorkletSupported)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/measurement-controller/audio-processing.js:365— "Create recorder worklet node" repeats the code it sits on: 4 of its 4 words (create, recorder, worklet, node) are already in `recordNode = await audioUtils.createRecorderWorkletNode(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/measurement-controller/audio-processing.js:471— "Create audio source" repeats the code it sits on: 3 of its 3 words (create, audio, source) are already in `const source = audioContext.createBufferSource();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/measurement-controller/audio-processing.js:623— "Final safety timeout" repeats the code it sits on: 3 of its 3 words (final, safety, timeout) are already in `elements.finalSafetyTimer = setTimeout(() =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/measurement-controller/graph-utils.js:45— "Draw level data" repeats the code it sits on: 3 of its 3 words (draw, level, data) are already in `this.drawLevelGraphData(ctx, width, height);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/measurement-controller/index.js:194— "Get preferred sample rate from config" repeats the code it sits on: 4 of its 5 words (preferred, sample, rate, config) are already in `const preferredSampleRate = parseInt(configSnapshot.sampleRate);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/measurement-controller/index.js:197— "Reinitialize audio context with preferred sample rate" repeats the code it sits on: 5 of its 6 words (audio, context, preferred, sample, rate) are already in `if (audioUtils.audioContext && audioUtils.audioContext.sampleRate !== preferredSampleRate)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment features/measurement/measurement-controller/index.js:361— "Stop level meter" repeats the code it sits on: 3 of its 3 words (stop, level, meter) are already in `this.stopLevelMeter();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Duplicated predicate android/app/src/main/java/com/frieve/effetune/MidiMappings.java:356— `value == null || value == JSONObject.NULL` appears character-identically in 2 files — android/app/src/main/java/com/frieve/effetune/MidiMappings.java, android/app/src/main/java/com/frieve/effetune/NativeParameterPacker.java. 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 js/sfz/sample-integrity.js:27— `!(bytes instanceof Uint8Array) || bytes.length !== length` appears character-identically in 2 files — js/sfz/sample-integrity.js, js/sfz/sample-metadata.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 dsp/bindings/js/src/assets.js:296— `!(channel instanceof Float32Array) || channel.length !== frames` appears character-identically in 6 files — dsp/bindings/js/src/assets.js, dsp/bindings/js/src/graph.js, dsp/bindings/js/src/runtime.js, js/ir-library/ir-asset-payload.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 plugins/eq/five_band_fir_peq.js:369— `!(payload instanceof ArrayBuffer) || payload.byteLength < 32 + this.tp * 4` appears character-identically in 3 files — plugins/eq/five_band_fir_peq.js, plugins/eq/group_delay_eq.js, plugins/eq/group_delay_peq.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 dsp/bindings/js/src/graph.js:29— `!Array.isArray(audio) || audio.length < 1 || audio.length > 16` appears character-identically in 2 files — dsp/bindings/js/src/graph.js, dsp/bindings/js/src/runtime.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 electron/library-catalog-scan-runtime.cjs:1382— `!Array.isArray(value) || value.length > maximumItems` appears character-identically in 2 files — electron/library-catalog-scan-runtime.cjs, js/library/repository/catalog-runtime-core.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 features/effetune-benchmark-score.js:31— `!Array.isArray(values) || values.length === 0` appears character-identically in 2 files — features/effetune-benchmark-score.js, tools/dsp-parity/bench.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate js/audio/dsp-engine-binding.js:1211— `!ArrayBuffer.isView(view) || view.buffer !== this._memoryBuffer` appears character-identically in 2 files — js/audio/dsp-engine-binding.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate electron/library-catalog-worker.cjs:1750— `!Number.isFinite(availableBytes) || availableBytes < estimatedRequiredBytes + 4 * 1024 * 1024` appears character-identically in 3 files — electron/library-catalog-worker.cjs, js/library/repository/catalog-runtime-core.js, js/library/repository/web-sqlite-runtime.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 js/library/metadata/cue-sheet.js:177— `!Number.isFinite(durationSec) || durationSec <= 0` appears character-identically in 2 files — js/library/metadata/cue-sheet.js, js/library/repository/catalog-runtime-core.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 dsp/bindings/js/src/telemetry.js:194— `!Number.isFinite(first) || !Number.isFinite(minimum) || !Number.isFinite(maximum) || !Number.isFinite(last) || minimum > maximum || first < …` appears character-identically in 2 files — dsp/bindings/js/src/telemetry.js, plugins/analyzer/oscilloscope.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 js/audio/dsp-engine-binding.js:930— `!Number.isFinite(gain) || gain < 0 || gain > 1` appears character-identically in 2 files — js/audio/dsp-engine-binding.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate dsp/bindings/js/src/telemetry.js:454— `!Number.isFinite(level) || level < 0 || level > 1` appears character-identically in 2 files — dsp/bindings/js/src/telemetry.js, plugins/analyzer/note_spectrogram.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 dsp/bindings/js/src/telemetry.js:129— `!Number.isFinite(minimum) || !Number.isFinite(maximum) || minimum > maximum` appears character-identically in 2 files — dsp/bindings/js/src/telemetry.js, plugins/analyzer/oscilloscope.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 plugins/eq/five_band_fir_peq.js:32— `!Number.isFinite(numericPosition) || numericPosition <= 0` appears character-identically in 2 files — plugins/eq/five_band_fir_peq.js, plugins/eq/group_delay_peq.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 dsp/bindings/js/src/telemetry.js:97— `!Number.isFinite(peak) || peak < 0 || !Number.isFinite(rms) || rms < 0` appears character-identically in 2 files — dsp/bindings/js/src/telemetry.js, plugins/analyzer/level_meter.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 js/midi/smf-scheduler.js:69— `!Number.isFinite(position) || !Number.isFinite(anchorFrame) || !Number.isFinite(speed) || speed <= 0 || !Number.isFinite(gain)` appears character-identically in 2 files — js/midi/smf-scheduler.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate js/group-delay-eq/design-core.js:184— `!Number.isFinite(sampleRate) || sampleRate <= 0` appears character-identically in 4 files — js/group-delay-eq/design-core.js, js/group-delay-peq/design-core.js, js/ir-library/ir-plugin-contract.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate js/midi/smf-scheduler.js:261— `!Number.isFinite(speed) || speed <= 0 || !Number.isFinite(position) || !Number.isFinite(anchorFrame)` appears character-identically in 2 files — js/midi/smf-scheduler.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate plugins/dynamics/auto_leveler.js:594— `!Number.isFinite(value) || !Number.isFinite(time) || displayTime === null` appears character-identically in 4 files — plugins/dynamics/auto_leveler.js, plugins/dynamics/multiband_transient.js, plugins/dynamics/power_amp_sag.js, plugins/dynamics/transient_shaper.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 dsp/bindings/js/src/telemetry.js:420— `!Number.isFinite(value) || value < 0 || value > 1` appears character-identically in 2 files — dsp/bindings/js/src/telemetry.js, plugins/analyzer/note_spectrogram.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 js/audio/dsp-engine-binding.js:1237— `!Number.isInteger(bytes) || bytes < 0 || bytes > maxBytes` appears character-identically in 2 files — js/audio/dsp-engine-binding.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate js/audio/dsp-engine-binding.js:915— `!Number.isInteger(channel) || channel < 0 || channel > 15 || !Number.isInteger(action) || action < 0 || action > 3` appears character-identically in 2 files — js/audio/dsp-engine-binding.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate js/audio/offline-output-settings.js:92— `!Number.isInteger(channelCount) || channelCount < 1` appears character-identically in 2 files — js/audio/offline-output-settings.js, js/pipeline-analyzer/slot-policy.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 dsp/bindings/js/src/semantics.js:364— `!Number.isInteger(channelCount) || channelCount < 1 || channelCount > 16` appears character-identically in 4 files — dsp/bindings/js/src/semantics.js, js/ir-library/ir-plugin-contract.js, js/pipeline-analyzer/analysis-worker.js, plugins/basics/bass_management.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.
+ 15 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×39
Console output used as the logging channel REDACTED:2898— `REDACTED` reports through `console.*` at line 2898 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:2942— `REDACTED` reports through `console.*` at line 2942 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:3066— `REDACTED` reports through `console.*` at line 3066 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:3235— `REDACTED` reports through `console.*` at line 3235 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:4004— `REDACTED` reports through `console.*` at line 4004 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:4776— `REDACTED` reports through `console.*` at line 4776 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:4798— `REDACTED` reports through `console.*` at line 4798 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:5274— `REDACTED` reports through `console.*` at line 5274 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:5297— `REDACTED` reports through `console.*` at line 5297 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:5309— `REDACTED` reports through `console.*` at line 5309 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:5464— `REDACTED` reports through `console.*` at line 5464 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:5735— `REDACTED` reports through `console.*` at line 5735 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:6371— `REDACTED` reports through `console.*` at line 6371 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:6816— `REDACTED` reports through `console.*` at line 6816 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:6825— `REDACTED` reports through `console.*` at line 6825 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:6827— `REDACTED` reports through `console.*` at line 6827 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:7810— `REDACTED` reports through `console.*` at line 7810 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:7930— `REDACTED` reports through `console.*` at line 7930 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:8032— `REDACTED` reports through `console.*` at line 8032 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:8513— `REDACTED` reports through `console.*` at line 8513 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:8535— `REDACTED` reports through `console.*` at line 8535 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:8588— `REDACTED` reports through `console.*` at line 8588 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:8766— `REDACTED` reports through `console.*` at line 8766 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:8801— `REDACTED` reports through `console.*` at line 8801 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:8828— `REDACTED` reports through `console.*` at line 8828 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Silent fallback default in catch assets/js/site.js:214— `readLanguageData` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch assets/js/site.js:237— `readUiText` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch assets/js/site.js:778— `getSiteBasePath` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch electron/browser-preload.js:169— `fileName` (in `installMidiFileHook`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch electron/network-music-host.cjs:248— `publicTrack` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch electron/remote-control-host.cjs:282— `loadConfig` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch electron/library-dialog-localization.cjs:56— `safelyReadLocale` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch electron/library-catalog-worker.cjs:1682— `readWalBytes` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch js/audio/dsp-wasm-loader.js:97— `detectSimdSupport` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch js/library/metadata/text-encoding.js:379— `decodeBytes` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch js/midi/smf-parser.js:203— `parseSmf` swallows every exception into `return true` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch js/utils/clipboard-utils.js:48— `copyTextWithSelection` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch js/ui/audio-player/openhome-playback-adapter.js:1475— `titleFromUri` swallows every exception into `return 'Remote track'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch tools/benchmark-score-reference.mjs:126— `currentCommit` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
No ADRs found package.json:8— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `package.json` makes this repository a deployable product (line 8).
D21 · Naming Consistency· `browserScrollbarCSS` spells `CSS` where 14 names in the project spell it `Css` · ×1
`browserScrollbarCSS` spells `CSS` where 14 names in the project spell it `Css` electron/browser-controller.cjs:44— 14 of 15 names in project effetune spell the token `Css` (14 of 15; unit: names in project effetune containing `Css`). Peers: library-view.parseCssPixelValue (js/ui/library/library-view.js:3981); visualizer-analyzer-display.colorCss (js/visualizer/visualizer-analyzer-display.js:37); visualizer-analyzer-display.themeColorCss (js/visualizer/visualizer-analyzer-display.js:39); LevelMeterPlugin.graphCssWidth (plugins/analyzer/level_meter.js:110); NoteSpectrogramPlugin.graphCssWidth (plugins/analyzer/note_spectrogram.js:288). Rename to `browserScrollbarCss`. [rule N6]
D21 · Naming Consistency· `calculateFFT` spells `FFT` where 22 names in the project spell it `Fft` · ×1
`calculateFFT` spells `FFT` where 22 names in the project spell it `Fft` features/measurement/audio-utils/signal-processing.js:15— 22 of 23 names in project effetune spell the token `Fft` (22 of 23; unit: names in project effetune containing `Fft`). Peers: effetune-benchmark.bandwidthExtenderFftSize (features/effetune-benchmark.js:131); impulse-response-import.analysisFftSize (features/measurement/impulse-response-import.js:25); DspEngineBinding.hasDesignFft (js/audio/dsp-engine-binding.js:411); DspEngineBinding.createDesignFft (js/audio/dsp-engine-binding.js:422); DspEngineBinding.destroyDesignFft (js/audio/dsp-engine-binding.js:434). Rename to `calculateFft`. [rule N6]
D21 · Naming Consistency· `_processFilesWithJSZip` spells `JS` where 20 names in the project spell it `Js` · ×1
`_processFilesWithJSZip` spells `JS` where 20 names in the project spell it `Js` js/ui/pipeline/file-processor.js:810— 20 of 21 names in project effetune spell the token `Js` (20 of 21; unit: names in project effetune containing `Js`). Peers: automation_test.renderJsTrace (dsp/plugins/reverb/ir_reverb/automation_test.mjs:22); AudioManager._requestWorkletJsFallbackBudgetState (js/audio-manager.js:2499); AudioManager._setWorkletJsFallbackBudget (js/audio-manager.js:2509); AudioManager._postWorkletJsFallbackBudget (js/audio-manager.js:2519); AudioManager._isValidJsFallbackBudgetState (js/audio-manager.js:2532). Rename to `_processFilesWithJsZip`. [rule N6]
D21 · Naming Consistency· `BluetoothSBCSimulatorPlugin` spells `SBC` where 13 names in the project spell it `Sbc` · ×1
`BluetoothSBCSimulatorPlugin` spells `SBC` where 13 names in the project spell it `Sbc` plugins/lofi/bluetooth_sbc_simulator.js:18— 13 of 14 names in project effetune spell the token `Sbc` (13 of 14; unit: names in project effetune containing `Sbc`). Peers: bluetooth-sbc-audioworklet-bench.createSbcSnapshotStabilityManifest (tools/dsp-parity/bluetooth-sbc-audioworklet-bench.mjs:165); bluetooth-sbc-audioworklet-bench.createSbcProductionEquivalenceManifest (tools/dsp-parity/bluetooth-sbc-audioworklet-bench.mjs:177); bluetooth-sbc-audioworklet-bench.evaluateSbcRealtimeGate (tools/dsp-parity/bluetooth-sbc-audioworklet-bench.mjs:247); bluetooth-sbc-audioworklet-bench.preflightSbcArtifacts (tools/dsp-parity/bluetooth-sbc-audioworklet-bench.mjs:366); bluetooth-sbc-audioworklet-bench.runBluetoothSbcAudioWorkletGate (tools/dsp-parity/bluetooth-sbc-audioworklet-bench.mjs:382). Rename to `BluetoothSbcSimulatorPlugin`. [rule N6]
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.
README/code drift BUILD.md:1006— BUILD.md names Node.js 22, but the repository declares engines `>=18`, engines `>=20`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Logging is not universal — Only 3/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `dsp/bindings/js`, `experiments/dsp-library-phase0`, `mcp`.
P3 · Security & performance tooling· Dependabot does not watch pip/gradle · ×1
Dependabot does not watch pip/gradle .github/dependabot.yml:3— `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `pip`, `gradle`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code· Unused export 'clearArtifactCache' · ×1
Unused export 'clearArtifactCache' dsp/bindings/js/src/artifacts.js:183— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'compareMp3DecoderToLogicalPcm' · ×1
Unused export 'compareMp3DecoderToLogicalPcm' tools/dsp-parity/mp3-conformance.mjs:1048— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'REFERENCE_FIXTURE_BATCH_SIZE' · ×1
Unused export 'REFERENCE_FIXTURE_BATCH_SIZE' tools/library-scale/reference-fixture.mjs:3— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused module-local declaration 'smoothSynthesisValues' · ×1
Unused module-local declaration 'smoothSynthesisValues' js/room-eq/design-core.js:705— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'smoothReverbSynthesisValues' · ×1
Unused module-local declaration 'smoothReverbSynthesisValues' js/room-eq/design-core.js:780— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'FADE_SECONDS' · ×1
Unused module-local declaration 'FADE_SECONDS' js/ui/double-blind-test/double-blind-test.js:38— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'createImportElectronAPI' · ×1
Unused module-local declaration 'createImportElectronAPI' tests/esm/app.test.mjs:462— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'phaseCPowerAxes' · ×1
Unused module-local declaration 'phaseCPowerAxes' tests/tools/tube-simulator-lineamp/generate-stability-manifests.mjs:441— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'contentType' · ×1
Unused module-local declaration 'contentType' tools/verify-dsp-library-goldens.mjs:992— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Nullable reference types not enabled everywhere — 0/1 C# file(s) are in a nullable-enabled context. This repository commits no project file, so nothing sets <Nullable>enable</Nullable> for it: a file is enabled only by its own `#nullable enable`, by a Unity `csc.rsp` with `-nullable:enable` for its assembly, or as a file-based app (`#:` directives) whose `#:property Nullable` does not turn it off. NRTs catch a whole class of null-deref bugs at compile time.
Skipped (documented): generated Python classes import through the real package runtime tests/esm/dsp-library-codegen-import-smoke.test.mjs:43— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): generated JavaScript classes import through the real runtime tests/esm/dsp-library-codegen-import-smoke.test.mjs:92— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): published AudioWorklet quickstart runs the real package processor tests/esm/dsp-library-runnable-docs.test.mjs:71— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): System Audio captures the Windows default output while EffeTune plays to a second device tests/esm/system-audio-electron-browser.test.mjs:73— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): HDR retains decoded video and effect headroom through GPU presentation, sharing and display fallback tests/esm/visualizer-hdr-browser.test.mjs:31— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): IR IPC rejects a symlink or reparse-point target inside its root tests/cjs/electron-ir-library-ipc.test.cjs:177— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): IR IPC rejects a symlink or reparse-point library root itself tests/cjs/electron-ir-library-ipc.test.cjs:199— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): IR IPC rejects a symlink or reparse-point cache namespace tests/cjs/electron-ir-library-ipc.test.cjs:220— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): IR IPC revalidates the initialized library root before every operation tests/cjs/electron-ir-library-ipc.test.cjs:243— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): IR IPC revalidates the initialized cache root before every operation tests/cjs/electron-ir-library-ipc.test.cjs:270— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): PWA TLS API and read grants stay on the trusted listener and reject mismatched certificates tests/cjs/pwa-network-host.test.cjs:187— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): TLS serves the client, verifies certificates and enforces secure WebSocket origins tests/cjs/remote-tls.test.cjs:67— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): SFZ canonical containment rejects dependencies linked outside the selected folder tests/cjs/sfz-library-ipc.test.cjs:174— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): fingerprint candidate search rejects a linked parent outside its granted root tests/cjs/sfz-library-ipc.test.cjs:336— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): SIMD parameter events match the frozen Volume golden when supported dsp/bindings/js/test/runtime.test.mjs:1447— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): SIMD artifact processes when the runtime supports it dsp/bindings/js/test/runtime.test.mjs:1459— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
doc comments repeat the names features/measurement/audio-utils/core.js:219— 7 of 191 documented parameters and 16 of 221 summaries in `effetune` only repeat the member or parameter name (e.g. "Ensure that audio context is running" for `ensureAudioContextRunning`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names js/app.js:1498— 46 of 286 documented parameters and 77 of 575 summaries in `js` only repeat the member or parameter name (e.g. "Show update notification" for `showUpdateNotification`). Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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 3 file(s) — `js/audio/dsp-params.generated.js`, `js/midi/musicxml-parser.js`, `REDACTED` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1e7e0-569b-732f-b76c-b18103a8e0fd · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 60 · Warnings: 4041 · Recommendations: 232 · Info: 73 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 05:00 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.