Public report of brendan-duncan/image, 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, 21:41 UTC · Survey ID cd_06d63c47fb2b43e6ae8dbe9d6a4b2486
brendan-duncan/image
Measured 17 November 2026, 21:40 UTC, at code version cbebc10
Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Up 1.3 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 95,591 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.7 person-years · Weakest lens: Accessibility, 22.2
Findings by how serious they are
13 critical558 serious43 minor
11 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, 21:40 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 ▸
48of 48 dimensions measured by tools.
607of 614 findings point to an exact file and line, so you can open each one in the code. The other 7 concern the repository as a whole, such as missing documentation.
48dimensions across 7 lenses, read from 95,591 lines of product code in 1 project.
brendan-duncan/image falls short of our standard for production, in part because it has images with no text description. It scores 43.1 out of 100 and is rated Weak, and two of its 13 critical findings are security problems in the build pipeline.
Accessibility, at 22.2, is the weakest lens and counts most in the score. The best first steps are adding text alternatives and labelling the form fields and buttons, each worth about 8.2 points. Raising Accessibility to 70 would lift the score to about 59.2.
Three images have no description for people who can't see them. Two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and one form field can't be read by a screen reader. Labelling the form fields, describing the images and pinning each tool to an exact version would close these risks. The seven pages that don't say their language need their language set.
The product code is 95,591 lines, about €100,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts 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.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 18 findings
These 18 critical or serious findings were in the previous survey, on 5 November 2026, and are gone from this one.
Code Duplication · Edited copy of a member (30 corresponding lines) lib/src/image/pixel_uint1.dart
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) lib/src/image/pixel_int16.dart
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) lib/src/image/pixel_int16.dart
A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €100,000 · Estimate
Cost to rebuild
€33,000 to €170,000, for 557 to 1,766 hours of work, about 0.7 person-years for 1 to 2 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 43. 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
Medium: 95,591 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
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.
Raises the score by about 8.2 points · Medium effort · Text alternatives
2
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 8.2 points · Medium effort · Forms & labels
3
Write a diagnostic trail the user can hand back with a bug report: log through `package:logging` to a file in the app's support directory that a report can attach.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 4.9 points · Medium effort · Observability
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €100,000 to build again, about 0.7 person-years of work. Its weakest lens is Accessibility, at 22.2 (Critical). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
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. Of all the actions in this report, it raises the score most for the work it takes: about 8.2 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 46,998 lines over the last 90 days, which is about 190,603 lines a year. At that pace, the extra work comes to an estimated 29.9 to 179.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of 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.
At a glance — Code Health · 66.9 · Adequate · gated by D2, X3 ·
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
3
High / Critical
Roadmap
Top priorities: 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; Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label; Write a diagnostic trail the user can hand back with a bug report: log through `package:logging` to a file in the app's support directory that a report can attach. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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.
Write a diagnostic trail the user can hand back with a bug report: log through `package:logging` to a file in the app's support directory that a report can attach. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.
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.
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 — 13
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 — 558
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 — 43
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 11
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 48 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, 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 — 48 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, 607 of 614 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.
D8 Code Coverage — 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. Coverage NOT MEASURED: test source is present (.dart) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.dart) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — 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 dependency manifest (a Dart pubspec.yaml) was found, but this pass cannot parse it for hygiene, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D30 wherever the manifest is OSV-readable.
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. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (pubspec.yaml), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — 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. 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.
D26 Project Cohesion — 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. `(repository root)` (95591 LoC, 429 module-visible types across 29 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: 8 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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.
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.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
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.
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").
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.
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.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
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.
57 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TiffImage._decodeTile at 106. A further 3 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being PsdImage._blend at 29 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: lib/src/formats/tiff/tiff_entry.dart (TiffEntry.read at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 52 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with TiffImage._decodeTile (cyclomatic 106), BmpEncoder.encode (cyclomatic 94), TiffImage.TiffImage (cyclomatic 63). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 6.0 to about 6.5/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.
+ 119 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 240 down to 240 or less in Cognitive Complexity — start with TiffImage._decodeTile (cognitive 438). — Refactoring it lifts Cognitive Complexity from 2.7 to about 3.6/10.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 36 TooManyMethods finding(s) in God Classes — start with command.dart, image.dart, ifd_directory.dart. — One of this dimension's main actionable groups (36 warning-level).
Resolve the 16 MethodTooLong finding(s) in God Classes — start with tiff_image.dart (2), png_decoder.dart (2), image.dart (2). — One of this dimension's main actionable groups (16 warning-level).
Resolve the 13 ClassTooLong finding(s) in God Classes — start with vp8.dart, tiff_fax_decoder.dart, command.dart. — One of this dimension's main actionable groups (13 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.
127 duplicated block group(s) detected. 6.5 % of the production lines (6,242 of 95,591) are in a reported copy. A further 68 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (8 corresponding lines) · ×5lib/src/formats/webp/vp8l_transform.dart:315
+ 104 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with color_uint1.dart (3), tga_decoder.dart (2), image_data_float32.dart. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 7 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with tiff_image.dart (3), color_float32.dart, vp8l.dart. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 7 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with vp8_filter.dart (3), color_float32.dart, pixel_float32.dart. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 55 Low cohesion finding(s) in Cohesion (LCOM4) — start with command.dart, const_color_uint8.dart, color_float16.dart. — One of this dimension's main actionable groups (55 warning-level).
Detailed fixes: d6_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 5 resolved pub package(s) use a banned license. Licences were read from pub.dev's analysis of each package's licence file. ★ This repository commits no pubspec.lock (Dart's guidance for a package), so the graph was closed here: the 1 package(s) its pubspec declares under dependencies, and transitively every package their published pubspecs declare, each at the newest release its constraint admits — the release a fresh `pub get` picks wherever constraints agree; where two disagree the first to reach the package was taken. dev_dependencies are not part of it.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: lib/src/formats/jpeg/jpeg_data.dart (16×49=784); lib/src/formats/png_decoder.dart (15×50=750); lib/src/formats/tiff/tiff_image.dart (4×106=424) Repeated repair below the complexity floor: lib/src/transform/resize.dart (6 of 10 changes were fixes); lib/src/image/pixel_uint16.dart (4 of 5 changes were fixes); lib/src/image/pixel_uint1.dart (3 of 4 changes were fixes)
Resolve the 11 Hotspot finding(s) in Churn × Complexity Hotspots — start with jpeg_data.dart, png_decoder.dart, tiff_image.dart. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 5 Repeated repair finding(s) in Churn × Complexity Hotspots — start with resize.dart, pixel_uint16.dart, pixel_uint1.dart. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor7.2 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
54 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is lib/src/formats/webp/vp8l_encoder.dart. Counted over 191 of the 402 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)
What to do
Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
9 deducted task-comment markers across 95591 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.
TodoComment · ×9web/image_http_input.dart:13
What to do
Resolve the 9 TodoComment finding(s) in Explicit Debt — start with image_http_input.dart (3), test_formats.dart (2), png_decoder.dart. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
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.
2 naming inconsistencies among 17 declarations measured against a convention their peers follow.
`_emitAlphaRGB` spells `RGB` where 66 names in the project spell it `Rgb`lib/src/formats/webp/vp8.dart:998
`_emitFancyRGB` spells `RGB` where 66 names in the project spell it `Rgb`lib/src/formats/webp/vp8.dart:1039
What to do
Resolve the 1 `_emitAlphaRGB` spells `RGB` where 66 names in the project spell it… finding(s) in Naming Consistency — start with vp8.dart. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `_emitFancyRGB` spells `RGB` where 66 names in the project spell it… finding(s) in Naming Consistency — start with vp8.dart. — 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 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).
3 finding(s): 0 critical, 2 high, 1 medium, 0 low. 2 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
No action in Static Analysis (SAST) — all 2 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (2 issue-level, 0 of them charged here).
Detailed fixes: d29_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.
2 of 191 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is lib/src/filter/histogram_equalization.dart. Counted over 191 of the 402 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with _jpeg_quantize_html.dart, png_decoder.dart. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×3) — web/exr_viewer.html:11, web/test_formats.html:11, web/test_jpeg_encoder.html:11
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 & labels1.0 / 10Critical✓ 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. — web/image_http_input.html:11
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.
Do you agree with this assessment?
AC3 · Page structure4.4 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×7) — web/exr_viewer.html:3, web/filter_lab.html:3, web/image_http_input.html:3, …
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — web/filter_lab.html:3, web/web_test.html:2, web/web_test_wasm.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether 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.
`.ui-state-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. — web/res/filter_lab.css:50
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.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`Color` declares 30 abstract methods: `length`, `maxChannelValue`, `maxIndexValue`, `format`, `isLdrFormat`, `isHdrFormat`, `hasPalette`, `palette`, `[]`, `[]=`, `index`, `r`, `g`, `b`, `a`, `rNormalized`, `gNormalized`, `bNormalized`, `aNormalized`, `luminance`, `luminanceNormalized`, `getChannel`, `getChannelNormalized`, `set`, `setRgb`, `setRgba`, `clone`, `convert`, `==`, `hashCode`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — lib/src/color/color.dart:5
`ImageData` declares 18 abstract methods: `clone`, `format`, `formatType`, `isHdrFormat`, `bitsPerChannel`, `maxChannelValue`, `maxIndexValue`, `lengthInBytes`, `length`, `buffer`, `rowStride`, `getRange`, `getColor`, `getPixel`, `setPixelR`, `setPixelRgb`, `setPixelRgba`, `clear`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — lib/src/image/image_data.dart:9
`Palette` declares 17 abstract methods: `lengthInBytes`, `buffer`, `maxChannelValue`, `clone`, `format`, `setRgb`, `setRgba`, `set`, `get`, `getRed`, `setRed`, `getGreen`, `setGreen`, `getBlue`, `setBlue`, `getAlpha`, `setAlpha`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — lib/src/image/palette.dart:5
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Code Health — Unreviewed-generation residue in this repository's Dart: methods whose whole body still throws UnimplementedError or a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of 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.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Dart: methods that only throw UnimplementedError or a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`executeCommandAsync`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — lib/src/command/_executor.dart:7
`executeCommandImage`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — lib/src/command/_executor.dart:10
`executeCommandImageAsync`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — lib/src/command/_executor.dart:13
`executeCommandBytes`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — lib/src/command/_executor.dart:16
`executeCommandBytesAsync`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — lib/src/command/_executor.dart:19
`_readColorModeData` has an empty body — confirm it's an intentional no-op and not an unfinished method. — lib/src/formats/psd/psd_image.dart:433
`_ditherRow` has an empty body — confirm it's an intentional no-op and not an unfinished method. — lib/src/formats/webp/vp8.dart:785
`updateCache` has an empty body — confirm it's an intentional no-op and not an unfinished method. — lib/src/image/pixel_uint8.dart:122
`readFile`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — lib/src/util/_file_access.dart:5
`writeFile`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — lib/src/util/_file_access.dart:8
What to do
Clear the softer debt: re-enable or delete tests marked `skip:`, decide whether each empty method or UnsupportedError is deliberate (and say so in a comment), and replace `// ignore_for_file: type=lint` with targeted, justified ignores.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether 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.
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 · Observability0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
What to do
Write a diagnostic trail the user can hand back with a bug report: log through `package:logging` to a file in the app's support directory that a report can attach. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
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.
No static application security testing detected. For this repository's stack, add the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:7
What to do
Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for … in` loop leaves the `List`, `Map` or `Set` it is walking alone — Dart's collection iterators check that the collection has not changed since the loop began, so a body that adds to or removes from the very collection the loop is walking (or the map whose `keys`, `values` or `entries` it walks) makes the next step throw `ConcurrentModificationError` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×6) — web/filter_lab.dart:20, lib/src/formats/gif_decoder.dart:107, lib/src/formats/tiff/tiff_image.dart:370, …
`catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×8) — lib/src/formats/formats.dart:384, lib/src/formats/formats.dart:395, lib/src/formats/gif_decoder.dart:41, …
`catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — lib/src/formats/pnm_decoder.dart:220
`catch (error)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — lib/src/formats/tiff_decoder.dart:170
Other · Code Health — Whether Dart's sound null safety is on and is not undermined by null assertions — a package whose `environment: sdk:` lower bound is 2.12 or above is null safe, so `String` cannot hold null and `String?` must be checked before use, and each postfix `!` is a run-time `Null check operator used on a null value` the author has told the analyzer cannot happen.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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 — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
X10 Duplicated predicate — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
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.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Dart imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — Not applicable: Dart isolates share no mutable memory, so no two requests write one object at the same instant.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an Isar, ObjectBox, Floor or Hive entity, or a Serverpod table model — and no database or data-store client (sqflite, Drift, Isar, Hive, Realm, Firestore, Supabase, postgres, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server another machine can reach (no HttpServer or shelf server bound beyond loopback, no dart_frog route, no Serverpod endpoint, no Conduit, Alfred or Angel application) and keeps no data in a hosted backend. Access control is therefore N/A here — a Flutter app or pub package is authorized by the server it calls, not by itself; hiding a screen authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~20393 lines of test source are present (.dart) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — no .dart test runner
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
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.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
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"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .dart source were not judged.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.dart), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Dart pubspec.yaml — not scanned yet).
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) — 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.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Dart pubspec.yaml — not scanned yet).
D5 Coupling — Not applicable — this pub build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Dart source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for classes extending benchmark_harness's `BenchmarkBase`, `AsyncBenchmarkBase` or `PerfBenchmarkBase` (directly or through a base of your own), `benchmark(…)` calls under the pub `benchmark` package, Flutter's `benchmarkWidgets`, `watchPerformance` or `traceAction` in a test importing flutter_test, integration_test or flutter_driver, or benchmark_harness, benchmark or web_benchmarks in a pubspec.yaml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
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: 405 Dart file(s) were read for weak hashes and ciphers, key material fixed in the source and disabled TLS certificate validation, and none was found. This repository serves no HTTP of its own — no server framework among its pubspec dependencies, no `HttpServer` bound and no shelf, dart_frog or serverpod import in its production source or `bin/`, no web build target — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
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
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
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Dart was read, and no request in it can be cancelled by a caller (Dio, or package:http's Abortable requests) — package:http's get and post, HttpClient and Firebase or gRPC stubs offer their callers no token to take
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
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Dart isolates share no mutable memory: a value sent to another isolate arrives as a copy, and callbacks within one isolate run one at a time on its event loop, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
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 — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Dart was read, and it logs through none: package:logging, package:logger, talker and dart:developer take one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. Sentry's structured logs (`Sentry.logger`) would be judged.
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.
<html> without a lang web/exr_viewer.html:3— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/filter_lab.html:3— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/image_http_input.html:3— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/test_formats.html:3— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/test_jpeg_encoder.html:3— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/web_test.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/web_test_wasm.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC1 · Text alternatives· <img> without a text alternative · ×3
<img> without a text alternative web/exr_viewer.html:11— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative web/test_formats.html:11— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative web/test_jpeg_encoder.html:11— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels· <input> without a programmatic label · ×1
<input> without a programmatic label web/image_http_input.html:11— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
Low cohesion: Command (LCOM4 111) lib/src/command/command.dart:113— Command's methods fall into 111 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 111 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: ConstColorUint8 (LCOM4 39) lib/src/color/const_color_uint8.dart:8— ConstColorUint8'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: ColorFloat16 (LCOM4 24) lib/src/color/color_float16.dart:11— ColorFloat16's methods fall into 24 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 24 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: ColorFloat32 (LCOM4 24) lib/src/color/color_float32.dart:10— ColorFloat32's methods fall into 24 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 24 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: ColorFloat64 (LCOM4 24) lib/src/color/color_float64.dart:10— ColorFloat64's methods fall into 24 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 24 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: ColorInt16 (LCOM4 24) lib/src/color/color_int16.dart:10— ColorInt16's methods fall into 24 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 24 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: ColorInt32 (LCOM4 24) lib/src/color/color_int32.dart:10— ColorInt32's methods fall into 24 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 24 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: ColorInt8 (LCOM4 24) lib/src/color/color_int8.dart:10— ColorInt8's methods fall into 24 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 24 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: ColorUint16 (LCOM4 24) lib/src/color/color_uint16.dart:10— ColorUint16's methods fall into 24 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 24 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: ColorUint32 (LCOM4 24) lib/src/color/color_uint32.dart:10— ColorUint32's methods fall into 24 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 24 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: ColorUint8 (LCOM4 24) lib/src/color/color_uint8.dart:10— ColorUint8's methods fall into 24 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 24 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: ColorUint1 (LCOM4 22) lib/src/color/color_uint1.dart:8— ColorUint1's methods fall into 22 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 22 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: ColorUint2 (LCOM4 22) lib/src/color/color_uint2.dart:8— ColorUint2's methods fall into 22 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 22 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: ColorUint4 (LCOM4 22) lib/src/color/color_uint4.dart:10— ColorUint4's methods fall into 22 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 22 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: PixelUint32 (LCOM4 22) lib/src/image/pixel_uint32.dart:13— PixelUint32's methods fall into 22 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 22 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: PixelFloat16 (LCOM4 21) lib/src/image/pixel_float16.dart:14— PixelFloat16's methods fall into 21 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 21 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: PixelFloat32 (LCOM4 21) lib/src/image/pixel_float32.dart:13— PixelFloat32's methods fall into 21 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 21 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: PixelFloat64 (LCOM4 21) lib/src/image/pixel_float64.dart:13— PixelFloat64's methods fall into 21 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 21 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: PixelInt16 (LCOM4 21) lib/src/image/pixel_int16.dart:13— PixelInt16's methods fall into 21 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 21 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: PixelInt32 (LCOM4 21) lib/src/image/pixel_int32.dart:13— PixelInt32's methods fall into 21 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 21 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: PixelInt8 (LCOM4 21) lib/src/image/pixel_int8.dart:13— PixelInt8's methods fall into 21 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 21 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: PixelUint16 (LCOM4 19) lib/src/image/pixel_uint16.dart:13— PixelUint16's methods fall into 19 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 19 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: PixelUint1 (LCOM4 18) lib/src/image/pixel_uint1.dart:13— PixelUint1's methods fall into 18 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 18 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: PixelUint2 (LCOM4 18) lib/src/image/pixel_uint2.dart:13— PixelUint2's methods fall into 18 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 18 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: PixelUint4 (LCOM4 18) lib/src/image/pixel_uint4.dart:13— PixelUint4's methods fall into 18 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 18 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.
TooManyMethods: Command lib/src/command/command.dart:113— TooManyMethods — 127 methods. The bar is 30 methods; this is 97 over it, 4.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: Image lib/src/image/image.dart:52— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IfdDirectory lib/src/exif/ifd_directory.dart:9— 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: VP8Filter lib/src/formats/webp/vp8_filter.dart:8— 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: PixelUint1 lib/src/image/pixel_uint1.dart:13— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PixelUint2 lib/src/image/pixel_uint2.dart:13— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PixelUint4 lib/src/image/pixel_uint4.dart:13— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PixelUint8 lib/src/image/pixel_uint8.dart:13— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PixelFloat32 lib/src/image/pixel_float32.dart:13— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PixelUint16 lib/src/image/pixel_uint16.dart:13— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PixelFloat16 lib/src/image/pixel_float16.dart:14— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: PixelFloat64 lib/src/image/pixel_float64.dart:13— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: PixelInt16 lib/src/image/pixel_int16.dart:13— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: PixelInt32 lib/src/image/pixel_int32.dart:13— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: PixelInt8 lib/src/image/pixel_int8.dart:13— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: PixelUint32 lib/src/image/pixel_uint32.dart:13— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: PixelUndefined lib/src/image/pixel_undefined.dart:10— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. Most of these members implement src.Color (30 of 43 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: ColorUint1 lib/src/color/color_uint1.dart:8— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.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: ColorUint2 lib/src/color/color_uint2.dart:8— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.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: ColorUint4 lib/src/color/color_uint4.dart:10— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.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: ColorFloat16 lib/src/color/color_float16.dart:11— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. Most of these members implement src.Color (30 of 36 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: ColorFloat32 lib/src/color/color_float32.dart:10— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. Most of these members implement src.Color (30 of 36 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: ColorFloat64 lib/src/color/color_float64.dart:10— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. Most of these members implement src.Color (30 of 36 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: ColorInt16 lib/src/color/color_int16.dart:10— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. Most of these members implement src.Color (30 of 36 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: ColorInt32 lib/src/color/color_int32.dart:10— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. Most of these members implement src.Color (30 of 36 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
MethodTooLong: TiffImage._decodeTile lib/src/formats/tiff/tiff_image.dart:335— MethodTooLong — _decodeTile runs 261 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 161 over it, 2.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BmpEncoder.encode lib/src/formats/bmp_encoder.dart:22— MethodTooLong — encode runs 240 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PsdLayer.PsdLayer lib/src/formats/psd/psd_layer.dart:88— MethodTooLong — PsdLayer runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PngDecoder._startDecode lib/src/formats/png_decoder.dart:66— MethodTooLong — _startDecode 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.
MethodTooLong: ExrPart.ExrPart lib/src/formats/exr/exr_part.dart:47— MethodTooLong — ExrPart runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TiffImage.TiffImage lib/src/formats/tiff/tiff_image.dart:55— MethodTooLong — TiffImage runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PngDecoder._decodeFrame lib/src/formats/png_decoder.dart:335— MethodTooLong — _decodeFrame runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BitmapFont._parseFnt lib/src/font/bitmap_font.dart:99— MethodTooLong — _parseFnt runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: VP8L._decodeImageData lib/src/formats/webp/vp8l.dart:234— MethodTooLong — _decodeImageData runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PvrDecoder._decodePvr2 lib/src/formats/pvr_decoder.dart:251— MethodTooLong — _decodePvr2 runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× 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: PsdImage._blend lib/src/formats/psd/psd_image.dart:187— MethodTooLong — _blend runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: VP8LEncoder._writeImageStream lib/src/formats/webp/vp8l_encoder.dart:224— MethodTooLong — _writeImageStream runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TiffFaxDecoder.decodeT6 lib/src/formats/tiff/tiff_fax_decoder.dart:331— MethodTooLong — decodeT6 runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× 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: VP8Decimate._trellisQuantizeBlock lib/src/formats/webp/vp8_rd.dart:417— MethodTooLong — _trellisQuantizeBlock runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.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.
MethodTooLong: Image.getPixelCubic lib/src/image/image.dart:716— MethodTooLong — getPixelCubic runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.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: Image.fromBytes lib/src/image/image.dart:177— MethodTooLong — fromBytes runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
ClassTooLong: VP8 lib/src/formats/webp/vp8.dart:16— ClassTooLong — 980 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 580 over it, 2.45× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TiffFaxDecoder lib/src/formats/tiff/tiff_fax_decoder.dart:4— ClassTooLong — 970 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 570 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Command lib/src/command/command.dart:113— ClassTooLong — 925 significant lines (blank, comment-only and punctuation-only lines excluded), 127 methods. The bar is 400 significant lines; this is 525 over it, 2.31× 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: VP8L lib/src/formats/webp/vp8l.dart:18— ClassTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 454 over it, 2.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Image lib/src/image/image.dart:52— ClassTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 400 significant lines; this is 408 over it, 2.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PngDecoder lib/src/formats/png_decoder.dart:28— ClassTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 301 over it, 1.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: JpegEncoder lib/src/formats/jpeg_encoder.dart:21— ClassTooLong — 666 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 266 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TiffImage lib/src/formats/tiff/tiff_image.dart:19— ClassTooLong — 601 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 201 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: VP8Decimate lib/src/formats/webp/vp8_rd.dart:139— ClassTooLong — 588 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 188 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: JpegData lib/src/formats/jpeg/jpeg_data.dart:27— ClassTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 174 over it, 1.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: VP8Filter lib/src/formats/webp/vp8_filter.dart:8— ClassTooLong — 492 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 92 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GifDecoder lib/src/formats/gif_decoder.dart:15— ClassTooLong — 478 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 78 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PsdImage lib/src/formats/psd/psd_image.dart:28— ClassTooLong — 435 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 35 over it, 1.09× 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.
FileTooLong: webp/vp8.dart lib/src/formats/webp/vp8.dart— FileTooLong — 993 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: VP8 (17-1612). The bar is 500 significant lines; this is 493 over it, 1.99× 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: tiff/tiff_fax_decoder.dart lib/src/formats/tiff/tiff_fax_decoder.dart— FileTooLong — 972 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: TiffFaxDecoder (4-1635). The bar is 500 significant lines; this is 472 over it, 1.94× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: command/command.dart lib/src/command/command.dart— FileTooLong — 933 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Command (116-1364). The bar is 500 significant lines; this is 433 over it, 1.87× 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: webp/vp8l.dart lib/src/formats/webp/vp8l.dart— FileTooLong — 895 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: VP8L (19-1509). The bar is 500 significant lines; this is 395 over it, 1.79× 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: image/image.dart lib/src/image/image.dart— FileTooLong — 848 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: Image (54-1315). The bar is 500 significant lines; this is 348 over it, 1.70× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: formats/png_decoder.dart lib/src/formats/png_decoder.dart— FileTooLong — 730 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: PngDecoder (29-1018). The bar is 500 significant lines; this is 230 over it, 1.46× 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: formats/jpeg_encoder.dart lib/src/formats/jpeg_encoder.dart— FileTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: JpegEncoder (25-1428). The bar is 500 significant lines; this is 184 over it, 1.37× 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: tiff/tiff_image.dart lib/src/formats/tiff/tiff_image.dart— FileTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: TiffImage (19-836). The bar is 500 significant lines; this is 174 over it, 1.35× 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: webp/vp8_rd.dart lib/src/formats/webp/vp8_rd.dart— FileTooLong — 666 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: VP8Decimate (144-1020). The bar is 500 significant lines; this is 166 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: jpeg/jpeg_data.dart lib/src/formats/jpeg/jpeg_data.dart— FileTooLong — 602 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: JpegData (28-901). The bar is 500 significant lines; this is 102 over it, 1.20× 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: transform/_resize_bytes.dart lib/src/transform/_resize_bytes.dart— FileTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 38 over it, 1.08× 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: exif/ifd_value.dart lib/src/exif/ifd_value.dart— FileTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 over it, 1.01× 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.
Hotspot: lib/src/formats/jpeg/jpeg_data.dart lib/src/formats/jpeg/jpeg_data.dart:216— lib/src/formats/jpeg/jpeg_data.dart changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in JpegData._read at line 216. 2 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/formats/jpeg/jpeg_data.dart`: 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: lib/src/formats/png_decoder.dart lib/src/formats/png_decoder.dart:66— lib/src/formats/png_decoder.dart changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in PngDecoder._startDecode at line 66. 6 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/formats/png_decoder.dart`: 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: lib/src/formats/tiff/tiff_image.dart lib/src/formats/tiff/tiff_image.dart:335— lib/src/formats/tiff/tiff_image.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in TiffImage._decodeTile at line 335. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/formats/tiff/tiff_image.dart`: 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: lib/src/image/image.dart lib/src/image/image.dart:716— lib/src/image/image.dart changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in Image.getPixelCubic at line 716. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/image/image.dart`: 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: lib/src/formats/bmp_encoder.dart lib/src/formats/bmp_encoder.dart:22— lib/src/formats/bmp_encoder.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in BmpEncoder.encode at line 22. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/formats/bmp_encoder.dart`: 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: lib/src/formats/jpeg/jpeg_scan.dart lib/src/formats/jpeg/jpeg_scan.dart:64— lib/src/formats/jpeg/jpeg_scan.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in JpegScan.decode at line 64. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/formats/jpeg/jpeg_scan.dart`: 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: lib/src/font/bitmap_font.dart lib/src/font/bitmap_font.dart:99— lib/src/font/bitmap_font.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in BitmapFont._parseFnt at line 99. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/font/bitmap_font.dart`: 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: lib/src/formats/exr/exr_part.dart lib/src/formats/exr/exr_part.dart:47— lib/src/formats/exr/exr_part.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in ExrPart.ExrPart at line 47. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/formats/exr/exr_part.dart`: 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: lib/src/formats/ico_decoder.dart lib/src/formats/ico_decoder.dart:89— lib/src/formats/ico_decoder.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in IcoDecoder._decodeFrame at line 89. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/formats/ico_decoder.dart`: 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: lib/src/formats/bmp_decoder.dart lib/src/formats/bmp_decoder.dart:63— lib/src/formats/bmp_decoder.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in BmpDecoder._decodeFrame at line 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/formats/bmp_decoder.dart`: 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: lib/src/util/neural_quantizer.dart lib/src/util/neural_quantizer.dart:158— lib/src/util/neural_quantizer.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in NeuralQuantizer._inxSearch at line 158. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/util/neural_quantizer.dart`: 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.
Duplicated block (5 lines × 2) lib/src/color/color_uint1.dart:21— lib/src/color/color_uint1.dart:21-25 | lib/src/color/color_uint2.dart:21-25 — before extracting anything, compare `lib/src/color/color_uint1.dart` and `lib/src/color/color_uint2.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/color/color_uint1.dart:21` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) lib/src/formats/tga_decoder.dart:105— lib/src/formats/tga_decoder.dart:105-109 | lib/src/formats/tga_decoder.dart:171-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) lib/src/formats/tga_decoder.dart:217— lib/src/formats/tga_decoder.dart:217-221 | lib/src/formats/tga_decoder.dart:293-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) lib/src/image/image_data_float32.dart:78— lib/src/image/image_data_float32.dart:78-82 | lib/src/image/image_data_float64.dart:78-82 — before extracting anything, compare `lib/src/image/image_data_float32.dart` and `lib/src/image/image_data_float64.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) lib/src/image/image_data_int8.dart:79— lib/src/image/image_data_int8.dart:79-83 | lib/src/image/image_data_uint8.dart:90-94 — before extracting anything, compare `lib/src/image/image_data_int8.dart` and `lib/src/image/image_data_uint8.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) lib/src/image/pixel_uint16.dart:121— lib/src/image/pixel_uint16.dart:121-125 | lib/src/image/pixel_uint8.dart:124-128 — before extracting anything, compare `lib/src/image/pixel_uint16.dart` and `lib/src/image/pixel_uint8.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/src/image/pixel_uint8.dart:122` calls `updateCache` and `lib/src/image/pixel_uint16.dart:119` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) lib/src/color/color_float32.dart:22— lib/src/color/color_float32.dart:22-26 | lib/src/color/color_float64.dart:22-26 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) lib/src/color/color_uint1.dart:27— lib/src/color/color_uint1.dart:27-31 | lib/src/color/color_uint2.dart:27-31 — before extracting anything, compare `lib/src/color/color_uint1.dart` and `lib/src/color/color_uint2.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) lib/src/color/color_uint1.dart:33— lib/src/color/color_uint1.dart:33-37 | lib/src/color/color_uint2.dart:33-37 — before extracting anything, compare `lib/src/color/color_uint1.dart` and `lib/src/color/color_uint2.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) lib/src/formats/pvr_decoder.dart:580— lib/src/formats/pvr_decoder.dart:580-584 | lib/src/formats/pvr_decoder.dart:644-648 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Swallowed exception (caught, then discarded) lib/src/formats/formats.dart:384— `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/formats.dart:395— `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/gif_decoder.dart:41— `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/ico_decoder.dart:39— `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/jpeg_decoder.dart:52— `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/pnm_decoder.dart:220— `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/psd_decoder.dart:31— `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/pvr_decoder.dart:33— `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/tiff_decoder.dart:170— `catch (error)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) lib/src/formats/webp_decoder.dart:48— `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
TodoComment web/image_http_input.dart:13— // TODO: how do you do this with package:web? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment web/image_http_input.dart:25— // TODO: how do you do this with package:web? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment web/image_http_input.dart:66— // TODO: how do you do this with package:web? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment web/test_formats.dart:66— // TODO: how do you do this with package:web? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment web/test_formats.dart:84— // TODO: how do you do this with package:web? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/src/formats/png_decoder.dart:180— // TODO: parse exif — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/src/formats/tiff_encoder.dart:25— // TODO: support encoding HDR images to TIFF. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/src/formats/psd/psd_image.dart:434— // TODO support indexed and duotone images. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/src/formats/exr/exr_image.dart:147— // TODO support sub-levels (for rip/mip-mapping). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (10 lines × 2) lib/src/color/color_float32.dart:178— lib/src/color/color_float32.dart:178-187 | lib/src/color/color_float64.dart:171-180 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) lib/src/formats/tiff/tiff_image.dart:509— lib/src/formats/tiff/tiff_image.dart:509-518 | lib/src/formats/tiff/tiff_image.dart:576-585 — both copies are in the same file, so extract the 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 `lib/src/formats/tiff/tiff_image.dart:509` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/src/formats/tiff/tiff_image.dart:519— lib/src/formats/tiff/tiff_image.dart:519-528 | lib/src/formats/tiff/tiff_image.dart:594-603 — both copies are in the same file, so extract the 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 `lib/src/formats/tiff/tiff_image.dart:519` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/src/formats/tiff/tiff_image.dart:529— lib/src/formats/tiff/tiff_image.dart:529-538 | lib/src/formats/tiff/tiff_image.dart:612-621 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/tiff/tiff_image.dart:529` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/src/formats/webp/vp8l.dart:364— lib/src/formats/webp/vp8l.dart:364-373 | lib/src/formats/webp/vp8l.dart:558-567 — both copies are in the same file, so extract the 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 `lib/src/formats/webp/vp8l.dart:364` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/src/image/image_data_float32.dart:84— lib/src/image/image_data_float32.dart:84-93 | lib/src/image/image_data_float64.dart:84-93 — before extracting anything, compare `lib/src/image/image_data_float32.dart` and `lib/src/image/image_data_float64.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) lib/src/image/image_data_int8.dart:85— lib/src/image/image_data_int8.dart:85-94 | lib/src/image/image_data_uint8.dart:96-105 — before extracting anything, compare `lib/src/image/image_data_int8.dart` and `lib/src/image/image_data_uint8.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) lib/src/formats/webp/vp8_filter.dart:160— lib/src/formats/webp/vp8_filter.dart:160-165 | lib/src/formats/webp/vp8_filter.dart:200-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) lib/src/color/color_float32.dart:65— lib/src/color/color_float32.dart:65-70 | lib/src/color/color_float64.dart:57-62 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) lib/src/image/pixel_float32.dart:116— lib/src/image/pixel_float32.dart:116-121 | lib/src/image/pixel_float64.dart:114-119 — before extracting anything, compare `lib/src/image/pixel_float32.dart` and `lib/src/image/pixel_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/src/image/pixel_float32.dart:111` calls `nextPixel`, `moveNext` and `lib/src/image/pixel_float64.dart:109` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) lib/src/image/pixel_uint16.dart:145— lib/src/image/pixel_uint16.dart:145-150 | lib/src/image/pixel_uint8.dart:145-150 — before extracting anything, compare `lib/src/image/pixel_uint16.dart` and `lib/src/image/pixel_uint8.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) lib/src/command/transform/copy_flip_cmd.dart:10— lib/src/command/transform/copy_flip_cmd.dart:10-15 | lib/src/command/transform/flip_cmd.dart:9-14 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) lib/src/formats/webp/vp8_filter.dart:102— lib/src/formats/webp/vp8_filter.dart:102-107 | lib/src/formats/webp/vp8_filter.dart:115-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/webp/vp8_filter.dart:102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) lib/src/formats/webp/vp8_filter.dart:458— lib/src/formats/webp/vp8_filter.dart:458-463 | lib/src/formats/webp/vp8_filter.dart:521-526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) lib/src/exif/exif_data.dart:70— lib/src/exif/exif_data.dart:70-77 | lib/src/exif/exif_data.dart:81-88 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) lib/src/image/pixel_uint8.dart:168— lib/src/image/pixel_uint8.dart:168-175 | lib/src/image/pixel_uint8.dart:186-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) lib/src/image/pixel_float32.dart:175— lib/src/image/pixel_float32.dart:175-182 | lib/src/image/pixel_float64.dart:175-182 — before extracting anything, compare `lib/src/image/pixel_float32.dart` and `lib/src/image/pixel_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) lib/src/image/pixel_uint16.dart:159— lib/src/image/pixel_uint16.dart:159-166 | lib/src/image/pixel_uint8.dart:159-166 — before extracting anything, compare `lib/src/image/pixel_uint16.dart` and `lib/src/image/pixel_uint8.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) lib/src/image/pixel_uint16.dart:177— lib/src/image/pixel_uint16.dart:177-184 | lib/src/image/pixel_uint8.dart:177-184 — before extracting anything, compare `lib/src/image/pixel_uint16.dart` and `lib/src/image/pixel_uint8.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) lib/src/image/pixel_uint16.dart:244— lib/src/image/pixel_uint16.dart:244-251 | lib/src/image/pixel_uint8.dart:239-246 — before extracting anything, compare `lib/src/image/pixel_uint16.dart` and `lib/src/image/pixel_uint8.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Swallowed exception (empty catch) web/filter_lab.dart:20— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) lib/src/formats/gif_decoder.dart:107— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) lib/src/formats/tiff/tiff_image.dart:370— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) lib/src/formats/tiff/tiff_image.dart:751— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) lib/src/formats/tiff/tiff_image.dart:757— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) lib/src/formats/tiff/tiff_image.dart:763— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Repeated repair: lib/src/transform/resize.dart lib/src/transform/resize.dart:515— lib/src/transform/resize.dart changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is _CubicRows.prepare at line 515), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Improved speed, yellowish bug fixes, fixes”; “Fix in-place resize with letterboxing”; “fix: safely reuse resize buffers across supported paths”; “fix: preserve in-place resizing with bounded memory”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/transform/resize.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: lib/src/image/pixel_uint16.dart lib/src/image/pixel_uint16.dart:297— lib/src/image/pixel_uint16.dart changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is PixelUint16.== at line 297), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Improved speed, yellowish bug fixes, fixes”; “Fix 2 channel images as grayscale+alpha”; “Fix opaque alpha defaults and WebP alpha decode”; “webp fixes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/image/pixel_uint16.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: lib/src/image/pixel_uint1.dart lib/src/image/pixel_uint1.dart:312— lib/src/image/pixel_uint1.dart changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is PixelUint1.== at line 312), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Improved speed, yellowish bug fixes, fixes”; “Fix 2 channel images as grayscale+alpha”; “Fix opaque alpha defaults and WebP alpha decode”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/image/pixel_uint1.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: lib/src/image/pixel_uint2.dart lib/src/image/pixel_uint2.dart:309— lib/src/image/pixel_uint2.dart changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is PixelUint2.== at line 309), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Improved speed, yellowish bug fixes, fixes”; “Fix 2 channel images as grayscale+alpha”; “Fix opaque alpha defaults and WebP alpha decode”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/image/pixel_uint2.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: lib/src/image/pixel_uint4.dart lib/src/image/pixel_uint4.dart:311— lib/src/image/pixel_uint4.dart changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is PixelUint4.== at line 311), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Improved speed, yellowish bug fixes, fixes”; “Fix 2 channel images as grayscale+alpha”; “Fix opaque alpha defaults and WebP alpha decode”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 10:54:33 -07:00' --until='2026-11-14 10:54:33 -07:00' --full-history --no-merges -- lib/src/image/pixel_uint4.dart`: 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.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×5
Edited copy of a member (8 corresponding lines) lib/src/formats/webp/vp8l_transform.dart:315— lib/src/formats/webp/vp8l_transform.dart:315-323 | lib/src/formats/webp/vp8l_transform.dart:328-335 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) lib/src/image/pixel_uint8.dart:204— lib/src/image/pixel_uint8.dart:204-211 | lib/src/image/pixel_uint16.dart:204-211 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) lib/src/image/pixel_uint16.dart:168— lib/src/image/pixel_uint16.dart:168-175 | lib/src/image/pixel_uint32.dart:143-150 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) lib/src/image/pixel_uint16.dart:186— lib/src/image/pixel_uint16.dart:186-193 | lib/src/image/pixel_uint32.dart:159-166 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) lib/src/image/pixel_uint16.dart:195— lib/src/image/pixel_uint16.dart:195-202 | lib/src/image/pixel_uint8.dart:195-202 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×5
Edited copy of a member (7 corresponding lines) lib/src/formats/webp/vp8_filter.dart:182— lib/src/formats/webp/vp8_filter.dart:182-188 | lib/src/formats/webp/vp8_filter.dart:190-196 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) lib/src/formats/webp/vp8_filter.dart:60— lib/src/formats/webp/vp8_filter.dart:60-66 | lib/src/formats/webp/vp8_filter.dart:68-74 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) lib/src/formats/psd/psd_image.dart:361— lib/src/formats/psd/psd_image.dart:361-367 | lib/src/formats/psd/psd_image.dart:369-377 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) lib/src/formats/webp/vp8_filter.dart:554— lib/src/formats/webp/vp8_filter.dart:554-560 | lib/src/formats/webp/vp8_filter.dart:606-612 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) lib/src/formats/webp/vp8_filter.dart:19— lib/src/formats/webp/vp8_filter.dart:19-25 | lib/src/formats/webp/vp8_filter.dart:27-34 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) lib/src/formats/bmp_encoder.dart:243— lib/src/formats/bmp_encoder.dart:243-251 | lib/src/formats/bmp_encoder.dart:252-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/bmp_encoder.dart:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) lib/src/formats/pvr_decoder.dart:109— lib/src/formats/pvr_decoder.dart:109-117 | lib/src/formats/pvr_decoder.dart:142-150 — both copies are in the same file, so extract the 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 `lib/src/formats/pvr_decoder.dart:109` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/src/formats/pvr_decoder.dart:118` calls `readUint32` and `lib/src/formats/pvr_decoder.dart:151` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) lib/src/image/pixel_float16.dart:158— lib/src/image/pixel_float16.dart:158-166 | lib/src/image/pixel_float16.dart:175-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) lib/src/image/pixel_float32.dart:233— lib/src/image/pixel_float32.dart:233-241 | lib/src/image/pixel_float64.dart:233-241 — before extracting anything, compare `lib/src/image/pixel_float32.dart` and `lib/src/image/pixel_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) lib/src/image/pixel_uint2.dart:151— lib/src/image/pixel_uint2.dart:151-159 | lib/src/image/pixel_uint4.dart:154-162 — before extracting anything, compare `lib/src/image/pixel_uint2.dart` and `lib/src/image/pixel_uint4.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (6 members, 50+ identical tokens) lib/src/color/color_int16.dart:168— lib/src/color/color_int16.dart:168-177 | lib/src/color/color_int32.dart:168-177 | lib/src/color/color_int8.dart:168-177 | lib/src/color/color_uint16.dart:168-177 | lib/src/color/color_uint32.dart:168-177 | lib/src/color/color_uint8.dart:172-181 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) lib/src/color/color_int16.dart:179— lib/src/color/color_int16.dart:179-193 | lib/src/color/color_int32.dart:179-193 | lib/src/color/color_int8.dart:179-193 | lib/src/color/color_uint16.dart:179-193 | lib/src/color/color_uint32.dart:179-193 | lib/src/color/color_uint8.dart:183-197 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) lib/src/image/pixel_int16.dart:233— lib/src/image/pixel_int16.dart:233-243 | lib/src/image/pixel_int32.dart:233-243 | lib/src/image/pixel_int8.dart:233-243 | lib/src/image/pixel_uint16.dart:265-275 | lib/src/image/pixel_uint32.dart:233-243 | lib/src/image/pixel_uint8.dart:264-274 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) lib/src/image/pixel_int16.dart:245— lib/src/image/pixel_int16.dart:245-260 | lib/src/image/pixel_int32.dart:245-260 | lib/src/image/pixel_int8.dart:245-260 | lib/src/image/pixel_uint16.dart:277-292 | lib/src/image/pixel_uint32.dart:245-260 | lib/src/image/pixel_uint8.dart:276-291 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) lib/src/formats/exr/exr_piz_compressor.dart:43— lib/src/formats/exr/exr_piz_compressor.dart:43-140 | lib/src/formats/exr/exr_pxr24_compressor.dart:35-127 | lib/src/formats/exr/exr_rle_compressor.dart:31-100 | lib/src/formats/exr/exr_zip_compressor.dart:37-90 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) lib/src/formats/pvr_decoder.dart:533— lib/src/formats/pvr_decoder.dart:533-595 | lib/src/formats/pvr_decoder.dart:597-660 | lib/src/formats/pvr_encoder.dart:89-190 | lib/src/formats/pvr_encoder.dart:192-295 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) lib/src/image/image_data_int16.dart:85— lib/src/image/image_data_int16.dart:85-94 | lib/src/image/image_data_int32.dart:85-94 | lib/src/image/image_data_uint16.dart:93-102 | lib/src/image/image_data_uint32.dart:85-94 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) lib/src/image/palette_float32.dart:37— lib/src/image/palette_float32.dart:37-47 | lib/src/image/palette_float32.dart:49-62 | lib/src/image/palette_float64.dart:40-50 | lib/src/image/palette_float64.dart:52-65 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×4
Edited copy of a member (14 corresponding lines) lib/src/image/image_data_float16.dart:96— lib/src/image/image_data_float16.dart:96-110 | lib/src/image/palette_float16.dart:50-63 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) lib/src/command/filter/color_offset_cmd.dart:22— lib/src/command/filter/color_offset_cmd.dart:22-35 | lib/src/command/filter/copy_image_channels_cmd.dart:26-42 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) lib/src/command/filter/bulge_distortion_cmd.dart:27— lib/src/command/filter/bulge_distortion_cmd.dart:27-42 | lib/src/command/filter/stretch_distortion_cmd.dart:23-36 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) lib/src/command/filter/pixelate_cmd.dart:22— lib/src/command/filter/pixelate_cmd.dart:22-35 | lib/src/command/filter/vignette_cmd.dart:25-39 — 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.
Duplicated block (15 lines × 2) lib/src/color/color_float32.dart:189— lib/src/color/color_float32.dart:189-203 | lib/src/color/color_float64.dart:182-196 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) lib/src/formats/exr/exr_wavelet.dart:85— lib/src/formats/exr/exr_wavelet.dart:85-99 | lib/src/formats/exr/exr_wavelet.dart:107-121 — both copies are in the same file, so extract the 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 `lib/src/formats/exr/exr_wavelet.dart:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) lib/src/formats/webp/vp8l_transform.dart:74— lib/src/formats/webp/vp8l_transform.dart:74-88 | lib/src/formats/webp/vp8l_transform.dart:112-126 — both copies are in the same file, so extract the 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 `lib/src/formats/webp/vp8l_transform.dart:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) lib/src/image/image_data_float32.dart:95— lib/src/image/image_data_float32.dart:95-109 | lib/src/image/image_data_float64.dart:95-109 — before extracting anything, compare `lib/src/image/image_data_float32.dart` and `lib/src/image/image_data_float64.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) lib/src/formats/tiff/tiff_image.dart:494— lib/src/formats/tiff/tiff_image.dart:494-500 | lib/src/formats/tiff/tiff_image.dart:558-564 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/tiff/tiff_image.dart:494` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) lib/src/formats/webp/vp8.dart:1221— lib/src/formats/webp/vp8.dart:1221-1227 | lib/src/formats/webp/vp8.dart:1243-1249 — both copies are in the same file, so extract the 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 `lib/src/formats/webp/vp8.dart:1221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) lib/src/formats/bmp/bmp_info.dart:260— lib/src/formats/bmp/bmp_info.dart:260-266 | lib/src/formats/bmp/bmp_info.dart:280-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) lib/src/image/palette_float32.dart:29— lib/src/image/palette_float32.dart:29-35 | lib/src/image/palette_float64.dart:32-38 — before extracting anything, compare `lib/src/image/palette_float32.dart` and `lib/src/image/palette_float64.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
AC3 · Page structure· Page without a main landmark · ×3
Page without a main landmark web/filter_lab.html:3— 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 web/web_test.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 web/web_test_wasm.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) lib/src/image/image_data_int8.dart:96— lib/src/image/image_data_int8.dart:96-110 | lib/src/image/image_data_uint8.dart:107-121 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) lib/src/command/command.dart:739— lib/src/command/command.dart:739-757 | lib/src/command/command.dart:1103-1117 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) lib/src/command/command.dart:996— lib/src/command/command.dart:996-1010 | lib/src/command/command.dart:1119-1135 — 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 (17 corresponding lines) · ×3
Edited copy of a member (17 corresponding lines) lib/src/formats/jpeg_encoder.dart:687— lib/src/formats/jpeg_encoder.dart:687-703 | lib/src/formats/jpeg_encoder.dart:724-741 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) lib/src/command/command.dart:636— lib/src/command/command.dart:636-652 | lib/src/command/command.dart:670-690 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) lib/src/formats/jpeg/jpeg_util.dart:132— lib/src/formats/jpeg/jpeg_util.dart:132-148 | lib/src/formats/jpeg_encoder.dart:705-722 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) lib/src/image/palette_float32.dart:49— lib/src/image/palette_float32.dart:49-62 | lib/src/image/palette_float64.dart:52-65 — before extracting anything, compare `lib/src/image/palette_float32.dart` and `lib/src/image/palette_float64.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) lib/src/image/pixel_float32.dart:243— lib/src/image/pixel_float32.dart:243-256 | lib/src/image/pixel_float64.dart:243-256 — before extracting anything, compare `lib/src/image/pixel_float32.dart` and `lib/src/image/pixel_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) lib/src/formats/exr/exr_pxr24_compressor.dart:80— lib/src/formats/exr/exr_pxr24_compressor.dart:80-93 | lib/src/formats/exr/exr_pxr24_compressor.dart:108-121 — both copies are in the same file, so extract the 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 (7 lines × 8) lib/src/color/color_float32.dart:82— lib/src/color/color_float32.dart:82-88 | lib/src/color/color_float64.dart:74-80 | lib/src/color/color_int16.dart:72-78 | lib/src/color/color_int32.dart:72-78 | lib/src/color/color_int8.dart:72-78 | lib/src/color/color_uint16.dart:72-78 | lib/src/color/color_uint32.dart:72-78 | lib/src/color/color_uint8.dart:76-82 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 8) lib/src/color/color_float32.dart:98— lib/src/color/color_float32.dart:98-104 | lib/src/color/color_float64.dart:90-96 | lib/src/color/color_int16.dart:88-94 | lib/src/color/color_int32.dart:88-94 | lib/src/color/color_int8.dart:88-94 | lib/src/color/color_uint16.dart:88-94 | lib/src/color/color_uint32.dart:88-94 | lib/src/color/color_uint8.dart:92-98 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 8) lib/src/color/color_float32.dart:114— lib/src/color/color_float32.dart:114-120 | lib/src/color/color_float64.dart:106-112 | lib/src/color/color_int16.dart:104-110 | lib/src/color/color_int32.dart:104-110 | lib/src/color/color_int8.dart:104-110 | lib/src/color/color_uint16.dart:104-110 | lib/src/color/color_uint32.dart:104-110 | lib/src/color/color_uint8.dart:108-114 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Change coupling: _jpeg_quantize_html.dart ↔ _jpeg_quantize_io.dart lib/src/formats/jpeg/_jpeg_quantize_html.dart:1— `lib/src/formats/jpeg/_jpeg_quantize_html.dart` and `lib/src/formats/jpeg/_jpeg_quantize_io.dart` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `78baa23d` Faster JPEG color conversion, fix flip both; `da5db335` fix analyzer error; `46c87a4a` fix jpeg with adobe rgb color transformation — run `git show` on any of them.
Change coupling: png_decoder.dart ↔ png_encoder.dart lib/src/formats/png_decoder.dart:1— `lib/src/formats/png_decoder.dart` and `lib/src/formats/png_encoder.dart` change together 54% of the time (15 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `f4f80903` Parse and round-trip the PNG cICP (colour-space) chunk; `88a2d9f4` Add physical pixel size handling for PNG.; `8ce5ac8d` clean up analyzer errors — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) lib/src/formats/webp/vp8_filter.dart:447— lib/src/formats/webp/vp8_filter.dart:447-467 | lib/src/formats/webp/vp8_filter.dart:509-530 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) lib/src/formats/webp/vp8_bool_encoder.dart:73— lib/src/formats/webp/vp8_bool_encoder.dart:73-94 | lib/src/formats/webp/vp8_bool_encoder.dart:96-116 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×2
Edited copy of a member (26 corresponding lines) lib/src/formats/pvr_encoder.dart:297— lib/src/formats/pvr_encoder.dart:297-322 | lib/src/formats/pvr_encoder.dart:324-349 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) lib/src/formats/ico_decoder.dart:58— lib/src/formats/ico_decoder.dart:58-84 | lib/src/formats/psd_decoder.dart:51-76 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×2
Edited copy of a member (12 corresponding lines) lib/src/formats/webp/vp8_filter.dart:128— lib/src/formats/webp/vp8_filter.dart:128-139 | lib/src/formats/webp/vp8_filter.dart:142-156 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/src/formats/webp/vp8_filter.dart:101— lib/src/formats/webp/vp8_filter.dart:101-112 | lib/src/formats/webp/vp8_filter.dart:114-125 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×2
Edited copies of one member (3 members, 15+ corresponding lines) lib/src/formats/pvr/pvr_packet.dart:117— lib/src/formats/pvr/pvr_packet.dart:117-131 | lib/src/formats/pvr/pvr_packet.dart:133-151 | lib/src/formats/pvr/pvr_packet.dart:169-187 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) lib/src/command/command.dart:256— lib/src/command/command.dart:256-270 | lib/src/command/command.dart:272-287 | lib/src/command/command.dart:1012-1030 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) lib/src/formats/png_encoder.dart:398— lib/src/formats/png_encoder.dart:398-407 | lib/src/formats/png_encoder.dart:417-427 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) lib/src/image/image_data_float16.dart:85— lib/src/image/image_data_float16.dart:85-94 | lib/src/image/palette_float16.dart:38-48 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) lib/src/color/color_float32.dart:28— lib/src/color/color_float32.dart:28-33 | lib/src/color/color_float64.dart:28-33 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) lib/src/image/image_data_uint2.dart:20— lib/src/image/image_data_uint2.dart:20-25 | lib/src/image/image_data_uint4.dart:20-31 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×2
Edited copy of a member (9 corresponding lines) lib/src/image/pixel_uint1.dart:108— lib/src/image/pixel_uint1.dart:108-116 | lib/src/image/pixel_uint2.dart:108-116 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/src/image/pixel_float16.dart:243— lib/src/image/pixel_float16.dart:243-251 | lib/src/image/pixel_uint8.dart:252-262 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×2
Edited copy of a member (4 corresponding lines) lib/src/formats/png_decoder.dart:881— lib/src/formats/png_decoder.dart:881-884 | lib/src/formats/png_encoder.dart:458-461 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) lib/src/formats/exr/exr_b44_compressor.dart:31— lib/src/formats/exr/exr_b44_compressor.dart:31-35 | lib/src/formats/exr/exr_compressor.dart:75-78 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (29 lines × 2) lib/src/formats/exr/exr_rle_compressor.dart:72— lib/src/formats/exr/exr_rle_compressor.dart:72-100 | lib/src/formats/exr/exr_zip_compressor.dart:62-90 — before extracting anything, compare `lib/src/formats/exr/exr_rle_compressor.dart` and `lib/src/formats/exr/exr_zip_compressor.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/exr/exr_rle_compressor.dart:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (29 lines × 2) lib/src/image/pixel_uint16.dart:300— lib/src/image/pixel_uint16.dart:300-328 | lib/src/image/pixel_uint8.dart:299-327 — before extracting anything, compare `lib/src/image/pixel_uint16.dart` and `lib/src/image/pixel_uint8.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/image/pixel_uint16.dart:300` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (19 lines × 2) lib/src/formats/pvr_encoder.dart:90— lib/src/formats/pvr_encoder.dart:90-108 | lib/src/formats/pvr_encoder.dart:193-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) lib/src/formats/pvr_encoder.dart:304— lib/src/formats/pvr_encoder.dart:304-322 | lib/src/formats/pvr_encoder.dart:331-349 — both copies are in the same file, so extract the 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 `lib/src/formats/pvr_encoder.dart:304` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15–16 lines × 3) lib/src/formats/webp/vp8l.dart:271— lib/src/formats/webp/vp8l.dart:271-286 | lib/src/formats/webp/vp8l.dart:312-327 | lib/src/formats/webp/vp8l.dart:349-363 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15–16 lines × 3) lib/src/formats/webp/webp_filters.dart:78— lib/src/formats/webp/webp_filters.dart:78-92 | lib/src/formats/webp/webp_filters.dart:110-125 | lib/src/formats/webp/webp_filters.dart:151-165 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/webp/webp_filters.dart:78` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 2) lib/src/formats/exr/exr_image.dart:200— lib/src/formats/exr/exr_image.dart:200-215 | lib/src/formats/exr/exr_image.dart:288-303 — both copies are in the same file, so extract the 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 `lib/src/formats/exr/exr_image.dart:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) lib/src/formats/png_decoder.dart:857— lib/src/formats/png_decoder.dart:857-872 | lib/src/formats/png_encoder.dart:437-452 — 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 `lib/src/formats/png_decoder.dart:857` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `prevRow` to `Uint8List?` in one and `Uint8List` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 3) lib/src/color/color_uint1.dart:173— lib/src/color/color_uint1.dart:173-184 | lib/src/color/color_uint2.dart:159-170 | lib/src/color/color_uint4.dart:171-182 — before extracting anything, compare `lib/src/color/color_uint1.dart` and `lib/src/color/color_uint2.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 3) lib/src/image/pixel_uint1.dart:278— lib/src/image/pixel_uint1.dart:278-289 | lib/src/image/pixel_uint2.dart:275-286 | lib/src/image/pixel_uint4.dart:277-288 — before extracting anything, compare `lib/src/image/pixel_uint1.dart` and `lib/src/image/pixel_uint2.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 6) lib/src/image/palette_int16.dart:37— lib/src/image/palette_int16.dart:37-47 | lib/src/image/palette_int32.dart:37-47 | lib/src/image/palette_int8.dart:37-47 | lib/src/image/palette_uint16.dart:37-47 | lib/src/image/palette_uint32.dart:37-47 | lib/src/image/palette_uint8.dart:37-47 — before extracting anything, compare `lib/src/image/palette_int16.dart` and `lib/src/image/palette_int32.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 6) lib/src/image/pixel_int16.dart:233— lib/src/image/pixel_int16.dart:233-243 | lib/src/image/pixel_int32.dart:233-243 | lib/src/image/pixel_int8.dart:233-243 | lib/src/image/pixel_uint16.dart:265-275 | lib/src/image/pixel_uint32.dart:233-243 | lib/src/image/pixel_uint8.dart:264-274 — before extracting anything, compare `lib/src/image/pixel_int16.dart` and `lib/src/image/pixel_int32.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) lib/src/formats/jpeg_encoder.dart:83— lib/src/formats/jpeg_encoder.dart:83-93 | lib/src/formats/jpeg_encoder.dart:109-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/jpeg_encoder.dart:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) lib/src/image/palette_float32.dart:37— lib/src/image/palette_float32.dart:37-47 | lib/src/image/palette_float64.dart:40-50 — before extracting anything, compare `lib/src/image/palette_float32.dart` and `lib/src/image/palette_float64.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 6) lib/src/color/color_int16.dart:168— lib/src/color/color_int16.dart:168-177 | lib/src/color/color_int32.dart:168-177 | lib/src/color/color_int8.dart:168-177 | lib/src/color/color_uint16.dart:168-177 | lib/src/color/color_uint32.dart:168-177 | lib/src/color/color_uint8.dart:172-181 — before extracting anything, compare `lib/src/color/color_int16.dart` and `lib/src/color/color_int32.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 6) lib/src/image/pixel_float32.dart:210— lib/src/image/pixel_float32.dart:210-219 | lib/src/image/pixel_float64.dart:210-219 | lib/src/image/pixel_int16.dart:210-219 | lib/src/image/pixel_int32.dart:210-219 | lib/src/image/pixel_int8.dart:210-219 | lib/src/image/pixel_uint32.dart:210-219 — before extracting anything, compare `lib/src/image/pixel_float32.dart` and `lib/src/image/pixel_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 4) lib/src/image/palette_float32.dart:39— lib/src/image/palette_float32.dart:39-44 | lib/src/image/palette_float32.dart:51-56 | lib/src/image/palette_float64.dart:42-47 | lib/src/image/palette_float64.dart:54-59 — before extracting anything, compare `lib/src/image/palette_float32.dart` and `lib/src/image/palette_float64.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/image/palette_float32.dart:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/src/image/palette_float32.dart:58` calls `toDouble` and `lib/src/image/palette_float32.dart:45` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 4) lib/src/formats/exr_decoder.dart:63— lib/src/formats/exr_decoder.dart:63-69 | lib/src/formats/pnm_decoder.dart:67-72 | lib/src/formats/pvr_decoder.dart:244-249 | lib/src/formats/tga_decoder.dart:43-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 6) lib/src/color/color_float32.dart:89— lib/src/color/color_float32.dart:89-96 | lib/src/color/color_float32.dart:105-112 | lib/src/color/color_float32.dart:121-128 | lib/src/color/color_float64.dart:81-88 | lib/src/color/color_float64.dart:97-104 | lib/src/color/color_float64.dart:113-120 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 6) lib/src/image/pixel_int16.dart:143— lib/src/image/pixel_int16.dart:143-150 | lib/src/image/pixel_int16.dart:159-166 | lib/src/image/pixel_int32.dart:143-150 | lib/src/image/pixel_int32.dart:159-166 | lib/src/image/pixel_int8.dart:143-150 | lib/src/image/pixel_int8.dart:159-166 — before extracting anything, compare `lib/src/image/pixel_int16.dart` and `lib/src/image/pixel_int32.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 6) lib/src/color/color_int16.dart:55— lib/src/color/color_int16.dart:55-60 | lib/src/color/color_int32.dart:55-60 | lib/src/color/color_int8.dart:55-60 | lib/src/color/color_uint16.dart:55-60 | lib/src/color/color_uint32.dart:55-60 | lib/src/color/color_uint8.dart:55-60 — before extracting anything, compare `lib/src/color/color_int16.dart` and `lib/src/color/color_int32.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 6) lib/src/color/color_int16.dart:26— lib/src/color/color_int16.dart:26-31 | lib/src/color/color_int32.dart:26-31 | lib/src/color/color_int8.dart:26-31 | lib/src/color/color_uint16.dart:26-31 | lib/src/color/color_uint32.dart:26-31 | lib/src/color/color_uint8.dart:26-31 — before extracting anything, compare `lib/src/color/color_int16.dart` and `lib/src/color/color_int32.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) lib/src/color/color_uint1.dart:146— lib/src/color/color_uint1.dart:146-152 | lib/src/color/color_uint2.dart:132-138 | lib/src/color/color_uint4.dart:144-150 — before extracting anything, compare `lib/src/color/color_uint1.dart` and `lib/src/color/color_uint2.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) lib/src/formats/webp/vp8_filter.dart:407— lib/src/formats/webp/vp8_filter.dart:407-413 | lib/src/formats/webp/vp8_filter.dart:448-454 | lib/src/formats/webp/vp8_filter.dart:511-517 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) lib/src/color/color_uint1.dart:163— lib/src/color/color_uint1.dart:163-171 | lib/src/color/color_uint2.dart:149-157 | lib/src/color/color_uint4.dart:161-169 — before extracting anything, compare `lib/src/color/color_uint1.dart` and `lib/src/color/color_uint2.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) lib/src/image/image_data_uint1.dart:95— lib/src/image/image_data_uint1.dart:95-103 | lib/src/image/image_data_uint2.dart:95-103 | lib/src/image/image_data_uint4.dart:101-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (8 lines × 7) lib/src/image/palette_float32.dart:74— lib/src/image/palette_float32.dart:74-81 | lib/src/image/palette_float64.dart:77-84 | lib/src/image/palette_int16.dart:74-81 | lib/src/image/palette_int32.dart:74-81 | lib/src/image/palette_int8.dart:74-81 | lib/src/image/palette_uint16.dart:74-81 | lib/src/image/palette_uint32.dart:74-81 — before extracting anything, compare `lib/src/image/palette_float32.dart` and `lib/src/image/palette_float64.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 7) lib/src/image/palette_float32.dart:83— lib/src/image/palette_float32.dart:83-90 | lib/src/image/palette_float64.dart:86-93 | lib/src/image/palette_int16.dart:83-90 | lib/src/image/palette_int32.dart:83-90 | lib/src/image/palette_int8.dart:83-90 | lib/src/image/palette_uint16.dart:83-90 | lib/src/image/palette_uint32.dart:83-90 — before extracting anything, compare `lib/src/image/palette_float32.dart` and `lib/src/image/palette_float64.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 5) lib/src/image/pixel_float64.dart:168— lib/src/image/pixel_float64.dart:168-173 | lib/src/image/pixel_int16.dart:168-173 | lib/src/image/pixel_int32.dart:168-173 | lib/src/image/pixel_int8.dart:168-173 | lib/src/image/pixel_uint32.dart:168-173 — before extracting anything, compare `lib/src/image/pixel_float64.dart` and `lib/src/image/pixel_int16.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) lib/src/image/pixel_int16.dart:114— lib/src/image/pixel_int16.dart:114-119 | lib/src/image/pixel_int32.dart:114-119 | lib/src/image/pixel_int8.dart:114-119 | lib/src/image/pixel_uint16.dart:130-135 | lib/src/image/pixel_uint32.dart:114-119 — before extracting anything, compare `lib/src/image/pixel_int16.dart` and `lib/src/image/pixel_int32.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) lib/src/image/pixel_uint1.dart:164— lib/src/image/pixel_uint1.dart:164-168 | lib/src/image/pixel_uint2.dart:161-165 | lib/src/image/pixel_uint4.dart:164-168 — before extracting anything, compare `lib/src/image/pixel_uint1.dart` and `lib/src/image/pixel_uint2.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) lib/src/image/image_data_uint1.dart:27— lib/src/image/image_data_uint1.dart:27-31 | lib/src/image/image_data_uint2.dart:27-31 | lib/src/image/image_data_uint4.dart:33-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (10 lines × 3) lib/src/image/pixel_uint1.dart:216— lib/src/image/pixel_uint1.dart:216-225 | lib/src/image/pixel_uint2.dart:213-222 | lib/src/image/pixel_uint4.dart:215-224 — before extracting anything, compare `lib/src/image/pixel_uint1.dart` and `lib/src/image/pixel_uint2.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 3) lib/src/image/pixel_uint1.dart:255— lib/src/image/pixel_uint1.dart:255-264 | lib/src/image/pixel_uint2.dart:252-261 | lib/src/image/pixel_uint4.dart:254-263 — before extracting anything, compare `lib/src/image/pixel_uint1.dart` and `lib/src/image/pixel_uint2.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×1
Focus outline removed in CSS without a :focus replacement web/res/filter_lab.css:50— `.ui-state-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.
TiffImage._decodeTile (cyclomatic 106) lib/src/formats/tiff/tiff_image.dart:335— TiffImage._decodeTile has cyclomatic complexity 106 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BmpEncoder.encode (cyclomatic 94) lib/src/formats/bmp_encoder.dart:22— BmpEncoder.encode has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TiffImage.TiffImage (cyclomatic 63) lib/src/formats/tiff/tiff_image.dart:55— TiffImage.TiffImage 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.
PngDecoder._startDecode (cyclomatic 50) lib/src/formats/png_decoder.dart:66— PngDecoder._startDecode 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.
IfdDirectory.[]= (cyclomatic 49) lib/src/exif/ifd_directory.dart:72— IfdDirectory.[]= 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.
JpegData._read (cyclomatic 49) lib/src/formats/jpeg/jpeg_data.dart:216— JpegData._read has cyclomatic complexity 49 (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.
PngDecoder._decodeFrame (cyclomatic 46) lib/src/formats/png_decoder.dart:335— PngDecoder._decodeFrame 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.
Image.getPixelCubic (cyclomatic 46) lib/src/image/image.dart:716— Image.getPixelCubic has cyclomatic complexity 46 (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.
VP8L._decodeImageData (cyclomatic 45) lib/src/formats/webp/vp8l.dart:234— VP8L._decodeImageData 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.
BitmapFont._parseFnt (cyclomatic 44) lib/src/font/bitmap_font.dart:99— BitmapFont._parseFnt has cyclomatic complexity 44 (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.
ExrPart.ExrPart (cyclomatic 41) lib/src/formats/exr/exr_part.dart:47— ExrPart.ExrPart 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.
TgaDecoder._decodeRle (cyclomatic 36) lib/src/formats/tga_decoder.dart:133— TgaDecoder._decodeRle 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.
Image.fromBytes (cyclomatic 31) lib/src/image/image.dart:177— Image.fromBytes 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.
VP8Decimate._trellisQuantizeBlock (cyclomatic 28) lib/src/formats/webp/vp8_rd.dart:417— VP8Decimate._trellisQuantizeBlock 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.
PvrDecoder._decodePvr2 (cyclomatic 27) lib/src/formats/pvr_decoder.dart:251— PvrDecoder._decodePvr2 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.
JpegScan.decode (cyclomatic 26) lib/src/formats/jpeg/jpeg_scan.dart:64— JpegScan.decode 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.
VP8L._readHuffmanCodesHelper (cyclomatic 26) lib/src/formats/webp/vp8l.dart:1170— VP8L._readHuffmanCodesHelper 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.
ExifData.write (cyclomatic 25) lib/src/exif/exif_data.dart:96— ExifData.write 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.
ExifData.read (cyclomatic 25) lib/src/exif/exif_data.dart:300— ExifData.read 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.
PsdLayer.PsdLayer (cyclomatic 25) lib/src/formats/psd/psd_layer.dart:88— PsdLayer.PsdLayer 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.
TiffImage.decode (cyclomatic 25) lib/src/formats/tiff/tiff_image.dart:269— TiffImage.decode 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.
PngDecoder._unfilter (cyclomatic 24) lib/src/formats/png_decoder.dart:812— PngDecoder._unfilter 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.
VP8L._buildHuffmanTable (cyclomatic 24) lib/src/formats/webp/vp8l.dart:826— VP8L._buildHuffmanTable 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.
BmpDecoder._decodeFrame (cyclomatic 23) lib/src/formats/bmp_decoder.dart:63— BmpDecoder._decodeFrame 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.
GifDecoder._decompressLine (cyclomatic 23) lib/src/formats/gif_decoder.dart:555— GifDecoder._decompressLine 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.
TiffImage._decodeBilevelTile (cyclomatic 23) lib/src/formats/tiff/tiff_image.dart:708— TiffImage._decodeBilevelTile 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.
VP8Decimate._refineUsingDistortion (cyclomatic 23) lib/src/formats/webp/vp8_rd.dart:908— VP8Decimate._refineUsingDistortion 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.
JpegData._readSOS (cyclomatic 22) lib/src/formats/jpeg/jpeg_data.dart:559— JpegData._readSOS 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.
PngEncoder.addFrame (cyclomatic 22) lib/src/formats/png_encoder.dart:36— PngEncoder.addFrame 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.
TiffFaxDecoder.decodeT6 (cyclomatic 22) lib/src/formats/tiff/tiff_fax_decoder.dart:331— TiffFaxDecoder.decodeT6 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.
JpegData._readAppData (cyclomatic 21) lib/src/formats/jpeg/jpeg_data.dart:375— JpegData._readAppData 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.
Image.convert (cyclomatic 21) lib/src/image/image.dart:1072— Image.convert 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.
PngDecoder._writeRow (cyclomatic 20) lib/src/formats/png_decoder.dart:737— PngDecoder._writeRow 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.
ExrImage._readTiledPart (cyclomatic 19) lib/src/formats/exr/exr_image.dart:135— ExrImage._readTiledPart 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.
JpegScan._decodeACSuccessive (cyclomatic 19) lib/src/formats/jpeg/jpeg_scan.dart:333— JpegScan._decodeACSuccessive 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.
VP8._reconstructRow (cyclomatic 19) lib/src/formats/webp/vp8.dart:511— VP8._reconstructRow 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.
VP8LEncoder._writeImageStream (cyclomatic 19) lib/src/formats/webp/vp8l_encoder.dart:224— VP8LEncoder._writeImageStream 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.
Image._createImageData (cyclomatic 18) lib/src/image/image.dart:378— Image._createImageData 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.
BmpInfo.decodePixel (cyclomatic 17) lib/src/formats/bmp/bmp_info.dart:228— BmpInfo.decodePixel 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.
IcoDecoder._decodeFrame (cyclomatic 17) lib/src/formats/ico_decoder.dart:89— IcoDecoder._decodeFrame 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.
PngDecoder._decode (cyclomatic 17) lib/src/formats/png_decoder.dart:544— PngDecoder._decode 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.
TgaDecoder._decodeRgb (cyclomatic 17) lib/src/formats/tga_decoder.dart:264— TgaDecoder._decodeRgb has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TiffFaxDecoder._decodeNextScanline (cyclomatic 17) lib/src/formats/tiff/tiff_fax_decoder.dart:47— TiffFaxDecoder._decodeNextScanline 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.
VP8._precomputeFilterStrengths (cyclomatic 17) lib/src/formats/webp/vp8.dart:318— VP8._precomputeFilterStrengths 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.
VP8Encoder._putI4Mode (cyclomatic 17) lib/src/formats/webp/vp8_encoder.dart:395— VP8Encoder._putI4Mode 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.
VP8Decimate._pickBestIntra4 (cyclomatic 17) lib/src/formats/webp/vp8_rd.dart:735— VP8Decimate._pickBestIntra4 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.
ImageData.getBytes (cyclomatic 17) lib/src/image/image_data.dart:68— ImageData.getBytes 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.
NeuralQuantizer._inxSearch (cyclomatic 17) lib/src/util/neural_quantizer.dart:158— NeuralQuantizer._inxSearch has cyclomatic complexity 17 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
BitmapFont._parseTextFnt (cyclomatic 16) lib/src/font/bitmap_font.dart:274— BitmapFont._parseTextFnt has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
_XmlFntParser._decodeEntities (cyclomatic 16) lib/src/font/bitmap_font.dart:524— _XmlFntParser._decodeEntities 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.
BmpInfo.BmpInfo (cyclomatic 16) lib/src/formats/bmp/bmp_info.dart:84— BmpInfo.BmpInfo 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.
GifEncoder._encodeLZW (cyclomatic 16) lib/src/formats/gif_encoder.dart:224— GifEncoder._encodeLZW 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.
PsdImage.createImageFromChannels (cyclomatic 16) lib/src/formats/psd/psd_image.dart:559— PsdImage.createImageFromChannels 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: PsdImage._blend (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.
TiffDecoder._readHeader (cyclomatic 16) lib/src/formats/tiff_decoder.dart:129— TiffDecoder._readHeader 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.
VP8L._decodeAlphaData (cyclomatic 16) lib/src/formats/webp/vp8l.dart:517— VP8L._decodeAlphaData 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.
WebPDecoder._getInfo (cyclomatic 16) lib/src/formats/webp_decoder.dart:312— WebPDecoder._getInfo 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.
NeuralQuantizer._learn (cyclomatic 16) lib/src/util/neural_quantizer.dart:305— NeuralQuantizer._learn has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
TiffImage._decodeTile (cognitive 438) lib/src/formats/tiff/tiff_image.dart:335— TiffImage._decodeTile has cognitive complexity 438 (threshold 15). Drivers by points: ternaries 34 (231 pts), if/else 57 (176 pts), boolean chains 14, loops 4 (14 pts), error handling 1 (3 pts) (nesting depth added 328). 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.
BmpEncoder.encode (cognitive 161) lib/src/formats/bmp_encoder.dart:22— BmpEncoder.encode has cognitive complexity 161 (threshold 15). Drivers by points: if/else 40 (64 pts), loops 15 (48 pts), boolean chains 30, ternaries 12 (19 pts) (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TgaDecoder._decodeRle (cognitive 136) lib/src/formats/tga_decoder.dart:133— TgaDecoder._decodeRle has cognitive complexity 136 (threshold 15). Drivers by points: if/else 24 (90 pts), loops 7 (25 pts), ternaries 5 (19 pts), boolean chains 2 (nesting depth added 98). 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.
VP8L._decodeImageData (cognitive 129) lib/src/formats/webp/vp8l.dart:234— VP8L._decodeImageData has cognitive complexity 129 (threshold 15). Drivers by points: if/else 32 (85 pts), loops 9 (35 pts), boolean chains 6, ternaries 2 (3 pts) (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.
IfdDirectory.[]= (cognitive 95) lib/src/exif/ifd_directory.dart:72— IfdDirectory.[]= has cognitive complexity 95 (threshold 15). Drivers by points: if/else 34 (89 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 58). 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.
TiffImage.TiffImage (cognitive 94) lib/src/formats/tiff/tiff_image.dart:55— TiffImage.TiffImage has cognitive complexity 94 (threshold 15). Drivers by points: if/else 49 (76 pts), boolean chains 14, loops 2 (3 pts), match/switch 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PngDecoder._startDecode (cognitive 90) lib/src/formats/png_decoder.dart:66— PngDecoder._startDecode has cognitive complexity 90 (threshold 15). Drivers by points: if/else 26 (72 pts), loops 3 (5 pts), match/switch 2 (5 pts), ternaries 1 (5 pts), boolean chains 3 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TiffFaxDecoder.decodeT6 (cognitive 87) lib/src/formats/tiff/tiff_fax_decoder.dart:331— TiffFaxDecoder.decodeT6 has cognitive complexity 87 (threshold 15). Drivers by points: if/else 20 (74 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 62). 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.
BitmapFont._parseFnt (cognitive 80) lib/src/font/bitmap_font.dart:99— BitmapFont._parseFnt has cognitive complexity 80 (threshold 15). Drivers by points: loops 12 (37 pts), if/else 12 (33 pts), match/switch 2 (8 pts), ternaries 1 (2 pts) (nesting depth added 53). 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.
ExrImage._readTiledPart (cognitive 79) lib/src/formats/exr/exr_image.dart:135— ExrImage._readTiledPart has cognitive complexity 79 (threshold 15). Drivers by points: if/else 8 (42 pts), loops 7 (28 pts), match/switch 1 (8 pts), boolean chains 1 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PngDecoder._decodeFrame (cognitive 72) lib/src/formats/png_decoder.dart:335— PngDecoder._decodeFrame has cognitive complexity 72 (threshold 15). Drivers by points: if/else 15 (25 pts), ternaries 13 (20 pts), loops 7 (15 pts), boolean chains 9, error handling 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.
VP8._precomputeFilterStrengths (cognitive 69) lib/src/formats/webp/vp8.dart:318— VP8._precomputeFilterStrengths has cognitive complexity 69 (threshold 15). Drivers by points: if/else 13 (46 pts), ternaries 4 (18 pts), loops 2 (5 pts) (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.
VP8L._readHuffmanCodesHelper (cognitive 67) lib/src/formats/webp/vp8l.dart:1170— VP8L._readHuffmanCodesHelper has cognitive complexity 67 (threshold 15). Drivers by points: if/else 13 (44 pts), loops 4 (12 pts), boolean chains 7, 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.
VP8Encoder._putI4Mode (cognitive 66) lib/src/formats/webp/vp8_encoder.dart:395— VP8Encoder._putI4Mode has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 9 (39 pts), if/else 8 (27 pts) (nesting depth added 49). 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.
ExrPart.ExrPart (cognitive 65) lib/src/formats/exr/exr_part.dart:47— ExrPart.ExrPart has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (38 pts), loops 10 (21 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JpegScan.decode (cognitive 64) lib/src/formats/jpeg/jpeg_scan.dart:64— JpegScan.decode has cognitive complexity 64 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 7 (24 pts), ternaries 3 (8 pts), boolean chains 4 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NeuralQuantizer._inxSearch (cognitive 58) lib/src/util/neural_quantizer.dart:158— NeuralQuantizer._inxSearch has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (56 pts), boolean chains 1, loops 1 (nesting depth added 40). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
PsdLayer.PsdLayer (cognitive 57) lib/src/formats/psd/psd_layer.dart:88— PsdLayer.PsdLayer has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (48 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GifDecoder._decompressLine (cognitive 56) lib/src/formats/gif_decoder.dart:555— GifDecoder._decompressLine has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 5 (14 pts), boolean chains 6 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PngDecoder._unfilter (cognitive 54) lib/src/formats/png_decoder.dart:812— PngDecoder._unfilter has cognitive complexity 54 (threshold 15). Drivers by points: loops 8 (23 pts), if/else 8 (20 pts), ternaries 3 (9 pts), boolean chains 1, match/switch 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VP8Decimate._trellisQuantizeBlock (cognitive 54) lib/src/formats/webp/vp8_rd.dart:417— VP8Decimate._trellisQuantizeBlock has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 9 (19 pts), loops 6 (9 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExifData.read (cognitive 53) lib/src/exif/exif_data.dart:300— ExifData.read has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 5 (12 pts), boolean chains 6, error handling 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.
VP8._reconstructRow (cognitive 49) lib/src/formats/webp/vp8.dart:511— VP8._reconstructRow has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 9 (24 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.
VP8L._buildHuffmanTable (cognitive 48) lib/src/formats/webp/vp8l.dart:826— VP8L._buildHuffmanTable has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (39 pts), loops 7 (9 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.
ExifData.write (cognitive 46) lib/src/exif/exif_data.dart:96— ExifData.write has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (32 pts), loops 7 (12 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JpegScan._decodeACSuccessive (cognitive 46) lib/src/formats/jpeg/jpeg_scan.dart:333— JpegScan._decodeACSuccessive has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (34 pts), ternaries 2 (9 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VP8Decimate._refineUsingDistortion (cognitive 45) lib/src/formats/webp/vp8_rd.dart:908— VP8Decimate._refineUsingDistortion has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 4 (9 pts), boolean chains 5, ternaries 2 (5 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Image.getPixelCubic (cognitive 45) lib/src/image/image.dart:716— Image.getPixelCubic has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 25, ternaries 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.
Image.convert (cognitive 45) lib/src/image/image.dart:1072— Image.convert has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (11 pts), boolean chains 6, ternaries 2 (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.
ExrHuffman.decode (cognitive 41) lib/src/formats/exr/exr_huffman.dart:51— ExrHuffman.decode has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 5 (13 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GifEncoder._encodeLZW (cognitive 41) lib/src/formats/gif_encoder.dart:224— GifEncoder._encodeLZW has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 6 (13 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.
TiffFaxDecoder._decodeNextScanline (cognitive 41) lib/src/formats/tiff/tiff_fax_decoder.dart:47— TiffFaxDecoder._decodeNextScanline has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 3 (5 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.
PngDecoder._writeRow (cognitive 40) lib/src/formats/png_decoder.dart:737— PngDecoder._writeRow has cognitive complexity 40 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 6 (9 pts), ternaries 3 (9 pts), boolean chains 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TiffImage._decodeBilevelTile (cognitive 40) lib/src/formats/tiff/tiff_image.dart:708— TiffImage._decodeBilevelTile has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 4 (10 pts), error handling 3 (6 pts), boolean chains 2, 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.
PvrEncoder.encodeRgb4bpp (cognitive 39) lib/src/formats/pvr_encoder.dart:89— PvrEncoder.encodeRgb4bpp has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 6 (13 pts), ternaries 2 (9 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. This shape REPEATS in the file: one other method here (PvrEncoder.encodeRgba4bpp) 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.
PvrEncoder.encodeRgba4bpp (cognitive 39) lib/src/formats/pvr_encoder.dart:192— PvrEncoder.encodeRgba4bpp has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 6 (13 pts), ternaries 2 (9 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. This shape REPEATS in the file: one other method here (PvrEncoder.encodeRgb4bpp) 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.
InternalExrPxr24Compressor.uncompress (cognitive 38) lib/src/formats/exr/exr_pxr24_compressor.dart:35— InternalExrPxr24Compressor.uncompress has cognitive complexity 38 (threshold 15). Drivers by points: loops 8 (30 pts), if/else 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 26). 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.
VP8LEncoder._writeImageStream (cognitive 38) lib/src/formats/webp/vp8l_encoder.dart:224— VP8LEncoder._writeImageStream has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 6 (9 pts), ternaries 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.
ExrImage._readScanlinePart (cognitive 37) lib/src/formats/exr/exr_image.dart:230— ExrImage._readScanlinePart has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4 (10 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VP8L._decodeAlphaData (cognitive 36) lib/src/formats/webp/vp8l.dart:517— VP8L._decodeAlphaData has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (8 pts), boolean chains 3 (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.
Image.fromBytes (cognitive 36) lib/src/image/image.dart:177— Image.fromBytes has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 9, loops 5 (9 pts), ternaries 4 (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.
ImageData.getBytes (cognitive 35) lib/src/image/image_data.dart:68— ImageData.getBytes has cognitive complexity 35 (threshold 15). Drivers by points: loops 4 (15 pts), if/else 8 (12 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BmpInfo.BmpInfo (cognitive 34) lib/src/formats/bmp/bmp_info.dart:84— BmpInfo.BmpInfo has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (18 pts), if/else 9 (13 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JpegImageWriter.writeRows (cognitive 34) lib/src/formats/jpeg/_jpeg_image.dart:95— JpegImageWriter.writeRows has cognitive complexity 34 (threshold 15). Drivers by points: loops 7 (20 pts), if/else 6 (12 pts), boolean chains 1, match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
VP8._parseResiduals (cognitive 34) lib/src/formats/webp/vp8.dart:1170— VP8._parseResiduals has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 6 (17 pts), loops 6 (12 pts), if/else 4 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GifDecoder._startDecode (cognitive 33) lib/src/formats/gif_decoder.dart:59— GifDecoder._startDecode has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (26 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1, error handling 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.
TgaDecoder._decodeRgb (cognitive 32) lib/src/formats/tga_decoder.dart:264— TgaDecoder._decodeRgb has cognitive complexity 32 (threshold 15). Drivers by points: loops 6 (15 pts), ternaries 3 (9 pts), boolean chains 4, if/else 4 (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.
ExrWavelet.decode (cognitive 31) lib/src/formats/exr/exr_wavelet.dart:8— ExrWavelet.decode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 5 (10 pts), ternaries 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.
PngEncoder.addFrame (cognitive 31) lib/src/formats/png_encoder.dart:36— PngEncoder.addFrame has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, 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.
TiffFaxDecoder.decode2D (cognitive 31) lib/src/formats/tiff/tiff_fax_decoder.dart:187— TiffFaxDecoder.decode2D has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NeuralQuantizer._learn (cognitive 31) lib/src/util/neural_quantizer.dart:305— NeuralQuantizer._learn has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 13). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
BmpDecoder._decodeFrame (cognitive 30) lib/src/formats/bmp_decoder.dart:63— BmpDecoder._decodeFrame has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 13 (14 pts), if/else 5 (10 pts), boolean chains 3, 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.
VP8Filter._initTables (cognitive 30) lib/src/formats/webp/vp8_filter.dart:712— VP8Filter._initTables has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (21 pts), loops 4 (8 pts), if/else 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.
VP8Decimate._pickBestIntra4 (cognitive 30) lib/src/formats/webp/vp8_rd.dart:735— VP8Decimate._pickBestIntra4 has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 4 (10 pts), boolean chains 4, 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.
VP8LEncoder.encodeVP8L (cognitive 30) lib/src/formats/webp/vp8l_encoder.dart:41— VP8LEncoder.encodeVP8L has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 4 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PvrDecoder._decodePvr2 (cognitive 29) lib/src/formats/pvr_decoder.dart:251— PvrDecoder._decodePvr2 has cognitive complexity 29 (threshold 15). Drivers by points: loops 8 (16 pts), ternaries 3 (7 pts), if/else 4, boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PixelUint1.== (cognitive 29) lib/src/image/pixel_uint1.dart:312— PixelUint1.== has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PixelUint16.== (cognitive 29) lib/src/image/pixel_uint16.dart:297— PixelUint16.== has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PixelUint2.== (cognitive 29) lib/src/image/pixel_uint2.dart:309— PixelUint2.== has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PixelUint8.== (cognitive 29) lib/src/image/pixel_uint8.dart:296— PixelUint8.== has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TiffImage.decode (cognitive 28) lib/src/formats/tiff/tiff_image.dart:269— TiffImage.decode has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12, boolean chains 7, loops 3 (5 pts), if/else 2 (4 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VP8LTransform.predictorInverseTransform (cognitive 28) lib/src/formats/webp/vp8l_transform.dart:181— VP8LTransform.predictorInverseTransform has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (17 pts), if/else 6 (11 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Image.remapChannels (cognitive 28) lib/src/image/image.dart:562— Image.remapChannels has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (15 pts), if/else 7 (11 pts), boolean chains 2 (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.
VP8._parseSegmentHeader (cognitive 27) lib/src/formats/webp/vp8.dart:149— VP8._parseSegmentHeader has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 3 (12 pts), loops 3 (9 pts), if/else 4 (6 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.
PixelFloat16.== (cognitive 27) lib/src/image/pixel_float16.dart:293— PixelFloat16.== has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
PixelFloat32.== (cognitive 27) lib/src/image/pixel_float32.dart:261— PixelFloat32.== has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
PixelFloat64.== (cognitive 27) lib/src/image/pixel_float64.dart:261— PixelFloat64.== has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
PixelInt16.== (cognitive 27) lib/src/image/pixel_int16.dart:265— PixelInt16.== has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
PixelInt32.== (cognitive 27) lib/src/image/pixel_int32.dart:265— PixelInt32.== has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
PixelInt8.== (cognitive 27) lib/src/image/pixel_int8.dart:265— PixelInt8.== has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
PixelUint32.== (cognitive 27) lib/src/image/pixel_uint32.dart:265— PixelUint32.== has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
PixelUint4.== (cognitive 27) lib/src/image/pixel_uint4.dart:311— PixelUint4.== has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
PsdImage.createImageFromChannels (cognitive 26) lib/src/formats/psd/psd_image.dart:559— PsdImage.createImageFromChannels has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 3 (5 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageDataUint8.clear (cognitive 26) lib/src/image/image_data_uint8.dart:126— ImageDataUint8.clear has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 4, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_XmlFntParser._decodeEntities (cognitive 25) lib/src/font/bitmap_font.dart:524— _XmlFntParser._decodeEntities has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BmpInfo.decodePixel (cognitive 25) lib/src/formats/bmp/bmp_info.dart:228— BmpInfo.decodePixel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 2 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
JpegData._readSOS (cognitive 25) lib/src/formats/jpeg/jpeg_data.dart:559— JpegData._readSOS has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 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.
GifDecoder._decode (cognitive 24) lib/src/formats/gif_decoder.dart:193— GifDecoder._decode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 3 (6 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.
IcoDecoder._decodeFrame (cognitive 24) lib/src/formats/ico_decoder.dart:89— IcoDecoder._decodeFrame has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (6 pts), boolean chains 5, ternaries 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.
JpegData._readAppData (cognitive 23) lib/src/formats/jpeg/jpeg_data.dart:375— JpegData._readAppData has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (10 pts), error handling 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.
VP8L._readHuffmanCodeLengths (cognitive 23) lib/src/formats/webp/vp8l.dart:1007— VP8L._readHuffmanCodeLengths has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InternalExrRleCompressor.uncompress (cognitive 22) lib/src/formats/exr/exr_rle_compressor.dart:31— InternalExrRleCompressor.uncompress has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 5 (9 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.
JpegData._read (cognitive 22) lib/src/formats/jpeg/jpeg_data.dart:216— JpegData._read has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PvrDecoder._decodeRgb4bpp (cognitive 22) lib/src/formats/pvr_decoder.dart:533— PvrDecoder._decodeRgb4bpp has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (12 pts), loops 4 (10 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. This shape REPEATS in the file: one other method here (PvrDecoder._decodeRgba4bpp) 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.
PvrDecoder._decodeRgba4bpp (cognitive 22) lib/src/formats/pvr_decoder.dart:597— PvrDecoder._decodeRgba4bpp has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (12 pts), loops 4 (10 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. This shape REPEATS in the file: one other method here (PvrDecoder._decodeRgb4bpp) 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.
LzwDecoder.decode (cognitive 22) lib/src/formats/tiff/tiff_lzw_decoder.dart:7— LzwDecoder.decode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (9 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.
TiffDecoder._readHeader (cognitive 22) lib/src/formats/tiff_decoder.dart:129— TiffDecoder._readHeader has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, error handling 1 (2 pts), loops 1, 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.
VP8LEncoder._selectMetaHuffman (cognitive 22) lib/src/formats/webp/vp8l_encoder.dart:434— VP8LEncoder._selectMetaHuffman has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExrHuffman.unpackEncTable (cognitive 21) lib/src/formats/exr/exr_huffman.dart:214— ExrHuffman.unpackEncTable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PngDecoder._decode (cognitive 21) lib/src/formats/png_decoder.dart:544— PngDecoder._decode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, 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.
VP8L._readHuffmanCodes (cognitive 21) lib/src/formats/webp/vp8l.dart:696— VP8L._readHuffmanCodes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GifDecoder._decodeImage (cognitive 20) lib/src/formats/gif_decoder.dart:381— GifDecoder._decodeImage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 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.
PnmDecoder._decodeFrame (cognitive 20) lib/src/formats/pnm_decoder.dart:121— PnmDecoder._decodeFrame has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (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.
VP8._parseIntraMode (cognitive 20) lib/src/formats/webp/vp8.dart:1382— VP8._parseIntraMode has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), ternaries 6 (9 pts), if/else 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.
VP8EncProba.calculateLevelCosts (cognitive 20) lib/src/formats/webp/vp8_proba.dart:102— VP8EncProba.calculateLevelCosts has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (15 pts), ternaries 1 (4 pts), if/else 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
InternalExrPizCompressor.uncompress (cognitive 19) lib/src/formats/exr/exr_piz_compressor.dart:43— InternalExrPizCompressor.uncompress has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 5 (7 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.
PsdChannel._decodeRLE (cognitive 19) lib/src/formats/psd/psd_channel.dart:107— PsdChannel._decodeRLE has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 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.
VP8._parseFilterHeader (cognitive 19) lib/src/formats/webp/vp8.dart:175— VP8._parseFilterHeader has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (6 pts), ternaries 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.
VP8._doFilter (cognitive 19) lib/src/formats/webp/vp8.dart:721— VP8._doFilter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (19 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.
PngEncoder.encode (cognitive 18) lib/src/formats/png_encoder.dart:172— PngEncoder.encode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (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.
TiffFaxDecoder._readEOL (cognitive 18) lib/src/formats/tiff/tiff_fax_decoder.dart:645— TiffFaxDecoder._readEOL has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 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.
VP8._parseQuant (cognitive 18) lib/src/formats/webp/vp8.dart:249— VP8._parseQuant has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebPDecoder._decode (cognitive 18) lib/src/formats/webp_decoder.dart:153— WebPDecoder._decode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, 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.
ExifData.toString (cognitive 17) lib/src/exif/exif_data.dart:64— ExifData.toString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExrHuffman.buildDecTable (cognitive 17) lib/src/formats/exr/exr_huffman.dart:160— ExrHuffman.buildDecTable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TgaEncoder.encode (cognitive 17) lib/src/formats/tga_encoder.dart:13— TgaEncoder.encode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (7 pts), ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TiffFaxDecoder._nextNBits (cognitive 17) lib/src/formats/tiff/tiff_fax_decoder.dart:757— TiffFaxDecoder._nextNBits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (17 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
VP8._finishRow (cognitive 17) lib/src/formats/webp/vp8.dart:797— VP8._finishRow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
VP8Encoder._codeIntraModes (cognitive 17) lib/src/formats/webp/vp8_encoder.dart:340— VP8Encoder._codeIntraModes has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 4 (7 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.
Image._expandPalette (cognitive 17) lib/src/image/image.dart:1196— Image._expandPalette has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (6 pts), boolean chains 3, 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.
GifEncoder.addFrame (cognitive 16) lib/src/formats/gif_encoder.dart:54— GifEncoder.addFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JpegData._decodeBand (cognitive 16) lib/src/formats/jpeg/jpeg_data.dart:799— JpegData._decodeBand has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 3 (6 pts), boolean chains 1 (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.
JpegEncoder._processDU (cognitive 16) lib/src/formats/jpeg_encoder.dart:810— JpegEncoder._processDU has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 4). 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.
PsdImage.renderImage (cognitive 16) lib/src/formats/psd/psd_image.dart:137— PsdImage.renderImage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 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.
VP8._parseProba (cognitive 16) lib/src/formats/webp/vp8.dart:295— VP8._parseProba has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), ternaries 1 (5 pts), if/else 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
VP8Quantizers._simplifySegments (cognitive 16) lib/src/formats/webp/vp8_quant.dart:498— VP8Quantizers._simplifySegments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (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.
_MBAnalyzer._alphaOf (cognitive 16) lib/src/formats/webp/vp8_segments.dart:127— _MBAnalyzer._alphaOf has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 2 (5 pts), loops 4 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VP8L._decodeImageStream (cognitive 16) lib/src/formats/webp/vp8l.dart:166— VP8L._decodeImageStream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 1 (2 pts), boolean chains 1, ternaries 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.
VP8LEncoder.encodeStream (cognitive 16) lib/src/formats/webp/vp8l_encoder.dart:111— VP8LEncoder.encodeStream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 3 (5 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.
VP8LTransform.colorIndexInverseTransformAlpha (cognitive 16) lib/src/formats/webp/vp8l_transform.dart:72— VP8LTransform.colorIndexInverseTransformAlpha has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (6 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (VP8LTransform.colorIndexInverseTransform) 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.
VP8LTransform.colorIndexInverseTransform (cognitive 16) lib/src/formats/webp/vp8l_transform.dart:110— VP8LTransform.colorIndexInverseTransform has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (6 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (VP8LTransform.colorIndexInverseTransformAlpha) 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.
WebPDecoder._getInfo (cognitive 16) lib/src/formats/webp_decoder.dart:312— WebPDecoder._getInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebPEncoder.encode (cognitive 16) lib/src/formats/webp_encoder.dart:98— WebPEncoder.encode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Image._createImageData (cognitive 16) lib/src/image/image.dart:378— Image._createImageData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication· Near-duplicate member family (4 members, 12 shared lines) · ×1
Near-duplicate member family (4 members, 12 shared lines) lib/src/image/image_data_int16.dart:96— lib/src/image/image_data_int16.dart:96-110 | lib/src/image/image_data_int32.dart:96-110 | lib/src/image/image_data_uint16.dart:104-118 | lib/src/image/image_data_uint32.dart:96-110 — These 4 members are variants of one another: a block of 12 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) lib/src/image/pixel_uint1.dart:312— lib/src/image/pixel_uint1.dart:312-343 | lib/src/image/pixel_uint2.dart:309-340 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (12 members, 50+ identical tokens) lib/src/image/palette_int16.dart:37— lib/src/image/palette_int16.dart:37-47 | lib/src/image/palette_int16.dart:49-62 | lib/src/image/palette_int32.dart:37-47 | lib/src/image/palette_int32.dart:49-62 | lib/src/image/palette_int8.dart:37-47 | lib/src/image/palette_int8.dart:49-62 | lib/src/image/palette_uint16.dart:37-47 | lib/src/image/palette_uint16.dart:49-62 | lib/src/image/palette_uint32.dart:37-47 | lib/src/image/palette_uint32.dart:49-62 | lib/src/image/palette_uint8.dart:37-47 | lib/src/image/palette_uint8.dart:49-62 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) lib/src/image/pixel_float16.dart:293— lib/src/image/pixel_float16.dart:293-323 | lib/src/image/pixel_float32.dart:261-291 | lib/src/image/pixel_float64.dart:261-291 | lib/src/image/pixel_int16.dart:265-295 | lib/src/image/pixel_int32.dart:265-295 | lib/src/image/pixel_int8.dart:265-295 | lib/src/image/pixel_uint32.dart:265-295 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) lib/src/formats/webp/vp8_filter.dart:405— lib/src/formats/webp/vp8_filter.dart:405-424 | lib/src/formats/webp/vp8_filter.dart:427-444 | lib/src/formats/webp/vp8_filter.dart:470-490 | lib/src/formats/webp/vp8_filter.dart:493-506 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) lib/src/formats/png_decoder.dart:638— lib/src/formats/png_decoder.dart:638-688 | lib/src/formats/png_decoder.dart:690-733 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 31+ corresponding lines) · ×1
Edited copies of one member (3 members, 31+ corresponding lines) lib/src/formats/webp/webp_filters.dart:77— lib/src/formats/webp/webp_filters.dart:77-107 | lib/src/formats/webp/webp_filters.dart:109-139 | lib/src/formats/webp/webp_filters.dart:150-183 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) lib/src/formats/webp/vp8l_transform.dart:72— lib/src/formats/webp/vp8l_transform.dart:72-108 | lib/src/formats/webp/vp8l_transform.dart:110-141 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) lib/src/formats/webp/vp8_rd.dart:583— lib/src/formats/webp/vp8_rd.dart:583-604 | lib/src/formats/webp/vp8_rd.dart:616-634 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) lib/src/formats/exr/exr_part.dart:284— lib/src/formats/exr/exr_part.dart:284-305 | lib/src/formats/exr/exr_part.dart:307-328 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) lib/src/image/pixel_uint1.dart:121— lib/src/image/pixel_uint1.dart:121-149 | lib/src/image/pixel_uint2.dart:121-149 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) lib/src/formats/webp/vp8.dart:60— lib/src/formats/webp/vp8.dart:60-90 | lib/src/formats/webp/vp8l.dart:56-87 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) lib/src/image/pixel_uint1.dart:170— lib/src/image/pixel_uint1.dart:170-188 | lib/src/image/pixel_uint2.dart:167-185 | lib/src/image/pixel_uint4.dart:170-188 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 19+ corresponding lines) · ×1
Edited copies of one member (7 members, 19+ corresponding lines) lib/src/command/command.dart:422— lib/src/command/command.dart:422-440 | lib/src/command/command.dart:442-462 | lib/src/command/command.dart:494-518 | lib/src/command/command.dart:536-554 | lib/src/command/command.dart:556-580 | lib/src/command/command.dart:582-604 | lib/src/command/command.dart:614-634 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 4+ corresponding lines) · ×1
Edited copies of one member (8 members, 4+ corresponding lines) lib/src/image/image_data_int16.dart:65— lib/src/image/image_data_int16.dart:65-68 | lib/src/image/image_data_int32.dart:65-68 | lib/src/image/image_data_int8.dart:65-68 | lib/src/image/image_data_uint1.dart:79-82 | lib/src/image/image_data_uint16.dart:73-76 | lib/src/image/image_data_uint2.dart:79-82 | lib/src/image/image_data_uint32.dart:65-68 | lib/src/image/image_data_uint4.dart:85-88 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) lib/src/color/color_uint1.dart:20— lib/src/color/color_uint1.dart:20-25 | lib/src/color/color_uint2.dart:20-25 | lib/src/color/color_uint4.dart:22-27 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 14+ corresponding lines) · ×1
Edited copies of one member (8 members, 14+ corresponding lines) lib/src/command/draw/draw_char_cmd.dart:30— lib/src/command/draw/draw_char_cmd.dart:30-45 | lib/src/command/draw/draw_circle_cmd.dart:30-46 | lib/src/command/draw/draw_line_cmd.dart:34-52 | lib/src/command/draw/draw_polygon_cmd.dart:29-44 | lib/src/command/draw/draw_rect_cmd.dart:34-52 | lib/src/command/draw/draw_string_cmd.dart:34-51 | lib/src/command/draw/fill_circle_cmd.dart:30-46 | lib/src/command/draw/fill_polygon_cmd.dart:25-38 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) lib/src/color/color_float16.dart:99— lib/src/color/color_float16.dart:99-106 | lib/src/color/color_float16.dart:115-122 | lib/src/color/color_float16.dart:131-138 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×1
Edited copies of one member (3 members, 5+ corresponding lines) lib/src/color/color_float16.dart:27— lib/src/color/color_float16.dart:27-31 | lib/src/color/color_float16.dart:33-38 | lib/src/color/color_float16.dart:188-197 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 5+ corresponding lines) · ×1
Edited copies of one member (4 members, 5+ corresponding lines) lib/src/formats/webp/vp8_filter.dart:77— lib/src/formats/webp/vp8_filter.dart:77-81 | lib/src/formats/webp/vp8_filter.dart:83-87 | lib/src/formats/webp/vp8_filter.dart:89-93 | lib/src/formats/webp/vp8_filter.dart:95-99 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 9+ corresponding lines) · ×1
Edited copies of one member (6 members, 9+ corresponding lines) lib/src/image/image_data_uint1.dart:105— lib/src/image/image_data_uint1.dart:105-113 | lib/src/image/image_data_uint1.dart:115-123 | lib/src/image/image_data_uint2.dart:105-113 | lib/src/image/image_data_uint2.dart:115-123 | lib/src/image/image_data_uint4.dart:111-119 | lib/src/image/image_data_uint4.dart:121-129 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 13+ corresponding lines) · ×1
Edited copies of one member (6 members, 13+ corresponding lines) lib/src/command/command.dart:769— lib/src/command/command.dart:769-785 | lib/src/command/command.dart:787-801 | lib/src/command/command.dart:812-826 | lib/src/command/command.dart:864-880 | lib/src/command/command.dart:935-949 | lib/src/command/command.dart:955-967 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) lib/src/command/filter/bump_to_normal_cmd.dart:9— lib/src/command/filter/bump_to_normal_cmd.dart:9-14 | lib/src/command/filter/drop_shadow_cmd.dart:15-22 | lib/src/command/filter/hdr_to_ldr_cmd.dart:9-14 | lib/src/command/filter/reinhard_tonemap_cmd.dart:13-18 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 3+ corresponding lines) · ×1
Edited copies of one member (8 members, 3+ corresponding lines) lib/src/formats/exr_decoder.dart:59— lib/src/formats/exr_decoder.dart:59-61 | lib/src/formats/gif_decoder.dart:189-191 | lib/src/formats/ico_decoder.dart:54-56 | lib/src/formats/jpeg_decoder.dart:82-84 | lib/src/formats/png_decoder.dart:540-542 | lib/src/formats/pnm_decoder.dart:63-65 | lib/src/formats/pvr_decoder.dart:240-242 | lib/src/formats/tga_decoder.dart:39-41 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
Duplicated block (50–51 lines × 2) lib/src/formats/jpeg_encoder.dart:565— lib/src/formats/jpeg_encoder.dart:565-614 | lib/src/formats/jpeg_encoder.dart:620-670 — both copies are in the same file, so extract the 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 `lib/src/formats/jpeg_encoder.dart:565` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (38–42 lines × 2) lib/src/formats/tiff/tiff_fax_decoder.dart:242— lib/src/formats/tiff/tiff_fax_decoder.dart:242-279 | lib/src/formats/tiff/tiff_fax_decoder.dart:379-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 `lib/src/formats/tiff/tiff_fax_decoder.dart:242` 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 (36 lines × 2) lib/src/formats/jpeg_encoder.dart:382— lib/src/formats/jpeg_encoder.dart:382-417 | lib/src/formats/jpeg_encoder.dart:459-494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/jpeg_encoder.dart:382` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (32–35 lines × 2) lib/src/formats/tiff/tiff_fax_decoder.dart:57— lib/src/formats/tiff/tiff_fax_decoder.dart:57-91 | lib/src/formats/tiff/tiff_fax_decoder.dart:542-573 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/tiff/tiff_fax_decoder.dart:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (30–31 lines × 2) lib/src/formats/pvr_encoder.dart:161— lib/src/formats/pvr_encoder.dart:161-190 | lib/src/formats/pvr_encoder.dart:265-295 — both copies are in the same file, so extract the 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 `lib/src/formats/pvr_encoder.dart:161` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (28 lines × 7) lib/src/image/pixel_float16.dart:296— lib/src/image/pixel_float16.dart:296-323 | lib/src/image/pixel_float32.dart:264-291 | lib/src/image/pixel_float64.dart:264-291 | lib/src/image/pixel_int16.dart:268-295 | lib/src/image/pixel_int32.dart:268-295 | lib/src/image/pixel_int8.dart:268-295 | lib/src/image/pixel_uint32.dart:268-295 — before extracting anything, compare `lib/src/image/pixel_float16.dart` and `lib/src/image/pixel_float32.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/image/pixel_float16.dart:296` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (27 lines × 2) lib/src/formats/jpeg_encoder.dart:344— lib/src/formats/jpeg_encoder.dart:344-370 | lib/src/formats/jpeg_encoder.dart:421-447 — both copies are in the same file, so extract the 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 `lib/src/formats/jpeg_encoder.dart:344` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) lib/src/formats/psd/psd_layer.dart:186— lib/src/formats/psd/psd_layer.dart:186-211 | lib/src/formats/psd/psd_layer.dart:213-238 — both copies are in the same file, so extract the 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 `lib/src/formats/psd/psd_layer.dart:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 3) lib/src/image/pixel_uint1.dart:319— lib/src/image/pixel_uint1.dart:319-343 | lib/src/image/pixel_uint2.dart:316-340 | lib/src/image/pixel_uint4.dart:318-342 — before extracting anything, compare `lib/src/image/pixel_uint1.dart` and `lib/src/image/pixel_uint2.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/image/pixel_uint1.dart:319` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (24 lines × 2) lib/src/formats/tiff/tiff_fax_decoder.dart:108— lib/src/formats/tiff/tiff_fax_decoder.dart:108-131 | lib/src/formats/tiff/tiff_fax_decoder.dart:588-611 — both copies are in the same file, so extract the 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 `lib/src/formats/tiff/tiff_fax_decoder.dart:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/src/formats/tiff/tiff_fax_decoder.dart:133` calls `_setToBlack` and `lib/src/formats/tiff/tiff_fax_decoder.dart:612` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (23 lines × 2) lib/src/formats/pvr_decoder.dart:536— lib/src/formats/pvr_decoder.dart:536-558 | lib/src/formats/pvr_decoder.dart:600-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/pvr_decoder.dart:536` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–23 lines × 2) lib/src/formats/tiff/tiff_image.dart:458— lib/src/formats/tiff/tiff_image.dart:458-477 | lib/src/formats/tiff/tiff_image.dart:513-535 — both copies are in the same file, so extract the 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 `lib/src/formats/tiff/tiff_image.dart:458` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) lib/src/util/neural_quantizer.dart:171— lib/src/util/neural_quantizer.dart:171-190 | lib/src/util/neural_quantizer.dart:199-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/util/neural_quantizer.dart:171` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 4) lib/src/formats/exr/exr_piz_compressor.dart:46— lib/src/formats/exr/exr_piz_compressor.dart:46-62 | lib/src/formats/exr/exr_pxr24_compressor.dart:49-65 | lib/src/formats/exr/exr_rle_compressor.dart:36-52 | lib/src/formats/exr/exr_zip_compressor.dart:43-59 — before extracting anything, compare `lib/src/formats/exr/exr_rle_compressor.dart` and `lib/src/formats/exr/exr_zip_compressor.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/src/formats/exr/exr_rle_compressor.dart:34` calls `OutputBuffer` and `lib/src/formats/exr/exr_piz_compressor.dart:45` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17 lines × 3) lib/src/image/pixel_uint1.dart:291— lib/src/image/pixel_uint1.dart:291-307 | lib/src/image/pixel_uint2.dart:288-304 | lib/src/image/pixel_uint4.dart:290-306 — before extracting anything, compare `lib/src/image/pixel_uint1.dart` and `lib/src/image/pixel_uint2.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16–17 lines × 2) lib/src/formats/psd/psd_layer.dart:240— lib/src/formats/psd/psd_layer.dart:240-255 | lib/src/formats/psd/psd_layer.dart:266-282 — both copies are in the same file, so extract the 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 `lib/src/formats/psd/psd_layer.dart:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 6) lib/src/image/pixel_int16.dart:245— lib/src/image/pixel_int16.dart:245-260 | lib/src/image/pixel_int32.dart:245-260 | lib/src/image/pixel_int8.dart:245-260 | lib/src/image/pixel_uint16.dart:277-292 | lib/src/image/pixel_uint32.dart:245-260 | lib/src/image/pixel_uint8.dart:276-291 — before extracting anything, compare `lib/src/image/pixel_int16.dart` and `lib/src/image/pixel_int32.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 4) lib/src/formats/pvr_decoder.dart:553— lib/src/formats/pvr_decoder.dart:553-568 | lib/src/formats/pvr_decoder.dart:617-632 | lib/src/formats/pvr_encoder.dart:126-141 | lib/src/formats/pvr_encoder.dart:229-244 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/pvr_decoder.dart:553` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 6) lib/src/color/color_int16.dart:179— lib/src/color/color_int16.dart:179-193 | lib/src/color/color_int32.dart:179-193 | lib/src/color/color_int8.dart:179-193 | lib/src/color/color_uint16.dart:179-193 | lib/src/color/color_uint32.dart:179-193 | lib/src/color/color_uint8.dart:183-197 — before extracting anything, compare `lib/src/color/color_int16.dart` and `lib/src/color/color_int32.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 6) lib/src/image/palette_int16.dart:49— lib/src/image/palette_int16.dart:49-62 | lib/src/image/palette_int32.dart:49-62 | lib/src/image/palette_int8.dart:49-62 | lib/src/image/palette_uint16.dart:49-62 | lib/src/image/palette_uint32.dart:49-62 | lib/src/image/palette_uint8.dart:49-62 — before extracting anything, compare `lib/src/image/palette_int16.dart` and `lib/src/image/palette_int32.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 6) lib/src/image/image_data_int16.dart:99— lib/src/image/image_data_int16.dart:99-110 | lib/src/image/image_data_int32.dart:99-110 | lib/src/image/image_data_int8.dart:99-110 | lib/src/image/image_data_uint16.dart:107-118 | lib/src/image/image_data_uint32.dart:99-110 | lib/src/image/image_data_uint8.dart:110-121 — before extracting anything, compare `lib/src/image/image_data_int16.dart` and `lib/src/image/image_data_int32.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/image/image_data_int16.dart:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) lib/src/formats/png_decoder.dart:659— lib/src/formats/png_decoder.dart:659-670 | lib/src/formats/png_decoder.dart:706-717 — both copies are in the same file, so extract the 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 `lib/src/formats/png_decoder.dart:659` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) lib/src/formats/tga_decoder.dart:176— lib/src/formats/tga_decoder.dart:176-185 | lib/src/formats/tga_decoder.dart:191-201 — both copies are in the same file, so extract the 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 `lib/src/formats/tga_decoder.dart:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–11 lines × 2) lib/src/image/palette_float16.dart:40— lib/src/image/palette_float16.dart:40-48 | lib/src/image/palette_float16.dart:52-62 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 4) lib/src/image/image_data_int16.dart:85— lib/src/image/image_data_int16.dart:85-94 | lib/src/image/image_data_int32.dart:85-94 | lib/src/image/image_data_uint16.dart:93-102 | lib/src/image/image_data_uint32.dart:85-94 — before extracting anything, compare `lib/src/image/image_data_int16.dart` and `lib/src/image/image_data_int32.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–10 lines × 2) lib/src/formats/gif_decoder.dart:80— lib/src/formats/gif_decoder.dart:80-88 | lib/src/formats/gif_decoder.dart:157-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6–10 lines × 3) lib/src/formats/pvr_decoder.dart:336— lib/src/formats/pvr_decoder.dart:336-341 | lib/src/formats/pvr_decoder.dart:342-351 | lib/src/formats/pvr_decoder.dart:355-364 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/pvr_decoder.dart:336` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/src/formats/pvr_decoder.dart:353` calls `Image` and `lib/src/formats/pvr_decoder.dart:341` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–17 lines × 2) lib/src/util/output_buffer.dart:84— lib/src/util/output_buffer.dart:84-96 | lib/src/util/output_buffer.dart:101-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 4) lib/src/formats/psd/psd_layer.dart:193— lib/src/formats/psd/psd_layer.dart:193-201 | lib/src/formats/psd/psd_layer.dart:220-228 | lib/src/formats/psd/psd_layer.dart:245-253 | lib/src/formats/psd/psd_layer.dart:271-279 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/formats/psd/psd_layer.dart:193` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 12) lib/src/image/palette_int16.dart:39— lib/src/image/palette_int16.dart:39-44 | lib/src/image/palette_int16.dart:51-56 | lib/src/image/palette_int32.dart:39-44 | lib/src/image/palette_int32.dart:51-56 | lib/src/image/palette_int8.dart:39-44 | lib/src/image/palette_int8.dart:51-56 | lib/src/image/palette_uint16.dart:39-44 | lib/src/image/palette_uint16.dart:51-56 | lib/src/image/palette_uint32.dart:39-44 | lib/src/image/palette_uint32.dart:51-56 | lib/src/image/palette_uint8.dart:39-44 | lib/src/image/palette_uint8.dart:51-56 — before extracting anything, compare `lib/src/image/palette_int16.dart` and `lib/src/image/palette_int32.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/src/image/palette_int16.dart:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/src/image/palette_int16.dart:58` calls `toInt` and `lib/src/image/palette_int16.dart:45` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 19) lib/src/color/color_float16.dart:180— lib/src/color/color_float16.dart:180-186 | lib/src/color/color_float32.dart:170-176 | lib/src/color/color_float64.dart:163-169 | lib/src/color/color_int16.dart:160-166 | lib/src/color/color_int32.dart:160-166 | lib/src/color/color_int8.dart:160-166 | lib/src/color/color_uint16.dart:160-166 | lib/src/color/color_uint32.dart:160-166 | lib/src/color/color_uint8.dart:164-170 | lib/src/image/pixel_float32.dart:225-231 | lib/src/image/pixel_float64.dart:225-231 | lib/src/image/pixel_int16.dart:225-231 | lib/src/image/pixel_int32.dart:225-231 | lib/src/image/pixel_int8.dart:225-231 | lib/src/image/pixel_uint1.dart:270-276 | lib/src/image/pixel_uint16.dart:257-263 | lib/src/image/pixel_uint2.dart:267-273 | lib/src/image/pixel_uint32.dart:225-231 | lib/src/image/pixel_uint4.dart:269-275 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/src/color/color_float16.dart:190` calls `doubleToFloat16`, `toDouble` and `lib/src/image/pixel_uint1.dart:280` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 8) lib/src/color/color_float32.dart:156— lib/src/color/color_float32.dart:156-164 | lib/src/color/color_float64.dart:149-157 | lib/src/color/color_int16.dart:146-154 | lib/src/color/color_int32.dart:146-154 | lib/src/color/color_int8.dart:146-154 | lib/src/color/color_uint16.dart:146-154 | lib/src/color/color_uint32.dart:146-154 | lib/src/color/color_uint8.dart:150-158 — before extracting anything, compare `lib/src/color/color_float32.dart` and `lib/src/color/color_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 18) lib/src/color/color_int16.dart:79— lib/src/color/color_int16.dart:79-86 | lib/src/color/color_int16.dart:95-102 | lib/src/color/color_int16.dart:111-118 | lib/src/color/color_int32.dart:79-86 | lib/src/color/color_int32.dart:95-102 | lib/src/color/color_int32.dart:111-118 | lib/src/color/color_int8.dart:79-86 | lib/src/color/color_int8.dart:95-102 | lib/src/color/color_int8.dart:111-118 | lib/src/color/color_uint16.dart:79-86 | lib/src/color/color_uint16.dart:95-102 | lib/src/color/color_uint16.dart:111-118 | lib/src/color/color_uint32.dart:79-86 | lib/src/color/color_uint32.dart:95-102 | lib/src/color/color_uint32.dart:111-118 | lib/src/color/color_uint8.dart:83-90 | lib/src/color/color_uint8.dart:99-106 | lib/src/color/color_uint8.dart:115-122 — before extracting anything, compare `lib/src/color/color_int16.dart` and `lib/src/color/color_int32.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 5) lib/src/formats/exr/exr_b44_compressor.dart:25— lib/src/formats/exr/exr_b44_compressor.dart:25-29 | lib/src/formats/exr/exr_piz_compressor.dart:37-41 | lib/src/formats/exr/exr_pxr24_compressor.dart:29-33 | lib/src/formats/exr/exr_rle_compressor.dart:25-29 | lib/src/formats/exr/exr_zip_compressor.dart:31-35 — before extracting anything, compare `lib/src/formats/exr/exr_rle_compressor.dart` and `lib/src/formats/exr/exr_zip_compressor.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 4) lib/src/image/image_data_int16.dart:79— lib/src/image/image_data_int16.dart:79-83 | lib/src/image/image_data_int32.dart:79-83 | lib/src/image/image_data_uint16.dart:87-91 | lib/src/image/image_data_uint32.dart:79-83 — before extracting anything, compare `lib/src/image/image_data_int16.dart` and `lib/src/image/image_data_int32.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 7) lib/src/image/palette_float32.dart:92— lib/src/image/palette_float32.dart:92-101 | lib/src/image/palette_float64.dart:95-104 | lib/src/image/palette_int16.dart:92-101 | lib/src/image/palette_int32.dart:92-101 | lib/src/image/palette_int8.dart:92-101 | lib/src/image/palette_uint16.dart:92-101 | lib/src/image/palette_uint32.dart:92-101 — before extracting anything, compare `lib/src/image/palette_float32.dart` and `lib/src/image/palette_float64.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 6) lib/src/image/palette_int16.dart:29— lib/src/image/palette_int16.dart:29-35 | lib/src/image/palette_int32.dart:29-35 | lib/src/image/palette_int8.dart:29-35 | lib/src/image/palette_uint16.dart:29-35 | lib/src/image/palette_uint32.dart:29-35 | lib/src/image/palette_uint8.dart:29-35 — before extracting anything, compare `lib/src/image/palette_int16.dart` and `lib/src/image/palette_int32.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 8) lib/src/image/pixel_float16.dart:99— lib/src/image/pixel_float16.dart:99-104 | lib/src/image/pixel_float32.dart:87-92 | lib/src/image/pixel_float64.dart:87-92 | lib/src/image/pixel_int32.dart:87-92 | lib/src/image/pixel_int8.dart:87-92 | lib/src/image/pixel_uint16.dart:97-102 | lib/src/image/pixel_uint32.dart:87-92 | lib/src/image/pixel_uint8.dart:98-103 — before extracting anything, compare `lib/src/image/pixel_float16.dart` and `lib/src/image/pixel_float32.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 7) lib/src/image/pixel_float16.dart:109— lib/src/image/pixel_float16.dart:109-121 | lib/src/image/pixel_float32.dart:97-109 | lib/src/image/pixel_float64.dart:97-109 | lib/src/image/pixel_int16.dart:97-109 | lib/src/image/pixel_int32.dart:97-109 | lib/src/image/pixel_int8.dart:97-109 | lib/src/image/pixel_uint32.dart:97-109 — before extracting anything, compare `lib/src/image/pixel_float16.dart` and `lib/src/image/pixel_float32.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/src/image/pixel_float32.dart:111` calls `nextPixel`, `moveNext` and `lib/src/image/pixel_float64.dart:111` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 4) lib/src/image/pixel_float32.dart:143— lib/src/image/pixel_float32.dart:143-150 | lib/src/image/pixel_float32.dart:159-166 | lib/src/image/pixel_float64.dart:143-150 | lib/src/image/pixel_float64.dart:159-166 — before extracting anything, compare `lib/src/image/pixel_float32.dart` and `lib/src/image/pixel_float64.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) lib/src/image/pixel_int16.dart:175— lib/src/image/pixel_int16.dart:175-182 | lib/src/image/pixel_int32.dart:175-182 | lib/src/image/pixel_int8.dart:175-182 — before extracting anything, compare `lib/src/image/pixel_int16.dart` and `lib/src/image/pixel_int32.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) lib/src/image/pixel_uint16.dart:107— lib/src/image/pixel_uint16.dart:107-119 | lib/src/image/pixel_uint8.dart:108-120 — before extracting anything, compare `lib/src/image/pixel_uint16.dart` and `lib/src/image/pixel_uint8.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/src/image/pixel_uint8.dart:122` calls `updateCache` and `lib/src/image/pixel_uint16.dart:121` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 6) lib/src/color/color_int16.dart:20— lib/src/color/color_int16.dart:20-24 | lib/src/color/color_int32.dart:20-24 | lib/src/color/color_int8.dart:20-24 | lib/src/color/color_uint16.dart:20-24 | lib/src/color/color_uint32.dart:20-24 | lib/src/color/color_uint8.dart:20-24 — before extracting anything, compare `lib/src/color/color_int16.dart` and `lib/src/color/color_int32.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 12) lib/src/image/image_data_float16.dart:70— lib/src/image/image_data_float16.dart:70-77 | lib/src/image/image_data_float32.dart:69-76 | lib/src/image/image_data_float64.dart:69-76 | lib/src/image/image_data_int16.dart:70-77 | lib/src/image/image_data_int32.dart:70-77 | lib/src/image/image_data_int8.dart:70-77 | lib/src/image/image_data_uint1.dart:84-91 | lib/src/image/image_data_uint16.dart:78-85 | lib/src/image/image_data_uint2.dart:84-91 | lib/src/image/image_data_uint32.dart:70-77 | lib/src/image/image_data_uint4.dart:90-97 | lib/src/image/image_data_uint8.dart:81-88 — before extracting anything, compare `lib/src/image/image_data_float32.dart` and `lib/src/image/image_data_float64.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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.
No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
Duplicated predicate lib/src/command/command.dart:1196— `(newWidth == null || newHeight == null) && padding == null` appears character-identically in 3 files — lib/src/command/command.dart, lib/src/command/transform/copy_expand_canvas_cmd.dart, lib/src/transform/copy_expand_canvas.dart. 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 lib/src/formats/exr/exr_rle_compressor.dart:78— `_outCache == null || _outCache!.length != len` appears character-identically in 2 files — lib/src/formats/exr/exr_rle_compressor.dart, lib/src/formats/exr/exr_zip_compressor.dart. 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 lib/src/draw/draw_polygon.dart:23— `blend == BlendMode.alpha && color.a == 0` appears character-identically in 2 files — lib/src/draw/draw_polygon.dart, lib/src/draw/fill_polygon.dart. 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 lib/src/formats/jpeg_encoder.dart:195— `image.format == Format.uint8 && !image.hasPalette && image.numChannels >= 3` appears character-identically in 2 files — lib/src/formats/jpeg_encoder.dart, lib/src/util/octree_quantizer.dart. 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 lib/src/filter/bulge_distortion.dart:23— `linearBlend && interpolation != Interpolation.nearest` appears character-identically in 2 files — lib/src/filter/bulge_distortion.dart, lib/src/filter/stretch_distortion.dart. 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 lib/src/transform/copy_resize.dart:42— `linearBlend && interpolation != Interpolation.nearest && !src.hasPalette` appears character-identically in 3 files — lib/src/transform/copy_resize.dart, lib/src/transform/copy_resize_crop_square.dart, lib/src/transform/resize.dart. 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 lib/src/formats/jpeg/jpeg_data.dart:94— `marker != JpegMarker.eoi && !input.isEOS` appears character-identically in 2 files — lib/src/formats/jpeg/jpeg_data.dart, lib/src/formats/jpeg/jpeg_util.dart. 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 lib/src/filter/edge_glow.dart:26— `mask == null && frame.format == Format.uint8 && frame.numChannels >= 3` appears character-identically in 4 files — lib/src/filter/edge_glow.dart, lib/src/filter/gamma.dart, lib/src/filter/grayscale.dart, lib/src/filter/sobel.dart. 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 lib/src/command/command.dart:1199— `newWidth != null && newHeight != null && padding != null` appears character-identically in 2 files — lib/src/command/command.dart, lib/src/command/transform/copy_expand_canvas_cmd.dart. 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 lib/src/image/image.dart:569— `order == ChannelOrder.abgr || order == ChannelOrder.argb || order == ChannelOrder.bgra` appears character-identically in 2 files — lib/src/image/image.dart, lib/src/image/image_data.dart. 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 lib/src/color/color_float16.dart:220— `other is Color && other.length == length && other.hashCode == hashCode` appears character-identically in 13 files — lib/src/color/color_float16.dart, lib/src/color/color_float32.dart, lib/src/color/color_float64.dart, lib/src/color/color_int16.dart. 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 lib/src/formats/jpeg/_jpeg_quantize_html.dart:53— `p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 && p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 && p[7 + row] == 0` appears character-identically in 2 files — lib/src/formats/jpeg/_jpeg_quantize_html.dart, lib/src/formats/jpeg/_jpeg_quantize_io.dart. 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 lib/src/formats/jpeg/_jpeg_quantize_html.dart:134— `p[p1] == 0 && p[p2] == 0 && p[p3] == 0 && p[p4] == 0 && p[p5] == 0 && p[p6] == 0 && p[p7] == 0` appears character-identically in 2 files — lib/src/formats/jpeg/_jpeg_quantize_html.dart, lib/src/formats/jpeg/_jpeg_quantize_io.dart. 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 lib/src/formats/jpeg/jpeg_data.dart:81— `soiCheck[0] != 0xff || soiCheck[1] != 0xd8` appears character-identically in 2 files — lib/src/formats/jpeg/jpeg_data.dart, lib/src/formats/jpeg/jpeg_util.dart. 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 lib/src/transform/copy_resize.dart:63— `src.exif.imageIfd.hasOrientation && src.exif.imageIfd.orientation != 1` appears character-identically in 2 files — lib/src/transform/copy_resize.dart, lib/src/transform/resize.dart. 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 lib/src/transform/copy_resize.dart:82— `width != null && height != null && maintainAspect == true` appears character-identically in 2 files — lib/src/transform/copy_resize.dart, lib/src/transform/resize.dart. 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 lib/src/image/image.dart:640— `x < 0 || x >= width || y < 0 || y >= height` appears character-identically in 2 files — lib/src/image/image.dart, lib/src/image/image_data.dart. 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 lib/src/image/pixel_float16.dart:79— `x >= 0 && x < (image.width - 1) && y >= 0 && y < (image.height - 1)` appears character-identically in 12 files — lib/src/image/pixel_float16.dart, lib/src/image/pixel_float32.dart, lib/src/image/pixel_float64.dart, lib/src/image/pixel_int16.dart. 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.
IC1 · Incompleteness & stubs· Member throws UnsupportedError · ×7
Member throws UnsupportedError lib/src/command/_executor.dart:7— `executeCommandAsync`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
Member throws UnsupportedError lib/src/command/_executor.dart:10— `executeCommandImage`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
Member throws UnsupportedError lib/src/command/_executor.dart:13— `executeCommandImageAsync`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
Member throws UnsupportedError lib/src/command/_executor.dart:16— `executeCommandBytes`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
Member throws UnsupportedError lib/src/command/_executor.dart:19— `executeCommandBytesAsync`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
Member throws UnsupportedError lib/src/util/_file_access.dart:5— `readFile`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
Member throws UnsupportedError lib/src/util/_file_access.dart:8— `writeFile`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
Fat interface: Color (30 abstract methods) lib/src/color/color.dart:5— `Color` declares 30 abstract methods: `length`, `maxChannelValue`, `maxIndexValue`, `format`, `isLdrFormat`, `isHdrFormat`, `hasPalette`, `palette`, `[]`, `[]=`, `index`, `r`, `g`, `b`, `a`, `rNormalized`, `gNormalized`, `bNormalized`, `aNormalized`, `luminance`, `luminanceNormalized`, `getChannel`, `getChannelNormalized`, `set`, `setRgb`, `setRgba`, `clone`, `convert`, `==`, `hashCode`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ImageData (18 abstract methods) lib/src/image/image_data.dart:9— `ImageData` declares 18 abstract methods: `clone`, `format`, `formatType`, `isHdrFormat`, `bitsPerChannel`, `maxChannelValue`, `maxIndexValue`, `lengthInBytes`, `length`, `buffer`, `rowStride`, `getRange`, `getColor`, `getPixel`, `setPixelR`, `setPixelRgb`, `setPixelRgba`, `clear`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: Palette (17 abstract methods) lib/src/image/palette.dart:5— `Palette` declares 17 abstract methods: `lengthInBytes`, `buffer`, `maxChannelValue`, `clone`, `format`, `setRgb`, `setRgba`, `set`, `get`, `getRed`, `setRed`, `getGreen`, `setGreen`, `getBlue`, `setBlue`, `getAlpha`, `setAlpha`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
IC1 · Incompleteness & stubs· Empty method body · ×3
Empty method body lib/src/formats/psd/psd_image.dart:433— `_readColorModeData` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body lib/src/formats/webp/vp8.dart:785— `_ditherRow` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body lib/src/image/pixel_uint8.dart:122— `updateCache` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 42 significant file(s) lose their only recent owner: lib/src/formats/gif_decoder.dart, lib/src/formats/webp/vp8_filter.dart, lib/src/formats/psd/psd_image.dart, lib/src/formats/pvr_decoder.dart, lib/src/exif/exif_data.dart, lib/src/util/neural_quantizer.dart, lib/src/util/color_util.dart, lib/src/formats/exr/exr_part.dart (+34 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 11 significant file(s) lose their only recent owner: lib/src/formats/webp/vp8l_encoder.dart, lib/src/formats/webp/vp8_tables.dart, lib/src/formats/webp/vp8l_backward_refs.dart, lib/src/formats/webp/vp8_encoder.dart, lib/src/formats/webp/vp8l_huffman_encoder.dart, lib/src/formats/webp/vp8_residual.dart, lib/src/formats/webp/vp8_segments.dart, lib/src/formats/webp/vp8_alpha.dart (+3 more). Pair on, review, or document these before any departure.
Orphaned file lib/src/filter/histogram_equalization.dart:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/src/filter/solarize.dart:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (54 single-owned of 191 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 191 of the 402 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: lib/src/command/formats/gif_cmd.dart.
D21 · Naming Consistency· `_emitAlphaRGB` spells `RGB` where 66 names in the project spell it `Rgb` · ×1
`_emitAlphaRGB` spells `RGB` where 66 names in the project spell it `Rgb` lib/src/formats/webp/vp8.dart:998— 66 of 68 names in project repository.src spell the token `Rgb` (66 of 68; unit: names in project repository.src containing `Rgb`). Peers: Color.setRgb (lib/src/color/color.dart:88); ColorFloat16.setRgb (lib/src/color/color_float16.dart:188); ColorFloat32.setRgb (lib/src/color/color_float32.dart:178); ColorFloat64.setRgb (lib/src/color/color_float64.dart:171); ColorInt16.setRgb (lib/src/color/color_int16.dart:168). Rename to `_emitAlphaRgb`. [rule N6]
D21 · Naming Consistency· `_emitFancyRGB` spells `RGB` where 66 names in the project spell it `Rgb` · ×1
`_emitFancyRGB` spells `RGB` where 66 names in the project spell it `Rgb` lib/src/formats/webp/vp8.dart:1039— 66 of 68 names in project repository.src spell the token `Rgb` (66 of 68; unit: names in project repository.src containing `Rgb`). Peers: Color.setRgb (lib/src/color/color.dart:88); ColorFloat16.setRgb (lib/src/color/color_float16.dart:188); ColorFloat32.setRgb (lib/src/color/color_float32.dart:178); ColorFloat64.setRgb (lib/src/color/color_float64.dart:171); ColorInt16.setRgb (lib/src/color/color_int16.dart:168). Rename to `_emitFancyRgb`. [rule N6]
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 2 of 191 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 191 of the 402 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: lib/src/filter/histogram_equalization.dart, lib/src/filter/solarize.dart. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No SAST REDACTED:7— No static application security testing detected. For this repository's stack, add the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
Silent fallback default in catch lib/src/formats/pnm_decoder.dart:220— `_parseNextInt` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. 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 at the `catch` or in the `///` doc, and the row stops firing.
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.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Dart pubspec.yaml — not scanned yet).
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Dart pubspec.yaml — not scanned yet).
0
—
Run 01a1eb74-7d77-7bb7-9321-c0027732ec85 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 13 · Warnings: 558 · Recommendations: 43 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 21:40 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.