Public report — pdf.js, published 16 Aug 2026. Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version; ask the repo owner for the full report.
Watchdog 16-08-2026 @ 12:53 UTC Public
Code Health Audit

Mozilla/pdf.Js

45% Weak
CriticalWeakAdequateStrongExemplary
upper third — near Adequate

Large · 166,343 LoC · rebuild ~1.4 person-years · weakest lens: Code Health (30%)

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

38/39dimensions tool-verifieddeterministic · confidence 1.0 · 1 LLM-assisted, advisory
558findings with an exact file:lineof 571 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
39/120dimensions across the health lenses166343 LoC — wide & deep

Executive summary

Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.

mozilla/pdf.js carries serious gaps (45%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.

It is strongest in Domain Modelling (100%) — the domain model is expressive and well-guarded. Architecture (99%) is solid too.

The area that most needs attention is Code Health (30%) — changes there are slower and more error-prone. Accessibility (36%) is the next concern — it raises ongoing delivery and operational cost.

Leadership focus, highest impact first: Migrate the remaining .js/.jsx files to TypeScript (Type Safety); each oversized file along the responsibilities already in it (Large Files); Break down the listed branch-heavy functions (Cyclomatic Complexity).

For scale: Large (~166,343 production lines); rebuilding it from scratch would take roughly ~1.4 person-years (~1–3 engineers). Approximate, ±~30%.

It builds on a genuinely strong Domain Modelling foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Code Health 30% · 46% weightAccessibility 36% · 25% weightMaturity 69% · 14% weightReadiness 71% · 8% weightSecurity 81% · 4% weightArchitecture 99% · 2% weightDomain Modelling 100% · 1% weight

Raise Code Health 30 → 70 (the Healthy floor) ⇒ headline 45 → ~56.

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

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

  • D1 · #selectionChange (cyclomatic 53) src/display/draw_layer.js
  • D1 · #walk (cyclomatic 34) web/struct_tree_layer_builder.js
  • D1 · #removeType3ColorOperators (cyclomatic 32) src/core/evaluator.js
  • D1 · #updateFromSandbox (cyclomatic 31) web/pdf_scripting_manager.js
  • D1 · #getPageAdvance (cyclomatic 29) web/pdf_viewer.js
  • D1 · #renderCard (cyclomatic 29) web/digital_signature_properties_manager.js
  • D1 · tableAttributes (cyclomatic 26) src/core/struct_tree.js
  • D1 · #collectFieldObjects (cyclomatic 23) src/core/document.js
  • D1 · #parseSignatureDict (cyclomatic 23) src/core/document.js
  • D1 · #findClosestThumbnail (cyclomatic 20) web/pdf_thumbnail_viewer.js
  • D1 · #onPagesEdited (cyclomatic 20) web/pdf_find_controller.js
  • D1 · #processStreamMessage (cyclomatic 20) src/shared/message_handler.js
  • D1 · #setAttributes (cyclomatic 19) web/struct_tree_layer_builder.js
  • D1 · #setScaleUpdatePages (cyclomatic 19) web/pdf_viewer.js
  • D1 · parse (cyclomatic 19) src/core/struct_tree.js
  • D1 · #appendText (cyclomatic 18) src/display/text_layer.js
  • D1 · #renderValue (cyclomatic 17) web/internal/tree_view.js
  • D1 · #touchSwipe (cyclomatic 16) web/pdf_presentation_mode.js
  • D1 · #setAnnotationCanvasMap (cyclomatic 16) src/display/annotation_layer.js
  • D1 · #intersects (cyclomatic 16) src/core/intersector.js
  • D2 · #selectionChange (cognitive 114) src/display/draw_layer.js
  • D2 · constructor (cognitive 86) src/core/image.js
  • D2 · #getPageAdvance (cognitive 64) web/pdf_viewer.js
  • D2 · #walk (cognitive 59) web/struct_tree_layer_builder.js
  • D2 · (anonymous) (cognitive 52) src/scripting_api/util.js
  • D2 · tableAttributes (cognitive 50) src/core/struct_tree.js
  • D2 · #findStreamLength (cognitive 42) src/core/parser.js
  • D2 · dispatch (cognitive 37) src/scripting_api/event.js
  • D2 · #walk (cognitive 37) src/core/object_loader.js
  • D2 · (anonymous) (cognitive 35) web/internal/tree_view.js
  • D2 · #renderCard (cognitive 33) web/digital_signature_properties_manager.js
  • D2 · #setAnnotationCanvasMap (cognitive 33) src/display/annotation_layer.js
  • D2 · constructor (cognitive 32) src/core/fonts.js
  • D2 · #collectFieldObjects (cognitive 31) src/core/document.js
  • D2 · parse (cognitive 29) src/core/struct_tree.js
  • D2 · #setAttributes (cognitive 28) web/struct_tree_layer_builder.js
  • D2 · #updateFromSandbox (cognitive 28) web/pdf_scripting_manager.js
  • D2 · show (cognitive 28) web/internal/draw_ops_view.js
  • D2 · #collectParents (cognitive 27) src/core/struct_tree.js
  • D2 · #replaceIdByRef (cognitive 25) src/core/document.js
  • D2 · #render (cognitive 24) web/internal/font_view.js
  • D2 · #setScaleUpdatePages (cognitive 23) web/pdf_viewer.js
  • D2 · #setCaretPositionHelper (cognitive 23) web/caret_browsing.js
  • D2 · #processStreamMessage (cognitive 23) src/shared/message_handler.js
  • D2 · #onPagesEdited (cognitive 21) web/pdf_find_controller.js
  • D2 · #writeKids (cognitive 21) src/core/struct_tree.js
  • D2 · merge (cognitive 21) src/core/primitives.js
  • D2 · #findClosestThumbnail (cognitive 20) web/pdf_thumbnail_viewer.js
  • D2 · run (cognitive 20) web/app.js
  • D2 · #AFSpecial_KeystrokeEx_helper (cognitive 20) src/scripting_api/aform.js
  • D2 · #appendText (cognitive 20) src/display/text_layer.js
  • D2 · #collectSignatureFields (cognitive 20) src/core/document.js
  • D2 · update (cognitive 19) web/pdf_page_view.js
  • D2 · #makeImageArgPreview (cognitive 19) web/internal/draw_ops_view.js
  • D2 · #buildLine (cognitive 19) web/internal/draw_ops_view.js
  • D2 · #processItems (cognitive 19) src/display/text_layer.js
  • D2 · #computeThumbnailsPosition (cognitive 18) web/pdf_thumbnail_viewer.js
  • D2 · #buildChildren (cognitive 18) web/internal/tree_view.js
  • D2 · #renderValue (cognitive 18) web/internal/tree_view.js
  • D2 · #getValue (cognitive 18) src/core/primitives.js
  • D2 · constructor (cognitive 18) src/core/pattern.js
  • D2 · #rescaleImageData (cognitive 18) src/core/image_resizer.js
  • D2 · #loadXfaFonts (cognitive 18) src/core/document.js
  • D2 · #parseSignatureDict (cognitive 18) src/core/document.js
  • D2 · #touchSwipe (cognitive 17) web/pdf_presentation_mode.js
  • D2 · #nextMatch (cognitive 17) web/pdf_find_controller.js
  • D2 · (anonymous) (cognitive 17) web/app.js
  • D2 · #renderCanvas (cognitive 17) web/internal/page_view.js
  • D2 · #collectAttributes (cognitive 17) src/core/struct_tree.js
  • D2 · #isValidState (cognitive 16) web/pdf_history.js
  • D2 · #parsePageSize (cognitive 16) web/pdf_document_properties.js
  • D2 · #setPosition (cognitive 16) web/alt_text_manager.js
  • D2 · #removeType3ColorOperators (cognitive 16) src/core/evaluator.js
  • D2 · #getLinearizationPage (cognitive 16) src/core/document.js
  • D3 · FileTooLong: xfa/template.js src/core/xfa/template.js
  • D3 · FileTooLong: core/annotation.js src/core/annotation.js
  • D3 · TooManyMethods: ConfigNamespace src/core/xfa/config.js
  • D3 · TooManyMethods: AnnotationEditor src/display/editor/editor.js
  • D3 · TooManyMethods: AnnotationEditorUIManager src/display/editor/tools.js
  • D3 · FileTooLong: editor/pdf_editor.js src/core/editor/pdf_editor.js
  • D3 · TooManyMethods: TemplateNamespace src/core/xfa/template.js
  • D3 · TooManyMethods: CanvasGraphics src/display/canvas.js
  • D3 · TooManyMethods: Doc src/scripting_api/doc.js
  • D3 · FileTooLong: editor/tools.js src/display/editor/tools.js
  • D3 · FileTooLong: editor/editor.js src/display/editor/editor.js
  • D3 · FileTooLong: core/cff_parser.js src/core/cff_parser.js
  • D3 · FileTooLong: core/catalog.js src/core/catalog.js
  • D3 · FileTooLong: xfa/config.js src/core/xfa/config.js
  • D3 · TooManyMethods: DrawingEditor src/display/editor/draw.js
  • D3 · FileTooLong: core/crypto.js src/core/crypto.js
  • D3 · TooManyMethods: PDFEditor src/core/editor/pdf_editor.js
  • D3 · FileTooLong: xfa/formcalc_parser.js src/core/xfa/formcalc_parser.js
  • D3 · FileTooLong: web/comment_manager.js web/comment_manager.js
  • D3 · TooManyMethods: AnnotationEditorLayer src/display/editor/annotation_editor_layer.js
  • D3 · TooManyMethods: PDFThumbnailViewer web/pdf_thumbnail_viewer.js
  • D3 · TooManyMethods: PDFViewer web/pdf_viewer.js
  • D3 · TooManyMethods: XFAObject src/core/xfa/xfa_object.js
  • D3 · FileTooLong: web/pdf_page_view.js web/pdf_page_view.js
  • D3 · FileTooLong: core/colorspace.js src/core/colorspace.js
  • D3 · TooManyMethods: App src/scripting_api/app.js

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

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

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

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

Top priorities

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

1
Migrate the remaining .js/.jsx files to TypeScript.
+12.8 pts · Medium effort · Type Safety
2
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
+12.8 pts · Medium effort · Large Files
3
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
+11.9 pts · Medium effort · Cyclomatic Complexity

Diagnosis — what's actually going on

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

At a glance — Code Health · 30% · Weak · gated by D2, D3, R1, R3

At a glance — Architecture · 99% · Exemplary

At a glance — Maturity · 69% · Adequate · gated by M2

At a glance — Readiness · 71% · Strong

At a glance — Security · 81% · Adequate · gated by D36

At a glance — Domain Modelling · 100% · Exemplary

At a glance — Accessibility · 36% · Weak · gated by AC3, AC4

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A02:2021 — Cryptographic Failures3High / Critical

Roadmap

Top priorities: Migrate the remaining .js/.jsx files to TypeScript; Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.

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

Do thisHelpsEffortDimension
Migrate the remaining .js/.jsx files to TypeScript.+12.8 ptsMediumType Safety
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+12.8 ptsMediumLarge Files
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.+11.9 ptsMediumCyclomatic Complexity
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+10.1 ptsMediumPage structure
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+10.1 ptsMediumKeyboard semantics
Enforce accessibility in the toolchain: add an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.+10.0 ptsMediumA11y enforcement
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+9.6 ptsMediumForms & labels
Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.+9.4 ptsMediumARIA correctness

File quality

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

FileScoreBandWorst signal
web/app.js5.5MixedCyclomatic Complexity: onKeyDown (cyclomatic 120)
src/display/api.js5.5MixedCyclomatic Complexity: getDocument (cyclomatic 53)
src/core/fonts.js7.0MixedCyclomatic Complexity: checkAndRepair (cyclomatic 112)
src/core/evaluator.js7.0MixedCyclomatic Complexity: promiseBody (cyclomatic 110)
src/core/xref.js7.0MixedCyclomatic Complexity: indexObjects (cyclomatic 54)
web/pdf_viewer.js7.0MixedCyclomatic Complexity: constructor (cyclomatic 48)
src/display/canvas.js7.0MixedCyclomatic Complexity: beginGroup (cyclomatic 48)
src/core/parser.js7.0MixedCyclomatic Complexity: findDCTDecodeInlineStreamEnd (cyclomatic 47)
web/pdf_page_view.js7.0MixedCyclomatic Complexity: reset (cyclomatic 29)
src/display/annotation_layer.js7.0MixedCyclomatic Complexity: render (cyclomatic 29)
src/core/struct_tree.js7.0MixedCyclomatic Complexity: nodeToSerializable (cyclomatic 27)
src/core/document.js7.0MixedCyclomatic Complexity: getOperatorList (cyclomatic 27)
src/core/type1_parser.js7.0MixedCyclomatic Complexity: extractCidKeyedFontProgram (cyclomatic 74)
src/core/image.js7.0MixedCyclomatic Complexity: createImageData (cyclomatic 59)
web/pdf_thumbnail_viewer.js7.0MixedCyclomatic Complexity: (anonymous) (cyclomatic 26)
web/internal/draw_ops_view.js7.0MixedCyclomatic Complexity: show (cyclomatic 21)
src/core/pattern.js7.0MixedCyclomatic Complexity: constructor (cyclomatic 18)
src/core/glyf.js7.0MixedCyclomatic Complexity: pruneCompositeGlyphCycles (cyclomatic 28)
web/internal/tree_view.js7.0MixedCyclomatic Complexity: (anonymous) (cyclomatic 26)
web/pdf_find_controller.js7.0MixedCyclomatic Complexity: #onPagesEdited (cyclomatic 20)

Methodology & how to trust this report

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

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

What we checked — 39 dimensions across the health lenses
D1D2D3D4D13D15D16D19D28D33D34D35D36D37D38AC2AC3AC4AC5AC6AC7DM6M1M2M3M4P1P3P4R1R10R2R3R4R5R6R7R8R9

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a00aa2-1ffd-716f-97d0-e160c9bf1e7c.

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

Run transparency — what happened this run

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

  • D21 Naming Consistency — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
  • D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity (jscpd) — 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.
  • 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").
  • 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.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
  • 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").
  • D33 JS/npm Dependency Vulnerabilities: JS/npm CVE matching reads package manifests and lockfiles — risk from how a dependency is used, and advisories not yet published, fall outside this scan.
  • 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.
  • 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 clean result is "no unlabelled native control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".

The LLM boundary

LLM-set scores this run (2): D19, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity5.2 / 10Adequate✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 5.2 / 10 · rule-coverage 100% · ceiling Prevented

158 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was onKeyDown at 120. 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 create at 28 — they are counted neither in the figure above nor in this dimension's score.

constructor (cyclomatic 17) · ×3web/pdf_thumbnail_viewer.js:183
(anonymous) (cyclomatic 26) · ×2web/pdf_thumbnail_viewer.js:1397
(anonymous) (cyclomatic 19) · ×2web/pdf_find_controller.js:205
onKeyDown (cyclomatic 120)web/app.js:3145
checkAndRepair (cyclomatic 112)src/core/fonts.js:1423

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

What to do

  1. Resolve the 3 constructor (cyclomatic 17) finding(s) in Cyclomatic Complexity — start with pdf_thumbnail_viewer.js, field.js, event.js. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 2 (anonymous) (cyclomatic 26) finding(s) in Cyclomatic Complexity — start with pdf_thumbnail_viewer.js, tree_view.js. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 (anonymous) (cyclomatic 19) finding(s) in Cyclomatic Complexity — start with pdf_find_controller.js, worker.js. — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Prevented

250 method(s) exceeded the cognitive complexity threshold of 15; the worst was promiseBody at 191.

(anonymous) (cognitive 18) · ×3web/pdf_viewer.js:993
constructor (cognitive 16) · ×3src/scripting_api/field.js:22
render (cognitive 31) · ×2src/display/xfa_layer.js:318
(anonymous) (cognitive 28) · ×2web/pdf_find_controller.js:205
promiseBody (cognitive 191)src/core/evaluator.js:1730

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

What to do

  1. Resolve the 3 (anonymous) (cognitive 18) finding(s) in Cognitive Complexity — start with pdf_viewer.js, pdf_thumbnail_viewer.js, draw_ops_view.js. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 3 constructor (cognitive 16) finding(s) in Cognitive Complexity — start with field.js, event.js, pattern.js. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 2 render (cognitive 31) finding(s) in Cognitive Complexity — start with xfa_layer.js, annotation_layer.js. — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes0.0 / 10Critical✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

79 god class(es) detected.

FileTooLong: xfa/template.js · ×56src/core/xfa/template.js:0
TooManyMethods: ConfigNamespace · ×23src/core/xfa/config.js:1356

What to do

  1. Resolve the 56 FileTooLong finding(s) in God Classes — start with template.js, glyphlist.js, evaluator.js. — One of this dimension's main actionable groups (56 warning-level).
  2. Resolve the 23 TooManyMethods finding(s) in God Classes — start with canvas_dependency_tracker.js (3), config.js, editor.js. — One of this dimension's main actionable groups (23 warning-level).
  3. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication10.0 / 10Exemplary✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 duplicated block group(s) detected.

✓ On the Gold path — maintain.

Detailed fixes: d4_recommendation.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots8.6 / 10Strong✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: web/app.js (20×120=2400); src/core/evaluator.js (20×110=2200); src/core/editor/pdf_editor.js (29×58=1682)

Hotspot: web/app.js · ×67web/app.js

What to do

  1. Resolve the 67 Hotspot finding(s) in Churn × Complexity Hotspots — start with fonts.js (2), util.js (2), app.js. — One of this dimension's main actionable groups (67 warning-level).

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

D16 · Bus Factor7.5 / 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.

Maturity: DocumentedVerifiedPrevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

63 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is web/internal/page_view.js.

Off-boarding risk: anonymized user #1 · ×2

What to do

  1. Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).

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

D19 · Documentation Quality / 10Exemplary◐ Sampled · advisory

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

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

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

PDF.js has excellent documentation: an authoritative README with Contributing, Getting Started (online demo, browser extensions), and a dedicated font-tests, standard_fonts, jbig2, iccs, cmapscompress, brotli, and webpack example directories. The README itself is well written and complete for the project's size.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D28 · Secrets (history)8.0 / 10Strong✓ Tool-verified

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

Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.

Maturity: DocumentedVerifiedPrevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

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

Secret: aws-access-token · ×2external/jbig2/jbig2_nowasm_fallback.js:4detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed

What to do

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

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

D33 · JS/npm Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether JavaScript/npm dependencies have known published vulnerabilities (CVEs) — the npm ecosystem's biggest risk.

Method: JS/npm CVE scan via trivy fs --scanners vuln over JS manifests (package.json/yarn.lock/pnpm-lock/bun.lockb); 0-10 tight normalizer. NotApplicable without JS manifests. Exhaustive, deterministic.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable JS/npm dependencies.

✓ On the Gold path — maintain.

Detailed fixes: d33_recommendation.md.

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

2 of 255 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is extensions/chromium/preserve-referer.js.

Further orphaned files (smaller)

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.9 / 10Exemplary✓ Tool-verified

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

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

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.

Maturity: DocumentedVerifiedPrevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: app.js↔generic_scripting.js 50%; api.js↔pdf.sandbox.js 50%

Change coupling: app.js ↔ generic_scripting.js · ×2web/app.js

✓ On the Gold path — maintain.

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

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

No build provenance
No artifact signing
No SBOM

What to do

  1. Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 No artifact signing finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 No SBOM finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (.github/SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D38 · OSV Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.

Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable dependencies (OSV).

✓ On the Gold path — maintain.

Detailed fixes: d38_recommendation.md.

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels5.0 / 10Weak✓ 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, 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.

  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×5) — viewer-snippet-chrome-overlays.html:17, viewer.html:378, viewer.html:403, …
  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×2) — viewer.html:1034, viewer.html:1104
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×6) — viewer.html:1046, viewer.html:1099, viewer.html:1121, …

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure3.2 / 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.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×3) — options.html:17, viewer-geckoview.html:23, viewer.html:23
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×4) — options.html:17, debugger.html:17, viewer-geckoview.html:23, …
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. (×2) — viewer-geckoview.html:26, viewer.html:26

What to do

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

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

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

  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. — viewer.html:1201

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness5.5 / 10Adequate✓ Tool-verified

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

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

  • Abstract roles exist only to organise the ARIA taxonomy and must never be used in markup. Use a concrete role. (×5) — viewer.html:1016, viewer.html:1092, viewer.html:1141, …
  • aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable. (×2) — viewer.html:1212, viewer.html:1259

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • No accessibility enforcement found — no a11y linter (an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time.

What to do

  • Enforce accessibility in the toolchain: add an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (TypeORM/Prisma/MikroORM/Sequelize/Mongoose) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

M1 · Documentation (README)9.3 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

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

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

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

P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Dependabot is configured but does not watch `npm` — add that `package-ecosystem` entry to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

R1 · Type Safety0.0 / 10Critical✓ Tool-verified

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

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

  • 2 typed · 437 plain JS — the untyped files are extensions/chromium/background.js, extensions/chromium/contentscript.js, extensions/chromium/extension-router.js, extensions/chromium/options/migration.js, extensions/chromium/options/options.js, extensions/chromium/pdfHandler.js (+431 more).

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication9.2 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).

Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.

  • src/core/evaluator.js:2058 · src/core/evaluator.js:2097 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — evaluator.js:2058
  • src/core/xfa/template.js:678 · src/core/xfa/template.js:5346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — template.js:678
  • src/core/xfa/config.js:316 · src/core/xfa/config.js:757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — config.js:316
  • src/core/annotation.js:5556 · src/core/evaluator.js:144 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — annotation.js:5556
  • src/core/catalog.js:1015 · src/core/catalog.js:1045 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — catalog.js:1015
  • src/core/xfa/bind.js:186 · src/core/xfa/bind.js:310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bind.js:186
  • src/core/xfa/template.js:2300 · src/core/xfa/template.js:2652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — template.js:2300
  • src/core/xfa/template.js:2324 · src/core/xfa/template.js:4824 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — template.js:2324
  • src/core/xfa/template.js:2495 · src/core/xfa/template.js:5098 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — template.js:2495
  • extensions/chromium/options/migration.js:112 · extensions/chromium/options/migration.js:132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Check what actually differs between the copies before collapsing them: every one of them is an argument to a `addListener(…)` call, so where these calls are a MATRIX of cases — one per input, differing precisely in the case each one pins — the repetition is the enumeration and extracting the shared part would delete cases rather than de-duplicate anything. — migration.js:112
  • src/core/annotation.js:5205 · src/core/annotation.js:5250 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — annotation.js:5205
  • src/core/evaluator.js:224 · src/display/annotation_layer.js:2533 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — evaluator.js:224
  • src/core/postscript/ast.js:1099 · src/core/postscript/ast.js:1166 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — ast.js:1099
  • src/core/worker.js:920 · src/core/worker.js:962 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — worker.js:920
  • src/core/xfa/bind.js:333 · src/core/xfa/bind.js:351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bind.js:333
  • src/core/xfa/config.js:147 · src/core/xfa/locale_set.js:52 · src/core/xfa/locale_set.js:164 · src/core/xfa/locale_set.js:203 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — config.js:147
  • src/core/xfa/config.js:497 · src/core/xfa/config.js:1198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — config.js:497
  • src/core/xfa/config.js:760 · src/core/xfa/config.js:865 · src/core/xfa/config.js:1037 — 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. — config.js:760
  • src/core/xfa/config.js:1126 · src/core/xfa/config.js:1228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — config.js:1126
  • src/core/xfa/template.js:1819 · src/core/xfa/template.js:2162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — template.js:1819
  • src/core/xfa/template.js:1929 · src/core/xfa/template.js:2880 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — template.js:1929
  • src/display/annotation_layer.js:3599 · src/display/annotation_layer.js:3630 · src/display/annotation_layer.js:3661 — 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. — annotation_layer.js:3599
  • src/display/annotation_layer.js:3877 · src/display/annotation_layer.js:3893 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — annotation_layer.js:3877
  • src/core/annotation.js:4334 · src/core/annotation.js:5089 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — annotation.js:4334
  • src/core/brotli_stream.js:60 · src/core/flate_stream.js:167 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — brotli_stream.js:60
  • src/core/core_utils.js:67 · src/core/xfa/config.js:60 · src/core/xfa/config.js:92 · src/core/xfa/config.js:210 · +12 more site(s) not listed — the 4 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — core_utils.js:67
  • src/core/xfa/config.js:1056 · src/core/xfa/locale_set.js:34 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — config.js:1056
  • src/core/catalog.js:947 · src/core/catalog.js:968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — catalog.js:947
  • src/core/cff_parser.js:1694 · src/core/core_utils.js:360 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — cff_parser.js:1694
  • src/core/editor/pdf_editor.js:603 · src/core/editor/pdf_editor.js:1571 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — pdf_editor.js:603
  • src/core/evaluator.js:1841 · src/core/evaluator.js:2205 · src/core/evaluator.js:3464 · src/core/evaluator.js:3520 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — evaluator.js:1841
  • src/core/evaluator.js:2814 · src/core/evaluator.js:2880 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — evaluator.js:2814
  • src/core/parser.js:424 · src/core/parser.js:497 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — parser.js:424
  • src/core/xfa/config.js:467 · src/core/xfa/config.js:532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — config.js:467
  • src/core/xfa/config.js:1359 · src/core/xfa/connection_set.js:148 · src/core/xfa/locale_set.js:243 · src/core/xfa/xhtml.js:533 — the 4 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — config.js:1359
  • src/core/xfa/formcalc_parser.js:611 · src/core/xfa/formcalc_parser.js:815 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — formcalc_parser.js:611
  • src/core/xfa/formcalc_parser.js:830 · src/core/xfa/formcalc_parser.js:921 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — formcalc_parser.js:830
  • src/core/xfa/formcalc_parser.js:867 · src/core/xfa/formcalc_parser.js:883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — formcalc_parser.js:867
  • src/core/xfa/template.js:525 · src/core/xfa/template.js:3684 · src/core/xfa/template.js:4631 — 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. — template.js:525
  • src/core/xfa/template.js:1379 · src/core/xfa/template.js:1723 · src/core/xfa/template.js:3871 · src/core/xfa/template.js:5837 — 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. — template.js:1379
  • 397 further occurrence(s) are not listed individually; the score already reflects all 437.

What to do

  • Extract the duplicated blocks into shared functions/components.
R2 · Cyclomatic Complexity5.0 / 10Adequate✓ Tool-verified

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

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

  • Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×20) — app.js:3145, fonts.js:1423, evaluator.js:1730, …

What to do

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

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

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

  • 106 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: src/core/xfa/template.js (5910), src/core/annotation.js (5233), src/core/evaluator.js (5034), src/core/glyphlist.js (4552), src/display/canvas.js (3947), src/display/annotation_layer.js (3933) (+100 more).

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×25) — app.js, pdf_thumbnail_viewer.js, comment_manager.js, …

What to do

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

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D33 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D33). Deterministic.

R6 · Tooling6.7 / 10Adequate✓ Tool-verified

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

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

  • test ✓ · lint ✓ · typecheck ✗

What to do

  • Add `tsc --noEmit` as package.json scripts and run them in CI.
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified

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

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

  • 441 file(s) (~260383 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: test/unit/test_utils.js imports '../../../../test/webserver.mjs', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here.
  • 2 file(s) (~46 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — types
R8 · Dependency Hygiene5.5 / 10Adequate✓ Tool-verified

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

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

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. — webserver.mjs:25
  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)

What to do

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

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

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

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health30%Weak — gated by D2, D3, R1, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture99%ExemplarySolid.
Maturity69%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness71%StrongSolid.
Security81%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Accessibility36%Weak — gated by AC3, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 81 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AX1 Captive dependencies — no DI registrations detected
  • AX10 Code composition — not assessed — code composition is computed by ROLE over a document set that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — no singleton implementations detected
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph 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
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph 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
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) 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
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~38 lines of test source are present (.ts, .mjs, .js) but the test-quality collector reads C# only, 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
  • D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (package.json), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
  • D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
  • 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.
  • D21 Naming Consistency — LLM evaluation failed
  • D22 Internal API Consistency — No exposed public API
  • D23 Boundary Type-Coupling — Zero projects and zero LoC mean the codebase is trivial and has no structure to justify boundaries.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D29 Static Analysis (SAST) — Static Analysis (SAST) not included (time budget)
  • 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 (package.json — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — No production classes were analyzable, so cohesion (LCOM4) was not measured (the solution likely failed to load or has no production code).
  • 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
  • D9 Test Distribution — Test source is present (.ts, .mjs, .js) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Aggregate boundaries — not scored for TypeScript: a class holding another class reads the same whether the inner type is an aggregate or a value object, so this cannot be decided from source without guessing — reported as guidance rather than measured
  • DM2 Strongly-typed ids — not scored for TypeScript: branded ids (`type Id = string & { __brand }`) are an uncommon idiom, so a bare-string id is not on its own evidence of a missing typed id — reported as guidance rather than measured
  • DM3 Integration-event coupling — not scored for TypeScript: a domain type used across packages is indistinguishable in source from a deliberate shared-kernel package, so this is reported as guidance rather than measured
  • DM4 Rich vs anemic model — not scored for TypeScript: telling a rich domain entity from an anemic data holder needs the behaviour a source-only read cannot always attribute (components, DTOs and readonly value objects are all legitimately data-shaped), so this is reported as guidance rather than measured
  • DM5 Encapsulated state — not scored for TypeScript: the language already steers state behind #private/private/readonly, so a mutable public field is rare enough that we report this as guidance rather than measuring it
  • DM7 Repository granularity — not scored for TypeScript: deciding whether a repository belongs to an aggregate root needs the aggregate structure, which source alone does not state — reported as guidance rather than measured
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
  • 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 check looks for
  • GD1 Unfinished & placeholder code — no source files
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
  • P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — not assessed — schema-migration practice is read from 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
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.

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.

Issue — 28 finding(s)
AC2 · Forms & labels · <button> with no accessible text · ×6
  • <button> with no accessible text web/viewer.html:1046 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text web/viewer.html:1099 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text web/viewer.html:1121 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text web/viewer.html:1144 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text web/viewer.html:1153 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text web/viewer.html:1162 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC5 · ARIA correctness · Abstract ARIA role "sectionhead" · ×5
  • Abstract ARIA role "sectionhead" web/viewer.html:1016 — Abstract roles exist only to organise the ARIA taxonomy and must never be used in markup. Use a concrete role.
  • Abstract ARIA role "sectionhead" web/viewer.html:1092 — Abstract roles exist only to organise the ARIA taxonomy and must never be used in markup. Use a concrete role.
  • Abstract ARIA role "sectionhead" web/viewer.html:1141 — Abstract roles exist only to organise the ARIA taxonomy and must never be used in markup. Use a concrete role.
  • Abstract ARIA role "sectionhead" web/viewer.html:1252 — Abstract roles exist only to organise the ARIA taxonomy and must never be used in markup. Use a concrete role.
  • Abstract ARIA role "sectionhead" web/viewer.html:1278 — Abstract roles exist only to organise the ARIA taxonomy and must never be used in markup. Use a concrete role.
AC2 · Forms & labels · <input> without a programmatic label · ×3
  • <input> without a programmatic label web/viewer-snippet-chrome-overlays.html:17 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label web/viewer.html:378 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label web/viewer.html:1174 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · <html> without a lang · ×3
  • <html> without a lang extensions/chromium/options/options.html:17 — 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/viewer-geckoview.html:23 — 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/viewer.html:23 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC2 · Forms & labels · Link with no accessible name · ×2
  • Link with no accessible name web/viewer.html:1034 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name web/viewer.html:1104 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC3 · Page structure · Viewport restricts zoom · ×2
  • Viewport restricts zoom web/viewer-geckoview.html:26 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom web/viewer.html:26 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC5 · ARIA correctness · aria-hidden on a focusable element · ×2
  • aria-hidden on a focusable element web/viewer.html:1212 — aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable.
  • aria-hidden on a focusable element web/viewer.html:1259 — aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable.
D28 · Secrets (history) · Secret · ×2
  • Secret: aws-access-token external/jbig2/jbig2_nowasm_fallback.js:4 — matched rule 'aws-access-token'
  • Secret: square-access-token pdfjs.config:3 — matched rule 'square-access-token'
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label web/viewer.html:403 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels · <textarea> without a programmatic label · ×1
  • <textarea> without a programmatic label web/viewer.html:1280 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
R8 · Dependency Hygiene · Unlisted import 'ws' · ×1
  • Unlisted import 'ws' test/webserver.mjs:25 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Warning — 654 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×67
  • Hotspot: web/app.js web/app.js — web/app.js changed 20 times in last 90 days, max complexity 120. 5 of those changes were fix/bug commits, and the other 15 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.
  • Hotspot: src/core/evaluator.js src/core/evaluator.js — src/core/evaluator.js changed 20 times in last 90 days, max complexity 110. 2 of those changes were fix/bug commits, and the other 18 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.
  • Hotspot: src/core/editor/pdf_editor.js src/core/editor/pdf_editor.js — src/core/editor/pdf_editor.js changed 29 times in last 90 days, max complexity 58. 2 of those changes were fix/bug commits, and the other 27 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/core/fonts.js src/core/fonts.js — src/core/fonts.js changed 13 times in last 90 days, max complexity 112. 1 of those changes was a fix/bug commit, and the other 12 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.
  • Hotspot: src/core/annotation.js src/core/annotation.js — src/core/annotation.js changed 28 times in last 90 days, max complexity 38. 2 of those changes were fix/bug commits, and the other 26 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.
  • Hotspot: src/core/catalog.js src/core/catalog.js — src/core/catalog.js changed 15 times in last 90 days, max complexity 68. 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.
  • Hotspot: src/display/canvas.js src/display/canvas.js — src/display/canvas.js changed 16 times in last 90 days, max complexity 48. 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.
  • Hotspot: src/display/api.js src/display/api.js — src/display/api.js changed 13 times in last 90 days, max complexity 53. 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.
  • Hotspot: src/core/document.js src/core/document.js — src/core/document.js changed 20 times in last 90 days, max complexity 27. 3 of those changes were fix/bug commits, and the other 17 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.
  • Hotspot: src/core/worker.js src/core/worker.js — src/core/worker.js changed 16 times in last 90 days, max complexity 33. 1 of those changes was a fix/bug commit, and the other 15 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.
  • Hotspot: src/display/annotation_layer.js src/display/annotation_layer.js — src/display/annotation_layer.js changed 18 times in last 90 days, max complexity 29. 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.
  • Hotspot: src/core/cff_parser.js src/core/cff_parser.js — src/core/cff_parser.js changed 8 times in last 90 days, max complexity 54. 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.
  • Hotspot: web/pdf_viewer.js web/pdf_viewer.js — web/pdf_viewer.js changed 8 times in last 90 days, max complexity 48. 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.
  • Hotspot: src/core/type1_parser.js src/core/type1_parser.js — src/core/type1_parser.js changed 4 times in last 90 days, max complexity 74. 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.
  • Hotspot: src/core/xref.js src/core/xref.js — src/core/xref.js changed 5 times in last 90 days, max complexity 54. 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.
  • Hotspot: src/core/font_renderer.js src/core/font_renderer.js — src/core/font_renderer.js changed 4 times in last 90 days, max complexity 65. 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.
  • Hotspot: src/core/struct_tree.js src/core/struct_tree.js — src/core/struct_tree.js changed 9 times in last 90 days, max complexity 27. 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.
  • Hotspot: src/core/crypto.js src/core/crypto.js — src/core/crypto.js changed 6 times in last 90 days, max complexity 40. 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.
  • Hotspot: src/core/parser.js src/core/parser.js — src/core/parser.js changed 5 times in last 90 days, max complexity 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.
  • Hotspot: web/pdf_thumbnail_viewer.js web/pdf_thumbnail_viewer.js — web/pdf_thumbnail_viewer.js changed 9 times in last 90 days, max complexity 26. 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.
  • Hotspot: web/pdf_page_view.js web/pdf_page_view.js — web/pdf_page_view.js changed 8 times in last 90 days, max complexity 29. 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.
  • Hotspot: src/core/xfa/template.js src/core/xfa/template.js — src/core/xfa/template.js changed 3 times in last 90 days, max complexity 74. 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.
  • Hotspot: gulpfile.mjs gulpfile.mjs — gulpfile.mjs changed 11 times in last 90 days, max complexity 20. 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.
  • Hotspot: src/display/editor/tools.js src/display/editor/tools.js — src/display/editor/tools.js changed 8 times in last 90 days, max complexity 27. 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.
  • Hotspot: src/display/draw_layer.js src/display/draw_layer.js — src/display/draw_layer.js changed 4 times in last 90 days, max complexity 53. 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.
  • + 42 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×56
  • FileTooLong: xfa/template.js src/core/xfa/template.js:0 — FileTooLong — 4618 significant lines (blank, comment-only and punctuation-only lines excluded). 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: core/glyphlist.js src/core/glyphlist.js:0 — FileTooLong — 4535 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 95% of them inside a single declaration: getGlyphsUnicode (18-4349). 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: core/evaluator.js src/core/evaluator.js:0 — FileTooLong — 3664 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 84% of them inside a single declaration: PartialEvaluator (222-4838). 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: core/annotation.js src/core/annotation.js:0 — FileTooLong — 3616 significant lines (blank, comment-only and punctuation-only lines excluded). 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: core/metrics.js src/core/metrics.js:0 — FileTooLong — 3000 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 98% of them inside a single declaration: getMetrics (21-2968). 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: display/canvas.js src/display/canvas.js:0 — FileTooLong — 2795 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 89% of them inside a single declaration: CanvasGraphics (494-4360). 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: display/annotation_layer.js src/display/annotation_layer.js:0 — FileTooLong — 2774 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). 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: core/fonts.js src/core/fonts.js:0 — FileTooLong — 2509 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 71% of them inside a single declaration: Font (1054-3779). 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: web/app.js web/app.js:0 — FileTooLong — 2214 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 73% of them inside a single declaration: PDFViewerApplication (110-2677). 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: editor/pdf_editor.js src/core/editor/pdf_editor.js:0 — FileTooLong — 1976 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: PDFEditor (133-3133). 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: editor/tools.js src/display/editor/tools.js:0 — FileTooLong — 1715 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: AnnotationEditorUIManager (738-3072). 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: display/api.js src/display/api.js:0 — FileTooLong — 1677 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). 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: web/pdf_viewer.js web/pdf_viewer.js:0 — FileTooLong — 1609 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 95% of them inside a single declaration: PDFViewer (231-2807). 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: core/document.js src/core/document.js:0 — FileTooLong — 1607 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). 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: editor/editor.js src/display/editor/editor.js:0 — FileTooLong — 1388 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: AnnotationEditor (45-2449). 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: core/cff_parser.js src/core/cff_parser.js:0 — FileTooLong — 1367 significant lines (blank, comment-only and punctuation-only lines excluded). 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: web/pdf_thumbnail_viewer.js web/pdf_thumbnail_viewer.js:0 — FileTooLong — 1305 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: PDFThumbnailViewer (89-1961). 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: core/catalog.js src/core/catalog.js:0 — FileTooLong — 1281 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: Catalog (120-2078). 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: xfa/config.js src/core/xfa/config.js:0 — FileTooLong — 1131 significant lines (blank, comment-only and punctuation-only lines excluded). 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: core/parser.js src/core/parser.js:0 — FileTooLong — 956 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). 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: core/crypto.js src/core/crypto.js:0 — FileTooLong — 939 significant lines (blank, comment-only and punctuation-only lines excluded). 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: core/pattern.js src/core/pattern.js:0 — FileTooLong — 937 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). 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: xfa/formcalc_parser.js src/core/xfa/formcalc_parser.js:0 — FileTooLong — 867 significant lines (blank, comment-only and punctuation-only lines excluded). 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: web/comment_manager.js web/comment_manager.js:0 — FileTooLong — 863 significant lines (blank, comment-only and punctuation-only lines excluded). 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: shared/util.js src/shared/util.js:0 — FileTooLong — 838 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). 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.
  • + 31 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×25
  • No test reaches this file web/app.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/pdf_thumbnail_viewer.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/comment_manager.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/signature_manager.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/internal/tree_view.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/internal/page_view.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/debugger.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/firefoxcom.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/internal/draw_ops_view.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/new_alt_text_manager.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/digital_signature_properties_manager.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/internal/multiline_view.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/pdf_thumbnail_view.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/views_manager.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/internal/canvas_context_details_view.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file external/cmapscompress/compress.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/chromecom.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/toolbar.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/viewer.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/pdf_print_service.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/pdf_outline_viewer.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/pdf_document_properties.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/chromium/pdfHandler.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/caret_browsing.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file external/builder/babel-plugin-pdfjs-preprocessor.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D3 · God Classes · TooManyMethods · ×23
  • TooManyMethods: ConfigNamespace src/core/xfa/config.js:1356 — TooManyMethods — 140 methods. 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: AnnotationEditor src/display/editor/editor.js:45 — TooManyMethods — 127 methods. 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: AnnotationEditorUIManager src/display/editor/tools.js:738 — TooManyMethods — 124 methods. 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: TemplateNamespace src/core/xfa/template.js:6131 — TooManyMethods — 114 methods. 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: CanvasGraphics src/display/canvas.js:494 — TooManyMethods — 110 methods. 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: Doc src/scripting_api/doc.js:34 — TooManyMethods — 109 methods. 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: DrawingEditor src/display/editor/draw.js:71 — TooManyMethods — 61 methods. 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: PDFEditor src/core/editor/pdf_editor.js:133 — TooManyMethods — 56 methods. 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: AnnotationEditorLayer src/display/editor/annotation_editor_layer.js:65 — TooManyMethods — 51 methods. 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: PDFThumbnailViewer web/pdf_thumbnail_viewer.js:89 — TooManyMethods — 51 methods. 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: PDFViewer web/pdf_viewer.js:231 — TooManyMethods — 51 methods. 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: XFAObject src/core/xfa/xfa_object.js:104 — TooManyMethods — 50 methods. 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: App src/scripting_api/app.js:29 — TooManyMethods — 47 methods. 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: FreeTextEditor src/display/editor/freetext.js:37 — TooManyMethods — 40 methods. 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: WorkerTransport src/display/api.js:2416 — TooManyMethods — 38 methods. 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: TreeView web/internal/tree_view.js:32 — TooManyMethods — 37 methods. 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: PartialEvaluator src/core/evaluator.js:222 — TooManyMethods — 36 methods. 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: Annotation src/core/annotation.js:691 — TooManyMethods — 33 methods. 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: CanvasBBoxTracker src/display/canvas_dependency_tracker.js:107 — TooManyMethods — 33 methods. 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: CanvasDependencyTracker src/display/canvas_dependency_tracker.js:423 — TooManyMethods — 32 methods. 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: CanvasNestedDependencyTracker src/display/canvas_dependency_tracker.js:809 — TooManyMethods — 32 methods. 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: PDFPageView web/pdf_page_view.js:141 — TooManyMethods — 32 methods. 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: Field src/scripting_api/field.js:21 — TooManyMethods — 31 methods. 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.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×11
  • Duplicated block (16 lines × 2 locations) extensions/chromium/options/migration.js:112 — extensions/chromium/options/migration.js:112 · extensions/chromium/options/migration.js:132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Check what actually differs between the copies before collapsing them: every one of them is an argument to a `addListener(…)` call, so where these calls are a MATRIX of cases — one per input, differing precisely in the case each one pins — the repetition is the enumeration and extracting the shared part would delete cases rather than de-duplicate anything.
  • Duplicated block (16 lines × 2 locations) src/core/annotation.js:5205 — src/core/annotation.js:5205 · src/core/annotation.js:5250 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (16 lines × 2 locations) src/core/evaluator.js:224 — src/core/evaluator.js:224 · src/display/annotation_layer.js:2533 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (16 lines × 2 locations) src/core/postscript/ast.js:1099 — src/core/postscript/ast.js:1099 · src/core/postscript/ast.js:1166 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (16 lines × 2 locations) src/core/worker.js:920 — src/core/worker.js:920 · src/core/worker.js:962 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (16 lines × 2 locations) src/core/xfa/bind.js:333 — src/core/xfa/bind.js:333 · src/core/xfa/bind.js:351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2 locations) src/core/xfa/config.js:497 — src/core/xfa/config.js:497 · src/core/xfa/config.js:1198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2 locations) src/core/xfa/config.js:1126 — src/core/xfa/config.js:1126 · src/core/xfa/config.js:1228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2 locations) src/core/xfa/template.js:1819 — src/core/xfa/template.js:1819 · src/core/xfa/template.js:2162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2 locations) src/core/xfa/template.js:1929 — src/core/xfa/template.js:1929 · src/core/xfa/template.js:2880 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2 locations) src/display/annotation_layer.js:3877 — src/display/annotation_layer.js:3877 · src/display/annotation_layer.js:3893 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×9
  • Duplicated block (14 lines × 2 locations) src/core/catalog.js:947 — src/core/catalog.js:947 · src/core/catalog.js:968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2 locations) src/core/cff_parser.js:1694 — src/core/cff_parser.js:1694 · src/core/core_utils.js:360 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (14 lines × 2 locations) src/core/editor/pdf_editor.js:603 — src/core/editor/pdf_editor.js:603 · src/core/editor/pdf_editor.js:1571 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2 locations) src/core/evaluator.js:2814 — src/core/evaluator.js:2814 · src/core/evaluator.js:2880 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2 locations) src/core/parser.js:424 — src/core/parser.js:424 · src/core/parser.js:497 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2 locations) src/core/xfa/config.js:467 — src/core/xfa/config.js:467 · src/core/xfa/config.js:532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2 locations) src/core/xfa/formcalc_parser.js:611 — src/core/xfa/formcalc_parser.js:611 · src/core/xfa/formcalc_parser.js:815 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (14 lines × 2 locations) src/core/xfa/formcalc_parser.js:830 — src/core/xfa/formcalc_parser.js:830 · src/core/xfa/formcalc_parser.js:921 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (14 lines × 2 locations) src/core/xfa/formcalc_parser.js:867 — src/core/xfa/formcalc_parser.js:867 · src/core/xfa/formcalc_parser.js:883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×6
  • Duplicated block (17 lines × 2 locations) src/core/annotation.js:5556 — src/core/annotation.js:5556 · src/core/evaluator.js:144 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (17 lines × 2 locations) src/core/catalog.js:1015 — src/core/catalog.js:1015 · src/core/catalog.js:1045 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (17 lines × 2 locations) src/core/xfa/bind.js:186 — src/core/xfa/bind.js:186 · src/core/xfa/bind.js:310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2 locations) src/core/xfa/template.js:2300 — src/core/xfa/template.js:2300 · src/core/xfa/template.js:2652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2 locations) src/core/xfa/template.js:2324 — src/core/xfa/template.js:2324 · src/core/xfa/template.js:4824 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2 locations) src/core/xfa/template.js:2495 — src/core/xfa/template.js:2495 · src/core/xfa/template.js:5098 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC3 · Page structure · Page without a main landmark · ×4
  • Page without a main landmark extensions/chromium/options/options.html:17 — 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/internal/debugger.html:17 — 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/viewer-geckoview.html:23 — 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/viewer.html:23 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · constructor (cyclomatic 17) · ×3
  • constructor (cyclomatic 17) web/pdf_thumbnail_viewer.js:183 — constructor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • constructor (cyclomatic 17) src/scripting_api/field.js:22 — constructor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • constructor (cyclomatic 17) src/scripting_api/event.js:22 — constructor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D2 · Cognitive Complexity · (anonymous) (cognitive 18) · ×3
  • (anonymous) (cognitive 18) web/pdf_viewer.js:993 — (anonymous) has cognitive complexity 18 (threshold 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.
  • (anonymous) (cognitive 18) web/pdf_thumbnail_viewer.js:1397 — (anonymous) has cognitive complexity 18 (threshold 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.
  • (anonymous) (cognitive 18) web/internal/draw_ops_view.js:548 — (anonymous) has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 16) · ×3
  • constructor (cognitive 16) src/scripting_api/field.js:22 — constructor has cognitive complexity 16 (threshold 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.
  • constructor (cognitive 16) src/scripting_api/event.js:22 — constructor has cognitive complexity 16 (threshold 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.
  • constructor (cognitive 16) src/core/pattern.js:464 — constructor has cognitive complexity 16 (threshold 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.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×3
  • Duplicated block (15 lines × 2 locations) src/core/annotation.js:4334 — src/core/annotation.js:4334 · src/core/annotation.js:5089 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2 locations) src/core/brotli_stream.js:60 — src/core/brotli_stream.js:60 · src/core/flate_stream.js:167 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (15 lines × 2 locations) src/core/xfa/config.js:1056 — src/core/xfa/config.js:1056 · src/core/xfa/locale_set.js:34 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (14 lines × 4 locations) · ×3
  • Duplicated block (14 lines × 4 locations) src/core/evaluator.js:1841 — src/core/evaluator.js:1841 · src/core/evaluator.js:2205 · src/core/evaluator.js:3464 · src/core/evaluator.js:3520 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (14 lines × 4 locations) src/core/xfa/config.js:1359 — src/core/xfa/config.js:1359 · src/core/xfa/connection_set.js:148 · src/core/xfa/locale_set.js:243 · src/core/xfa/xhtml.js:533 — the 4 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (14 lines × 4 locations) src/core/xfa/template.js:1379 — src/core/xfa/template.js:1379 · src/core/xfa/template.js:1723 · src/core/xfa/template.js:3871 · src/core/xfa/template.js:5837 — 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.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 26) · ×2
  • (anonymous) (cyclomatic 26) web/pdf_thumbnail_viewer.js:1397 — (anonymous) has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 26) web/internal/tree_view.js:122 — (anonymous) has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 19) · ×2
  • (anonymous) (cyclomatic 19) web/pdf_find_controller.js:205 — (anonymous) has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 19) src/core/worker.js:592 — (anonymous) has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D2 · Cognitive Complexity · render (cognitive 31) · ×2
  • render (cognitive 31) src/display/xfa_layer.js:318 — render has cognitive complexity 31 (threshold 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.
  • render (cognitive 31) src/display/annotation_layer.js:4032 — render has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 28) · ×2
  • (anonymous) (cognitive 28) web/pdf_find_controller.js:205 — (anonymous) has cognitive complexity 28 (threshold 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.
  • (anonymous) (cognitive 28) src/display/api.js:2809 — (anonymous) has cognitive complexity 28 (threshold 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.
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: app.js ↔ generic_scripting.js web/app.js — `web/app.js` and `web/generic_scripting.js` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) 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.
  • Change coupling: api.js ↔ pdf.sandbox.js src/display/api.js — `src/display/api.js` and `src/pdf.sandbox.js` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking.
R10 · Code Duplication · Duplicated block (16 lines × 3 locations) · ×2
  • Duplicated block (16 lines × 3 locations) src/core/xfa/config.js:760 — src/core/xfa/config.js:760 · src/core/xfa/config.js:865 · src/core/xfa/config.js:1037 — 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 (16 lines × 3 locations) src/display/annotation_layer.js:3599 — src/display/annotation_layer.js:3599 · src/display/annotation_layer.js:3630 · src/display/annotation_layer.js:3661 — 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.
AC4 · Keyboard semantics · Anchor without href · ×1
  • Anchor without href web/viewer.html:1201 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time.
D1 · Cyclomatic Complexity · onKeyDown (cyclomatic 120) · ×1
  • onKeyDown (cyclomatic 120) web/app.js:3145 — onKeyDown has cyclomatic complexity 120 (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.
D1 · Cyclomatic Complexity · checkAndRepair (cyclomatic 112) · ×1
  • checkAndRepair (cyclomatic 112) src/core/fonts.js:1423 — checkAndRepair has cyclomatic complexity 112 (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.
D1 · Cyclomatic Complexity · promiseBody (cyclomatic 110) · ×1
  • promiseBody (cyclomatic 110) src/core/evaluator.js:1730 — promiseBody has cyclomatic complexity 110 (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.
D1 · Cyclomatic Complexity · extractCidKeyedFontProgram (cyclomatic 74) · ×1
  • extractCidKeyedFontProgram (cyclomatic 74) src/core/type1_parser.js:749 — extractCidKeyedFontProgram has cyclomatic complexity 74 (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.
D1 · Cyclomatic Complexity · parse (cyclomatic 65) · ×1
  • parse (cyclomatic 65) src/core/font_renderer.js:382 — parse has cyclomatic complexity 65 (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.
D1 · Cyclomatic Complexity · _initializeViewerComponents (cyclomatic 63) · ×1
  • _initializeViewerComponents (cyclomatic 63) web/app.js:414 — _initializeViewerComponents has cyclomatic complexity 63 (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.
D1 · Cyclomatic Complexity · translateFont (cyclomatic 61) · ×1
  • translateFont (cyclomatic 61) src/core/evaluator.js:4451 — translateFont has cyclomatic complexity 61 (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.
D1 · Cyclomatic Complexity · sanitizeTTProgram (cyclomatic 60) · ×1
  • sanitizeTTProgram (cyclomatic 60) src/core/fonts.js:2468 — sanitizeTTProgram has cyclomatic complexity 60 (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.
D1 · Cyclomatic Complexity · createImageData (cyclomatic 59) · ×1
  • createImageData (cyclomatic 59) src/core/image.js:715 — createImageData has cyclomatic complexity 59 (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.
D1 · Cyclomatic Complexity · readCmapTable (cyclomatic 56) · ×1
  • readCmapTable (cyclomatic 56) src/core/fonts.js:1607 — readCmapTable has cyclomatic complexity 56 (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.
D1 · Cyclomatic Complexity · indexObjects (cyclomatic 54) · ×1
  • indexObjects (cyclomatic 54) src/core/xref.js:429 — indexObjects has cyclomatic complexity 54 (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.
D1 · Cyclomatic Complexity · #selectionChange (cyclomatic 53) · ×1
  • #selectionChange (cyclomatic 53) src/display/draw_layer.js:385 — #selectionChange has cyclomatic complexity 53 (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.
D1 · Cyclomatic Complexity · getDocument (cyclomatic 53) · ×1
  • getDocument (cyclomatic 53) src/display/api.js:234 — getDocument has cyclomatic complexity 53 (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.
D1 · Cyclomatic Complexity · constructor (cyclomatic 53) · ×1
  • constructor (cyclomatic 53) src/core/image.js:80 — constructor has cyclomatic complexity 53 (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.
D1 · Cyclomatic Complexity · promiseBody (cyclomatic 53) · ×1
  • promiseBody (cyclomatic 53) src/core/evaluator.js:3191 — promiseBody has cyclomatic complexity 53 (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.
D1 · Cyclomatic Complexity · convert (cyclomatic 52) · ×1
  • convert (cyclomatic 52) src/core/type1_parser.js:92 — convert has cyclomatic complexity 52 (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.
D1 · Cyclomatic Complexity · preEvaluateFont (cyclomatic 51) · ×1
  • preEvaluateFont (cyclomatic 51) src/core/evaluator.js:4288 — preEvaluateFont has cyclomatic complexity 51 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · constructor (cyclomatic 48) · ×1
  • constructor (cyclomatic 48) web/pdf_viewer.js:310 — constructor has cyclomatic complexity 48 (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.
D1 · Cyclomatic Complexity · beginGroup (cyclomatic 48) · ×1
  • beginGroup (cyclomatic 48) src/display/canvas.js:3196 — beginGroup has cyclomatic complexity 48 (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.
D1 · Cyclomatic Complexity · compareWithLastPosition (cyclomatic 48) · ×1
  • compareWithLastPosition (cyclomatic 48) src/core/evaluator.js:2723 — compareWithLastPosition has cyclomatic complexity 48 (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.
D1 · Cyclomatic Complexity · findDCTDecodeInlineStreamEnd (cyclomatic 47) · ×1
  • findDCTDecodeInlineStreamEnd (cyclomatic 47) src/core/parser.js:343 — findDCTDecodeInlineStreamEnd has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · showText (cyclomatic 45) · ×1
  • showText (cyclomatic 45) src/display/canvas.js:2654 — showText has cyclomatic complexity 45 (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.
D1 · Cyclomatic Complexity · getObj (cyclomatic 45) · ×1
  • getObj (cyclomatic 45) src/core/parser.js:1278 — getObj has cyclomatic complexity 45 (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.
D1 · Cyclomatic Complexity · extractFontProgram (cyclomatic 44) · ×1
  • extractFontProgram (cyclomatic 44) src/core/type1_parser.js:555 — extractFontProgram 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.
D1 · Cyclomatic Complexity · extractDataStructures (cyclomatic 42) · ×1
  • extractDataStructures (cyclomatic 42) src/core/evaluator.js:3609 — extractDataStructures has cyclomatic complexity 42 (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.
D1 · Cyclomatic Complexity · compileType3Glyph (cyclomatic 41) · ×1
  • compileType3Glyph (cyclomatic 41) src/core/fonts_utils.js:212 — compileType3Glyph has cyclomatic complexity 41 (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.
D1 · Cyclomatic Complexity · buildPaintImageXObject (cyclomatic 41) · ×1
  • buildPaintImageXObject (cyclomatic 41) src/core/evaluator.js:605 — buildPaintImageXObject has cyclomatic complexity 41 (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.
D1 · Cyclomatic Complexity · scrollPageIntoView (cyclomatic 37) · ×1
  • scrollPageIntoView (cyclomatic 37) web/pdf_viewer.js:1795 — scrollPageIntoView has cyclomatic complexity 37 (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.
D1 · Cyclomatic Complexity · fallbackToSystemFont (cyclomatic 36) · ×1
  • fallbackToSystemFont (cyclomatic 36) src/core/fonts.js:1257 — fallbackToSystemFont has cyclomatic complexity 36 (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.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 35) · ×1
  • (anonymous) (cyclomatic 35) src/scripting_api/util.js:82 — (anonymous) has cyclomatic complexity 35 (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.
D1 · Cyclomatic Complexity · setGState (cyclomatic 35) · ×1
  • setGState (cyclomatic 35) src/core/evaluator.js:1115 — setGState has cyclomatic complexity 35 (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.
D1 · Cyclomatic Complexity · #walk (cyclomatic 34) · ×1
  • #walk (cyclomatic 34) web/struct_tree_layer_builder.js:534 — #walk has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · setHash (cyclomatic 34) · ×1
  • setHash (cyclomatic 34) web/pdf_link_service.js:360 — setHash has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 33) · ×1
  • (anonymous) (cyclomatic 33) src/core/worker.js:688 — (anonymous) has cyclomatic complexity 33 (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.
D1 · Cyclomatic Complexity · getString (cyclomatic 33) · ×1
  • getString (cyclomatic 33) src/core/parser.js:1071 — getString has cyclomatic complexity 33 (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.
D1 · Cyclomatic Complexity · compileGlyf (cyclomatic 33) · ×1
  • compileGlyf (cyclomatic 33) src/core/font_renderer.js:163 — compileGlyf has cyclomatic complexity 33 (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.
D1 · Cyclomatic Complexity · extractWidths (cyclomatic 33) · ×1
  • extractWidths (cyclomatic 33) src/core/evaluator.js:4096 — extractWidths has cyclomatic complexity 33 (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.
D1 · Cyclomatic Complexity · hasBlendModes (cyclomatic 32) · ×1
  • hasBlendModes (cyclomatic 32) src/core/evaluator.js:279 — hasBlendModes has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #removeType3ColorOperators (cyclomatic 32) · ×1
  • #removeType3ColorOperators (cyclomatic 32) src/core/evaluator.js:4965 — #removeType3ColorOperators has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 31) · ×1
  • (anonymous) (cyclomatic 31) web/text_layer_builder.js:272 — (anonymous) has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · #updateFromSandbox (cyclomatic 31) · ×1
  • #updateFromSandbox (cyclomatic 31) web/pdf_scripting_manager.js:297 — #updateFromSandbox has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · findDefaultInlineStreamEnd (cyclomatic 31) · ×1
  • findDefaultInlineStreamEnd (cyclomatic 31) src/core/parser.js:202 — findDefaultInlineStreamEnd has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · constructor (cyclomatic 31) · ×1
  • constructor (cyclomatic 31) src/core/fonts.js:1061 — constructor has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · readBlock (cyclomatic 31) · ×1
  • readBlock (cyclomatic 31) src/core/flate_stream.js:287 — readBlock has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · printx (cyclomatic 30) · ×1
  • printx (cyclomatic 30) src/scripting_api/util.js:269 — printx has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · buildTextContentItem (cyclomatic 30) · ×1
  • buildTextContentItem (cyclomatic 30) src/core/evaluator.js:2950 — buildTextContentItem has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #getPageAdvance (cyclomatic 29) · ×1
  • #getPageAdvance (cyclomatic 29) web/pdf_viewer.js:2438 — #getPageAdvance has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · reset (cyclomatic 29) · ×1
  • reset (cyclomatic 29) web/pdf_page_view.js:634 — reset has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #renderCard (cyclomatic 29) · ×1
  • #renderCard (cyclomatic 29) web/digital_signature_properties_manager.js:428 — #renderCard has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · render (cyclomatic 29) · ×1
  • render (cyclomatic 29) src/display/annotation_layer.js:1490 — render has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · makeFilter (cyclomatic 29) · ×1
  • makeFilter (cyclomatic 29) src/core/parser.js:846 — makeFilter has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · createOS2Table (cyclomatic 29) · ×1
  • createOS2Table (cyclomatic 29) src/core/fonts.js:800 — createOS2Table has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _simpleFontToUnicode (cyclomatic 29) · ×1
  • _simpleFontToUnicode (cyclomatic 29) src/core/evaluator.js:3815 — _simpleFontToUnicode has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · dispatch (cyclomatic 28) · ×1
  • dispatch (cyclomatic 28) src/scripting_api/event.js:83 — dispatch has cyclomatic complexity 28 (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.
D1 · Cyclomatic Complexity · _binaryToExpr (cyclomatic 28) · ×1
  • _binaryToExpr (cyclomatic 28) src/core/internal_viewer_utils.js:149 — _binaryToExpr has cyclomatic complexity 28 (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.
D1 · Cyclomatic Complexity · pruneCompositeGlyphCycles (cyclomatic 28) · ×1
  • pruneCompositeGlyphCycles (cyclomatic 28) src/core/glyf.js:695 — pruneCompositeGlyphCycles has cyclomatic complexity 28 (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.
D1 · Cyclomatic Complexity · createCmapTable (cyclomatic 28) · ×1
  • createCmapTable (cyclomatic 28) src/core/fonts.js:590 — createCmapTable has cyclomatic complexity 28 (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.
D1 · Cyclomatic Complexity · nodeToSerializable (cyclomatic 27) · ×1
  • nodeToSerializable (cyclomatic 27) src/core/struct_tree.js:1030 — nodeToSerializable 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.
D1 · Cyclomatic Complexity · getOperatorList (cyclomatic 27) · ×1
  • getOperatorList (cyclomatic 27) src/core/document.js:471 — getOperatorList 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.
D1 · Cyclomatic Complexity · tableAttributes (cyclomatic 26) · ×1
  • tableAttributes (cyclomatic 26) src/core/struct_tree.js:693 — tableAttributes has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · fillGrayBuffer (cyclomatic 26) · ×1
  • fillGrayBuffer (cyclomatic 26) src/core/image.js:1000 — fillGrayBuffer has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · parseXml (cyclomatic 25) · ×1
  • parseXml (cyclomatic 25) src/core/xml_parser.js:174 — parseXml has cyclomatic complexity 25 (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.
D1 · Cyclomatic Complexity · setAttributes (cyclomatic 24) · ×1
  • setAttributes (cyclomatic 24) src/display/xfa_layer.js:222 — setAttributes has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · isVisible (cyclomatic 24) · ×1
  • isVisible (cyclomatic 24) src/display/optional_content_config.js:186 — isVisible has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · paintChar (cyclomatic 24) · ×1
  • paintChar (cyclomatic 24) src/display/canvas.js:2497 — paintChar has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getNumber (cyclomatic 24) · ×1
  • getNumber (cyclomatic 24) src/core/parser.js:995 — getNumber has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · sanitizeGlyph (cyclomatic 24) · ×1
  • sanitizeGlyph (cyclomatic 24) src/core/fonts.js:1986 — sanitizeGlyph has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · loadFont (cyclomatic 24) · ×1
  • loadFont (cyclomatic 24) src/core/evaluator.js:1250 — loadFont has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · constructor (cyclomatic 23) · ×1
  • constructor (cyclomatic 23) web/pdf_page_view.js:183 — constructor has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · onWheel (cyclomatic 23) · ×1
  • onWheel (cyclomatic 23) web/app.js:2992 — onWheel has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · toDateObject (cyclomatic 23) · ×1
  • toDateObject (cyclomatic 23) src/display/display_utils.js:294 — toDateObject has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _createContainer (cyclomatic 23) · ×1
  • _createContainer (cyclomatic 23) src/display/annotation_layer.js:400 — _createContainer has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · compileFontInfo (cyclomatic 23) · ×1
  • compileFontInfo (cyclomatic 23) src/core/obj_bin_transform_core.js:101 — compileFontInfo has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _charToGlyph (cyclomatic 23) · ×1
  • _charToGlyph (cyclomatic 23) src/core/fonts.js:3552 — _charToGlyph has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · normalizeBlendMode (cyclomatic 23) · ×1
  • normalizeBlendMode (cyclomatic 23) src/core/evaluator.js:130 — normalizeBlendMode has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #collectFieldObjects (cyclomatic 23) · ×1
  • #collectFieldObjects (cyclomatic 23) src/core/document.js:1851 — #collectFieldObjects has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #parseSignatureDict (cyclomatic 23) · ×1
  • #parseSignatureDict (cyclomatic 23) src/core/document.js:2083 — #parseSignatureDict has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · onPagesEdited (cyclomatic 22) · ×1
  • onPagesEdited (cyclomatic 22) web/pdf_viewer.js:1228 — onPagesEdited has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _isValidExplicitDest (cyclomatic 22) · ×1
  • _isValidExplicitDest (cyclomatic 22) src/shared/util.js:1081 — _isValidExplicitDest has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · constructor (cyclomatic 22) · ×1
  • constructor (cyclomatic 22) src/scripting_api/doc.js:39 — constructor has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · executeOperatorList (cyclomatic 22) · ×1
  • executeOperatorList (cyclomatic 22) src/display/canvas.js:662 — executeOperatorList has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _createMaskCanvas (cyclomatic 22) · ×1
  • _createMaskCanvas (cyclomatic 22) src/display/canvas.js:938 — _createMaskCanvas has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · addNode (cyclomatic 22) · ×1
  • addNode (cyclomatic 22) src/core/struct_tree.js:951 — addNode has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · readBlockPng (cyclomatic 22) · ×1
  • readBlockPng (cyclomatic 22) src/core/predictor_stream.js:137 — readBlockPng has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getObj (cyclomatic 22) · ×1
  • getObj (cyclomatic 22) src/core/parser.js:121 — getObj has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getFontSubstitution (cyclomatic 22) · ×1
  • getFontSubstitution (cyclomatic 22) src/core/font_substitutions.js:714 — getFontSubstitution has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · read (cyclomatic 22) · ×1
  • read (cyclomatic 22) src/core/evaluator.js:5384 — read has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · documentInfo (cyclomatic 22) · ×1
  • documentInfo (cyclomatic 22) src/core/document.js:1535 — documentInfo has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · toJSObject (cyclomatic 22) · ×1
  • toJSObject (cyclomatic 22) src/core/document.js:2301 — toJSObject has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getNormalizeWithNFKC (cyclomatic 21) · ×1
  • getNormalizeWithNFKC (cyclomatic 21) web/pdf_find_utils.js:61 — getNormalizeWithNFKC has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _parseHashParams (cyclomatic 21) · ×1
  • _parseHashParams (cyclomatic 21) web/app.js:284 — _parseHashParams has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · show (cyclomatic 21) · ×1
  • show (cyclomatic 21) web/internal/draw_ops_view.js:221 — show has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · render (cyclomatic 21) · ×1
  • render (cyclomatic 21) src/display/xfa_layer.js:318 — render has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · onclick (cyclomatic 21) · ×1
  • onclick (cyclomatic 21) src/display/annotation_layer.js:1207 — onclick has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · stringToPDFString (cyclomatic 21) · ×1
  • stringToPDFString (cyclomatic 21) src/core/string_utils.js:66 — stringToPDFString has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · makeInlineImage (cyclomatic 21) · ×1
  • makeInlineImage (cyclomatic 21) src/core/parser.js:537 — makeInlineImage has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · buildFormXObject (cyclomatic 21) · ×1
  • buildFormXObject (cyclomatic 21) src/core/evaluator.js:469 — buildFormXObject has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #findClosestThumbnail (cyclomatic 20) · ×1
  • #findClosestThumbnail (cyclomatic 20) web/pdf_thumbnail_viewer.js:1874 — #findClosestThumbnail has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getHighestPriority (cyclomatic 20) · ×1
  • getHighestPriority (cyclomatic 20) web/pdf_rendering_queue.js:112 — getHighestPriority has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #onPagesEdited (cyclomatic 20) · ×1
  • #onPagesEdited (cyclomatic 20) web/pdf_find_controller.js:1098 — #onPagesEdited has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _initializeMetadata (cyclomatic 20) · ×1
  • _initializeMetadata (cyclomatic 20) web/app.js:1896 — _initializeMetadata has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #processStreamMessage (cyclomatic 20) · ×1
  • #processStreamMessage (cyclomatic 20) src/shared/message_handler.js:393 — #processStreamMessage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · readXRefTable (cyclomatic 20) · ×1
  • readXRefTable (cyclomatic 20) src/core/xref.js:230 — readXRefTable has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · fetchCompressed (cyclomatic 20) · ×1
  • fetchCompressed (cyclomatic 20) src/core/xref.js:957 — fetchCompressed has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · writeStream (cyclomatic 20) · ×1
  • writeStream (cyclomatic 20) src/core/writer.js:54 — writeStream has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · sanitizeGlyphLocations (cyclomatic 20) · ×1
  • sanitizeGlyphLocations (cyclomatic 20) src/core/fonts.js:2166 — sanitizeGlyphLocations has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · switchView (cyclomatic 19) · ×1
  • switchView (cyclomatic 19) web/views_manager.js:229 — switchView has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #setAttributes (cyclomatic 19) · ×1
  • #setAttributes (cyclomatic 19) web/struct_tree_layer_builder.js:351 — #setAttributes has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #setScaleUpdatePages (cyclomatic 19) · ×1
  • #setScaleUpdatePages (cyclomatic 19) web/pdf_viewer.js:1568 — #setScaleUpdatePages has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · cancelRendering (cyclomatic 19) · ×1
  • cancelRendering (cyclomatic 19) web/pdf_page_view.js:918 — cancelRendering has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · moveCaret (cyclomatic 19) · ×1
  • moveCaret (cyclomatic 19) web/caret_browsing.js:261 — moveCaret has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · parse (cyclomatic 19) · ×1
  • parse (cyclomatic 19) src/core/struct_tree.js:901 — parse has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · createNameTable (cyclomatic 19) · ×1
  • createNameTable (cyclomatic 19) src/core/fonts.js:954 — createNameTable has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · draw (cyclomatic 18) · ×1
  • draw (cyclomatic 18) web/pdf_page_view.js:1060 — draw has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · initSandbox (cyclomatic 18) · ×1
  • initSandbox (cyclomatic 18) src/scripting_api/initialization.js:41 — initSandbox has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · #appendText (cyclomatic 18) · ×1
  • #appendText (cyclomatic 18) src/display/text_layer.js:322 — #appendText has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 18) · ×1
  • (anonymous) (cyclomatic 18) src/display/api.js:2809 — (anonymous) has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · readXRefStream (cyclomatic 18) · ×1
  • readXRefStream (cyclomatic 18) src/core/xref.js:347 — readXRefStream has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · constructor (cyclomatic 18) · ×1
  • constructor (cyclomatic 18) src/core/pattern.js:151 — constructor has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · getVisibleElements (cyclomatic 17) · ×1
  • getVisibleElements (cyclomatic 17) web/ui_utils.js:437 — getVisibleElements has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · push (cyclomatic 17) · ×1
  • push (cyclomatic 17) web/pdf_history.js:193 — push has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · toggle (cyclomatic 17) · ×1
  • toggle (cyclomatic 17) web/comment_manager.js:1093 — toggle has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · initialize (cyclomatic 17) · ×1
  • initialize (cyclomatic 17) web/app.js:202 — initialize has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · run (cyclomatic 17) · ×1
  • run (cyclomatic 17) web/app.js:882 — run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #renderValue (cyclomatic 17) · ×1
  • #renderValue (cyclomatic 17) web/internal/tree_view.js:640 — #renderValue has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · formatArg (cyclomatic 17) · ×1
  • formatArg (cyclomatic 17) web/internal/draw_ops_view.js:169 — formatArg has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AFNumber_Format (cyclomatic 17) · ×1
  • AFNumber_Format (cyclomatic 17) src/scripting_api/aform.js:106 — AFNumber_Format has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · setupStorage (cyclomatic 17) · ×1
  • setupStorage (cyclomatic 17) src/display/xfa_layer.js:151 — setupStorage has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · recordCharacterBBox (cyclomatic 17) · ×1
  • recordCharacterBBox (cyclomatic 17) src/display/canvas_dependency_tracker.js:628 — recordCharacterBBox has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · setGState (cyclomatic 17) · ×1
  • setGState (cyclomatic 17) src/display/canvas.js:1145 — setGState has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · endGroup (cyclomatic 17) · ×1
  • endGroup (cyclomatic 17) src/display/canvas.js:3460 — endGroup has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · render (cyclomatic 17) · ×1
  • render (cyclomatic 17) src/display/annotation_layer.js:4032 — render has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · readXRef (cyclomatic 17) · ×1
  • readXRef (cyclomatic 17) src/core/xref.js:732 — readXRef has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · searchNode (cyclomatic 17) · ×1
  • searchNode (cyclomatic 17) src/core/xml_parser.js:353 — searchNode 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.
D1 · Cyclomatic Complexity · canUpdateStructTree (cyclomatic 17) · ×1
  • canUpdateStructTree (cyclomatic 17) src/core/struct_tree.js:211 — canUpdateStructTree has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · write (cyclomatic 17) · ×1
  • write (cyclomatic 17) src/core/glyf.js:404 — write has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _renderMatches (cyclomatic 16) · ×1
  • _renderMatches (cyclomatic 16) web/text_highlighter.js:156 — _renderMatches has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #touchSwipe (cyclomatic 16) · ×1
  • #touchSwipe (cyclomatic 16) web/pdf_presentation_mode.js:299 — #touchSwipe has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · update (cyclomatic 16) · ×1
  • update (cyclomatic 16) web/pdf_page_view.js:770 — update has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · cssTransform (cyclomatic 16) · ×1
  • cssTransform (cyclomatic 16) web/pdf_page_view.js:969 — cssTransform has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 16) · ×1
  • (anonymous) (cyclomatic 16) web/app.js:1661 — (anonymous) has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _prepareSMaskCanvas (cyclomatic 16) · ×1
  • _prepareSMaskCanvas (cyclomatic 16) src/display/canvas.js:1246 — _prepareSMaskCanvas has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · extractPages (cyclomatic 16) · ×1
  • extractPages (cyclomatic 16) src/display/api.js:2969 — extractPages has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · render (cyclomatic 16) · ×1
  • render (cyclomatic 16) src/display/annotation_layer.js:985 — render has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #setAnnotationCanvasMap (cyclomatic 16) · ×1
  • #setAnnotationCanvasMap (cyclomatic 16) src/display/annotation_layer.js:4288 — #setAnnotationCanvasMap has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _parseContent (cyclomatic 16) · ×1
  • _parseContent (cyclomatic 16) src/core/xml_parser.js:80 — _parseContent 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.
D1 · Cyclomatic Complexity · getSoundFormat (cyclomatic 16) · ×1
  • getSoundFormat (cyclomatic 16) src/core/sound.js:45 — getSoundFormat has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · readBlockTiff (cyclomatic 16) · ×1
  • readBlockTiff (cyclomatic 16) src/core/predictor_stream.js:51 — readBlockTiff has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · #intersects (cyclomatic 16) · ×1
  • #intersects (cyclomatic 16) src/core/intersector.js:65 — #intersects has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · type1FontGlyphMapping (cyclomatic 16) · ×1
  • type1FontGlyphMapping (cyclomatic 16) src/core/fonts_utils.js:111 — type1FontGlyphMapping has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · generateFont (cyclomatic 16) · ×1
  • generateFont (cyclomatic 16) src/core/font_substitutions.js:634 — generateFont has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D2 · Cognitive Complexity · promiseBody (cognitive 191) · ×1
  • promiseBody (cognitive 191) src/core/evaluator.js:1730 — promiseBody has cognitive complexity 191 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · checkAndRepair (cognitive 163) · ×1
  • checkAndRepair (cognitive 163) src/core/fonts.js:1423 — checkAndRepair has cognitive complexity 163 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onKeyDown (cognitive 142) · ×1
  • onKeyDown (cognitive 142) web/app.js:3145 — onKeyDown has cognitive complexity 142 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sanitizeTTProgram (cognitive 125) · ×1
  • sanitizeTTProgram (cognitive 125) src/core/fonts.js:2468 — sanitizeTTProgram has cognitive complexity 125 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parse (cognitive 119) · ×1
  • parse (cognitive 119) src/core/font_renderer.js:382 — parse has cognitive complexity 119 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #selectionChange (cognitive 114) · ×1
  • #selectionChange (cognitive 114) src/display/draw_layer.js:385 — #selectionChange has cognitive complexity 114 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · preEvaluateFont (cognitive 112) · ×1
  • preEvaluateFont (cognitive 112) src/core/evaluator.js:4288 — preEvaluateFont has cognitive complexity 112 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · indexObjects (cognitive 108) · ×1
  • indexObjects (cognitive 108) src/core/xref.js:429 — indexObjects has cognitive complexity 108 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractWidths (cognitive 108) · ×1
  • extractWidths (cognitive 108) src/core/evaluator.js:4096 — extractWidths has cognitive complexity 108 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readCmapTable (cognitive 101) · ×1
  • readCmapTable (cognitive 101) src/core/fonts.js:1607 — readCmapTable has cognitive complexity 101 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createImageData (cognitive 93) · ×1
  • createImageData (cognitive 93) src/core/image.js:715 — createImageData has cognitive complexity 93 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · translateFont (cognitive 92) · ×1
  • translateFont (cognitive 92) src/core/evaluator.js:4451 — translateFont has cognitive complexity 92 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hasBlendModes (cognitive 90) · ×1
  • hasBlendModes (cognitive 90) src/core/evaluator.js:279 — hasBlendModes has cognitive complexity 90 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 86) · ×1
  • constructor (cognitive 86) src/core/image.js:80 — constructor has cognitive complexity 86 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert (cognitive 85) · ×1
  • convert (cognitive 85) src/core/type1_parser.js:92 — convert has cognitive complexity 85 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · promiseBody (cognitive 83) · ×1
  • promiseBody (cognitive 83) src/core/evaluator.js:3191 — promiseBody has cognitive complexity 83 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compileType3Glyph (cognitive 78) · ×1
  • compileType3Glyph (cognitive 78) src/core/fonts_utils.js:212 — compileType3Glyph has cognitive complexity 78 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _initializeViewerComponents (cognitive 75) · ×1
  • _initializeViewerComponents (cognitive 75) web/app.js:414 — _initializeViewerComponents has cognitive complexity 75 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseXml (cognitive 75) · ×1
  • parseXml (cognitive 75) src/core/xml_parser.js:174 — parseXml has cognitive complexity 75 (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.
D2 · Cognitive Complexity · showText (cognitive 72) · ×1
  • showText (cognitive 72) src/display/canvas.js:2654 — showText has cognitive complexity 72 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · findDefaultInlineStreamEnd (cognitive 71) · ×1
  • findDefaultInlineStreamEnd (cognitive 71) src/core/parser.js:202 — findDefaultInlineStreamEnd has cognitive complexity 71 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractCidKeyedFontProgram (cognitive 68) · ×1
  • extractCidKeyedFontProgram (cognitive 68) src/core/type1_parser.js:749 — extractCidKeyedFontProgram has cognitive complexity 68 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildPaintImageXObject (cognitive 66) · ×1
  • buildPaintImageXObject (cognitive 66) src/core/evaluator.js:605 — buildPaintImageXObject has cognitive complexity 66 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #getPageAdvance (cognitive 64) · ×1
  • #getPageAdvance (cognitive 64) web/pdf_viewer.js:2438 — #getPageAdvance has cognitive complexity 64 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · read (cognitive 63) · ×1
  • read (cognitive 63) src/core/evaluator.js:5384 — read has cognitive complexity 63 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractDataStructures (cognitive 62) · ×1
  • extractDataStructures (cognitive 62) src/core/evaluator.js:3609 — extractDataStructures has cognitive complexity 62 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setHash (cognitive 60) · ×1
  • setHash (cognitive 60) web/pdf_link_service.js:360 — setHash has cognitive complexity 60 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractFontProgram (cognitive 60) · ×1
  • extractFontProgram (cognitive 60) src/core/type1_parser.js:555 — extractFontProgram has cognitive complexity 60 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #walk (cognitive 59) · ×1
  • #walk (cognitive 59) web/struct_tree_layer_builder.js:534 — #walk has cognitive complexity 59 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compareWithLastPosition (cognitive 59) · ×1
  • compareWithLastPosition (cognitive 59) src/core/evaluator.js:2723 — compareWithLastPosition has cognitive complexity 59 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · isVisible (cognitive 58) · ×1
  • isVisible (cognitive 58) src/display/optional_content_config.js:186 — isVisible has cognitive complexity 58 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compileGlyf (cognitive 58) · ×1
  • compileGlyf (cognitive 58) src/core/font_renderer.js:163 — compileGlyf has cognitive complexity 58 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildTextContentItem (cognitive 58) · ×1
  • buildTextContentItem (cognitive 58) src/core/evaluator.js:2950 — buildTextContentItem has cognitive complexity 58 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readBlock (cognitive 56) · ×1
  • readBlock (cognitive 56) src/core/flate_stream.js:287 — readBlock has cognitive complexity 56 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pruneCompositeGlyphCycles (cognitive 54) · ×1
  • pruneCompositeGlyphCycles (cognitive 54) src/core/glyf.js:695 — pruneCompositeGlyphCycles has cognitive complexity 54 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 52) · ×1
  • (anonymous) (cognitive 52) src/scripting_api/util.js:82 — (anonymous) has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · render (cognitive 52) · ×1
  • render (cognitive 52) src/display/annotation_layer.js:1490 — render has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fillGrayBuffer (cognitive 52) · ×1
  • fillGrayBuffer (cognitive 52) src/core/image.js:1000 — fillGrayBuffer has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 51) · ×1
  • (anonymous) (cognitive 51) src/core/worker.js:592 — (anonymous) has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fallbackToSystemFont (cognitive 51) · ×1
  • fallbackToSystemFont (cognitive 51) src/core/fonts.js:1257 — fallbackToSystemFont has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 50) · ×1
  • constructor (cognitive 50) web/pdf_viewer.js:310 — constructor has cognitive complexity 50 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 50) · ×1
  • (anonymous) (cognitive 50) src/core/worker.js:688 — (anonymous) has cognitive complexity 50 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableAttributes (cognitive 50) · ×1
  • tableAttributes (cognitive 50) src/core/struct_tree.js:693 — tableAttributes has cognitive complexity 50 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · executeOperatorList (cognitive 49) · ×1
  • executeOperatorList (cognitive 49) src/display/canvas.js:662 — executeOperatorList has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getObj (cognitive 47) · ×1
  • getObj (cognitive 47) src/core/parser.js:121 — getObj has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _simpleFontToUnicode (cognitive 47) · ×1
  • _simpleFontToUnicode (cognitive 47) src/core/evaluator.js:3815 — _simpleFontToUnicode has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getOperatorList (cognitive 47) · ×1
  • getOperatorList (cognitive 47) src/core/document.js:471 — getOperatorList has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getDocument (cognitive 45) · ×1
  • getDocument (cognitive 45) src/display/api.js:234 — getDocument has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 44) · ×1
  • (anonymous) (cognitive 44) web/text_layer_builder.js:272 — (anonymous) has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createCmapTable (cognitive 43) · ×1
  • createCmapTable (cognitive 43) src/core/fonts.js:590 — createCmapTable has cognitive complexity 43 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getNormalizeWithNFKC (cognitive 42) · ×1
  • getNormalizeWithNFKC (cognitive 42) web/pdf_find_utils.js:61 — getNormalizeWithNFKC has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #findStreamLength (cognitive 42) · ×1
  • #findStreamLength (cognitive 42) src/core/parser.js:662 — #findStreamLength has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · printx (cognitive 41) · ×1
  • printx (cognitive 41) src/scripting_api/util.js:269 — printx has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onPagesEdited (cognitive 38) · ×1
  • onPagesEdited (cognitive 38) web/pdf_viewer.js:1228 — onPagesEdited has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · searchNode (cognitive 38) · ×1
  • searchNode (cognitive 38) src/core/xml_parser.js:353 — searchNode has cognitive complexity 38 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · dispatch (cognitive 37) · ×1
  • dispatch (cognitive 37) src/scripting_api/event.js:83 — dispatch has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setAttributes (cognitive 37) · ×1
  • setAttributes (cognitive 37) src/display/xfa_layer.js:222 — setAttributes has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #walk (cognitive 37) · ×1
  • #walk (cognitive 37) src/core/object_loader.js:81 — #walk has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · write (cognitive 37) · ×1
  • write (cognitive 37) src/core/glyf.js:404 — write has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scrollPageIntoView (cognitive 36) · ×1
  • scrollPageIntoView (cognitive 36) web/pdf_viewer.js:1795 — scrollPageIntoView has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · beginGroup (cognitive 36) · ×1
  • beginGroup (cognitive 36) src/display/canvas.js:3196 — beginGroup has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readXRefStream (cognitive 36) · ×1
  • readXRefStream (cognitive 36) src/core/xref.js:347 — readXRefStream has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 35) · ×1
  • (anonymous) (cognitive 35) web/internal/tree_view.js:122 — (anonymous) has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createOS2Table (cognitive 35) · ×1
  • createOS2Table (cognitive 35) src/core/fonts.js:800 — createOS2Table has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loadFont (cognitive 35) · ×1
  • loadFont (cognitive 35) src/core/evaluator.js:1250 — loadFont has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readBlockPng (cognitive 34) · ×1
  • readBlockPng (cognitive 34) src/core/predictor_stream.js:137 — readBlockPng has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · toJSObject (cognitive 34) · ×1
  • toJSObject (cognitive 34) src/core/document.js:2301 — toJSObject has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #renderCard (cognitive 33) · ×1
  • #renderCard (cognitive 33) web/digital_signature_properties_manager.js:428 — #renderCard has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #setAnnotationCanvasMap (cognitive 33) · ×1
  • #setAnnotationCanvasMap (cognitive 33) src/display/annotation_layer.js:4288 — #setAnnotationCanvasMap has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stringToPDFString (cognitive 33) · ×1
  • stringToPDFString (cognitive 33) src/core/string_utils.js:66 — stringToPDFString has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getHighestPriority (cognitive 32) · ×1
  • getHighestPriority (cognitive 32) web/pdf_rendering_queue.js:112 — getHighestPriority has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getScaleForStroking (cognitive 32) · ×1
  • getScaleForStroking (cognitive 32) src/display/canvas.js:4247 — getScaleForStroking has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractPages (cognitive 32) · ×1
  • extractPages (cognitive 32) src/display/api.js:2969 — extractPages has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nodeToSerializable (cognitive 32) · ×1
  • nodeToSerializable (cognitive 32) src/core/struct_tree.js:1030 — nodeToSerializable has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getNumber (cognitive 32) · ×1
  • getNumber (cognitive 32) src/core/parser.js:995 — getNumber has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getObj (cognitive 32) · ×1
  • getObj (cognitive 32) src/core/parser.js:1278 — getObj has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compileFontInfo (cognitive 32) · ×1
  • compileFontInfo (cognitive 32) src/core/obj_bin_transform_core.js:101 — compileFontInfo has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getAll (cognitive 32) · ×1
  • getAll (cognitive 32) src/core/name_number_tree.js:37 — getAll has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · type1FontGlyphMapping (cognitive 32) · ×1
  • type1FontGlyphMapping (cognitive 32) src/core/fonts_utils.js:111 — type1FontGlyphMapping has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · adjustMapping (cognitive 32) · ×1
  • adjustMapping (cognitive 32) src/core/fonts.js:465 — adjustMapping has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 32) · ×1
  • constructor (cognitive 32) src/core/fonts.js:1061 — constructor has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _getPageNumberToDestHash (cognitive 31) · ×1
  • _getPageNumberToDestHash (cognitive 31) web/pdf_outline_viewer.js:334 — _getPageNumberToDestHash has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · moveCaret (cognitive 31) · ×1
  • moveCaret (cognitive 31) web/caret_browsing.js:261 — moveCaret has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readTrueTypeCollectionData (cognitive 31) · ×1
  • readTrueTypeCollectionData (cognitive 31) src/core/fonts.js:1544 — readTrueTypeCollectionData has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #collectFieldObjects (cognitive 31) · ×1
  • #collectFieldObjects (cognitive 31) src/core/document.js:1851 — #collectFieldObjects has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · initSandbox (cognitive 30) · ×1
  • initSandbox (cognitive 30) src/scripting_api/initialization.js:41 — initSandbox has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setupStorage (cognitive 30) · ×1
  • setupStorage (cognitive 30) src/display/xfa_layer.js:151 — setupStorage has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · paintChar (cognitive 30) · ×1
  • paintChar (cognitive 30) src/display/canvas.js:2497 — paintChar has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · writeStream (cognitive 30) · ×1
  • writeStream (cognitive 30) src/core/writer.js:54 — writeStream has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readBlock (cognitive 30) · ×1
  • readBlock (cognitive 30) src/core/lzw_stream.js:62 — readBlock has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sanitizeGlyphLocations (cognitive 30) · ×1
  • sanitizeGlyphLocations (cognitive 30) src/core/fonts.js:2166 — sanitizeGlyphLocations has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getPattern (cognitive 29) · ×1
  • getPattern (cognitive 29) src/display/pattern_helper.js:175 — getPattern has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readXRefTable (cognitive 29) · ×1
  • readXRefTable (cognitive 29) src/core/xref.js:230 — readXRefTable has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readXRef (cognitive 29) · ×1
  • readXRef (cognitive 29) src/core/xref.js:732 — readXRef has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parse (cognitive 29) · ×1
  • parse (cognitive 29) src/core/struct_tree.js:901 — parse has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getString (cognitive 29) · ×1
  • getString (cognitive 29) src/core/parser.js:1071 — getString has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sanitizeGlyph (cognitive 29) · ×1
  • sanitizeGlyph (cognitive 29) src/core/fonts.js:1986 — sanitizeGlyph has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _charToGlyph (cognitive 29) · ×1
  • _charToGlyph (cognitive 29) src/core/fonts.js:3552 — _charToGlyph has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildFormXObject (cognitive 29) · ×1
  • buildFormXObject (cognitive 29) src/core/evaluator.js:469 — buildFormXObject has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #setAttributes (cognitive 28) · ×1
  • #setAttributes (cognitive 28) web/struct_tree_layer_builder.js:351 — #setAttributes has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #updateFromSandbox (cognitive 28) · ×1
  • #updateFromSandbox (cognitive 28) web/pdf_scripting_manager.js:297 — #updateFromSandbox has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · reset (cognitive 28) · ×1
  • reset (cognitive 28) web/pdf_page_view.js:634 — reset has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · show (cognitive 28) · ×1
  • show (cognitive 28) web/internal/draw_ops_view.js:221 — show has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · endGroup (cognitive 28) · ×1
  • endGroup (cognitive 28) src/display/canvas.js:3460 — endGroup has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onclick (cognitive 28) · ×1
  • onclick (cognitive 28) src/display/annotation_layer.js:1207 — onclick has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetchCompressed (cognitive 27) · ×1
  • fetchCompressed (cognitive 27) src/core/xref.js:957 — fetchCompressed has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · canUpdateStructTree (cognitive 27) · ×1
  • canUpdateStructTree (cognitive 27) src/core/struct_tree.js:211 — canUpdateStructTree has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #collectParents (cognitive 27) · ×1
  • #collectParents (cognitive 27) src/core/struct_tree.js:460 — #collectParents has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parse (cognitive 27) · ×1
  • parse (cognitive 27) src/core/glyf.js:270 — parse has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleColorN (cognitive 27) · ×1
  • handleColorN (cognitive 27) src/core/evaluator.js:1594 — handleColorN has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editorStats (cognitive 26) · ×1
  • editorStats (cognitive 26) src/display/annotation_storage.js:218 — editorStats has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractFontHeader (cognitive 26) · ×1
  • extractFontHeader (cognitive 26) src/core/type1_parser.js:1008 — extractFontHeader has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readBlockTiff (cognitive 26) · ×1
  • readBlockTiff (cognitive 26) src/core/predictor_stream.js:51 — readBlockTiff has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _renderMatches (cognitive 25) · ×1
  • _renderMatches (cognitive 25) web/text_highlighter.js:156 — _renderMatches has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 25) · ×1
  • constructor (cognitive 25) web/pdf_page_view.js:183 — constructor has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 25) · ×1
  • open (cognitive 25) web/comment_manager.js:719 — open has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _parseHashParams (cognitive 25) · ×1
  • _parseHashParams (cognitive 25) web/app.js:284 — _parseHashParams has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onWheel (cognitive 25) · ×1
  • onWheel (cognitive 25) web/app.js:2992 — onWheel has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drawTriangle (cognitive 25) · ×1
  • drawTriangle (cognitive 25) src/display/pattern_helper.js:270 — drawTriangle has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _createMaskCanvas (cognitive 25) · ×1
  • _createMaskCanvas (cognitive 25) src/display/canvas.js:938 — _createMaskCanvas has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseMarkedContentProps (cognitive 25) · ×1
  • parseMarkedContentProps (cognitive 25) src/core/evaluator_utils.js:83 — parseMarkedContentProps has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #replaceIdByRef (cognitive 25) · ×1
  • #replaceIdByRef (cognitive 25) src/core/document.js:327 — #replaceIdByRef has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · checkLastPage (cognitive 25) · ×1
  • checkLastPage (cognitive 25) src/core/document.js:1750 — checkLastPage has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #render (cognitive 24) · ×1
  • #render (cognitive 24) web/internal/font_view.js:167 — #render has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _createContainer (cognitive 24) · ×1
  • _createContainer (cognitive 24) src/display/annotation_layer.js:400 — _createContainer has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getFontSubstitution (cognitive 24) · ×1
  • getFontSubstitution (cognitive 24) src/core/font_substitutions.js:714 — getFontSubstitution has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · documentInfo (cognitive 24) · ×1
  • documentInfo (cognitive 24) src/core/document.js:1535 — documentInfo has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateTextLayer (cognitive 23) · ×1
  • updateTextLayer (cognitive 23) web/struct_tree_layer_builder.js:477 — updateTextLayer has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #setScaleUpdatePages (cognitive 23) · ×1
  • #setScaleUpdatePages (cognitive 23) web/pdf_viewer.js:1568 — #setScaleUpdatePages has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #setCaretPositionHelper (cognitive 23) · ×1
  • #setCaretPositionHelper (cognitive 23) web/caret_browsing.js:130 — #setCaretPositionHelper has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #processStreamMessage (cognitive 23) · ×1
  • #processStreamMessage (cognitive 23) src/shared/message_handler.js:393 — #processStreamMessage has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getRaw (cognitive 23) · ×1
  • getRaw (cognitive 23) src/core/name_number_tree.js:84 — getRaw has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _encodeBMP (cognitive 23) · ×1
  • _encodeBMP (cognitive 23) src/core/image_resizer.js:389 — _encodeBMP has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getComponents (cognitive 23) · ×1
  • getComponents (cognitive 23) src/core/image.js:525 — getComponents has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · encodeString (cognitive 23) · ×1
  • encodeString (cognitive 23) src/core/fonts.js:3729 — encodeString has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · formatArg (cognitive 22) · ×1
  • formatArg (cognitive 22) web/internal/draw_ops_view.js:169 — formatArg has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · toDateObject (cognitive 22) · ×1
  • toDateObject (cognitive 22) src/display/display_utils.js:294 — toDateObject has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · commentButtonPosition (cognitive 22) · ×1
  • commentButtonPosition (cognitive 22) src/display/annotation_layer.js:243 — commentButtonPosition has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _getElementsByName (cognitive 22) · ×1
  • _getElementsByName (cognitive 22) src/display/annotation_layer.js:802 — _getElementsByName has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getName (cognitive 22) · ×1
  • getName (cognitive 22) src/core/parser.js:1171 — getName has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #onPagesEdited (cognitive 21) · ×1
  • #onPagesEdited (cognitive 21) web/pdf_find_controller.js:1098 — #onPagesEdited has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runCalculate (cognitive 21) · ×1
  • runCalculate (cognitive 21) src/scripting_api/event.js:316 — runCalculate has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 21) · ×1
  • constructor (cognitive 21) src/scripting_api/doc.js:39 — constructor has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #writeKids (cognitive 21) · ×1
  • #writeKids (cognitive 21) src/core/struct_tree.js:344 — #writeKids has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · merge (cognitive 21) · ×1
  • merge (cognitive 21) src/core/primitives.js:236 — merge has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startXRef (cognitive 21) · ×1
  • startXRef (cognitive 21) src/core/document.js:1073 — startXRef has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getVisibleElements (cognitive 20) · ×1
  • getVisibleElements (cognitive 20) web/ui_utils.js:437 — getVisibleElements has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #findClosestThumbnail (cognitive 20) · ×1
  • #findClosestThumbnail (cognitive 20) web/pdf_thumbnail_viewer.js:1874 — #findClosestThumbnail has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cssTransform (cognitive 20) · ×1
  • cssTransform (cognitive 20) web/pdf_page_view.js:969 — cssTransform has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run (cognitive 20) · ×1
  • run (cognitive 20) web/app.js:882 — run has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · deleteItemAt (cognitive 20) · ×1
  • deleteItemAt (cognitive 20) src/scripting_api/field.js:363 — deleteItemAt has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _getField (cognitive 20) · ×1
  • _getField (cognitive 20) src/scripting_api/doc.js:926 — _getField has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resetForm (cognitive 20) · ×1
  • resetForm (cognitive 20) src/scripting_api/doc.js:1230 — resetForm has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #AFSpecial_KeystrokeEx_helper (cognitive 20) · ×1
  • #AFSpecial_KeystrokeEx_helper (cognitive 20) src/scripting_api/aform.js:451 — #AFSpecial_KeystrokeEx_helper has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #appendText (cognitive 20) · ×1
  • #appendText (cognitive 20) src/display/text_layer.js:322 — #appendText has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getPdfFilenameFromUrl (cognitive 20) · ×1
  • getPdfFilenameFromUrl (cognitive 20) src/display/display_utils.js:123 — getPdfFilenameFromUrl has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parse (cognitive 20) · ×1
  • parse (cognitive 20) src/core/xref.js:119 — parse has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getFontFileType (cognitive 20) · ×1
  • getFontFileType (cognitive 20) src/core/fonts.js:357 — getFontFileType has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createNameTable (cognitive 20) · ×1
  • createNameTable (cognitive 20) src/core/fonts.js:954 — createNameTable has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readPostScriptTable (cognitive 20) · ×1
  • readPostScriptTable (cognitive 20) src/core/fonts.js:2331 — readPostScriptTable has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · find (cognitive 20) · ×1
  • find (cognitive 20) src/core/document.js:952 — find has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #collectSignatureFields (cognitive 20) · ×1
  • #collectSignatureFields (cognitive 20) src/core/document.js:2001 — #collectSignatureFields has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · switchView (cognitive 19) · ×1
  • switchView (cognitive 19) web/views_manager.js:229 — switchView has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 19) · ×1
  • constructor (cognitive 19) web/pdf_thumbnail_viewer.js:183 — constructor has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · update (cognitive 19) · ×1
  • update (cognitive 19) web/pdf_page_view.js:770 — update has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cancelRendering (cognitive 19) · ×1
  • cancelRendering (cognitive 19) web/pdf_page_view.js:918 — cancelRendering has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · draw (cognitive 19) · ×1
  • draw (cognitive 19) web/pdf_page_view.js:1060 — draw has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dispatch (cognitive 19) · ×1
  • dispatch (cognitive 19) web/event_utils.js:176 — dispatch has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 19) · ×1
  • (anonymous) (cognitive 19) web/base_pdf_page_view.js:124 — (anonymous) has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #makeImageArgPreview (cognitive 19) · ×1
  • #makeImageArgPreview (cognitive 19) web/internal/draw_ops_view.js:379 — #makeImageArgPreview has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #buildLine (cognitive 19) · ×1
  • #buildLine (cognitive 19) web/internal/draw_ops_view.js:639 — #buildLine has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #processItems (cognitive 19) · ×1
  • #processItems (cognitive 19) src/display/text_layer.js:278 — #processItems has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createPatternCanvas (cognitive 19) · ×1
  • createPatternCanvas (cognitive 19) src/display/pattern_helper.js:712 — createPatternCanvas has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · putBinaryImageData (cognitive 19) · ×1
  • putBinaryImageData (cognitive 19) src/display/canvas.js:318 — putBinaryImageData has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fill (cognitive 19) · ×1
  • fill (cognitive 19) src/display/canvas.js:2189 — fill has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · addNode (cognitive 19) · ×1
  • addNode (cognitive 19) src/core/struct_tree.js:951 — addNode has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeInlineImage (cognitive 19) · ×1
  • makeInlineImage (cognitive 19) src/core/parser.js:537 — makeInlineImage has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readNameTable (cognitive 19) · ×1
  • readNameTable (cognitive 19) src/core/fonts.js:2397 — readNameTable has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert (cognitive 19) · ×1
  • convert (cognitive 19) src/core/fonts.js:3284 — convert has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseCmap (cognitive 19) · ×1
  • parseCmap (cognitive 19) src/core/font_renderer.js:47 — parseCmap has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #computeThumbnailsPosition (cognitive 18) · ×1
  • #computeThumbnailsPosition (cognitive 18) web/pdf_thumbnail_viewer.js:1313 — #computeThumbnailsPosition has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · push (cognitive 18) · ×1
  • push (cognitive 18) web/pdf_history.js:193 — push has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · toggle (cognitive 18) · ×1
  • toggle (cognitive 18) web/comment_manager.js:1093 — toggle has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #buildChildren (cognitive 18) · ×1
  • #buildChildren (cognitive 18) web/internal/tree_view.js:237 — #buildChildren has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #renderValue (cognitive 18) · ×1
  • #renderValue (cognitive 18) web/internal/tree_view.js:640 — #renderValue has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _isValidExplicitDest (cognitive 18) · ×1
  • _isValidExplicitDest (cognitive 18) src/shared/util.js:1081 — _isValidExplicitDest has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AFRange_Validate (cognitive 18) · ×1
  • AFRange_Validate (cognitive 18) src/scripting_api/aform.js:289 — AFRange_Validate has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · showType3Text (cognitive 18) · ×1
  • showType3Text (cognitive 18) src/display/canvas.js:2915 — showType3Text has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _abortOperatorList (cognitive 18) · ×1
  • _abortOperatorList (cognitive 18) src/display/api.js:1990 — _abortOperatorList has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetchUncompressed (cognitive 18) · ×1
  • fetchUncompressed (cognitive 18) src/core/xref.js:900 — fetchUncompressed has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #getValue (cognitive 18) · ×1
  • #getValue (cognitive 18) src/core/primitives.js:92 — #getValue has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 18) · ×1
  • constructor (cognitive 18) src/core/pattern.js:151 — constructor has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildMeshVertexData (cognitive 18) · ×1
  • buildMeshVertexData (cognitive 18) src/core/pattern.js:402 — buildMeshVertexData has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · findASCII85DecodeInlineStreamEnd (cognitive 18) · ×1
  • findASCII85DecodeInlineStreamEnd (cognitive 18) src/core/parser.js:445 — findASCII85DecodeInlineStreamEnd has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeFilter (cognitive 18) · ×1
  • makeFilter (cognitive 18) src/core/parser.js:846 — makeFilter has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · foundImageMaskGroup (cognitive 18) · ×1
  • foundImageMaskGroup (cognitive 18) src/core/operator_list.js:195 — foundImageMaskGroup has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _optimize (cognitive 18) · ×1
  • _optimize (cognitive 18) src/core/operator_list.js:581 — _optimize has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #rescaleImageData (cognitive 18) · ×1
  • #rescaleImageData (cognitive 18) src/core/image_resizer.js:304 — #rescaleImageData has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · write (cognitive 18) · ×1
  • write (cognitive 18) src/core/glyf.js:635 — write has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setGState (cognitive 18) · ×1
  • setGState (cognitive 18) src/core/evaluator.js:1115 — setGState has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #loadXfaFonts (cognitive 18) · ×1
  • #loadXfaFonts (cognitive 18) src/core/document.js:1330 — #loadXfaFonts has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #parseSignatureDict (cognitive 18) · ×1
  • #parseSignatureDict (cognitive 18) src/core/document.js:2083 — #parseSignatureDict has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #touchSwipe (cognitive 17) · ×1
  • #touchSwipe (cognitive 17) web/pdf_presentation_mode.js:299 — #touchSwipe has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalize (cognitive 17) · ×1
  • normalize (cognitive 17) web/pdf_find_controller.js:94 — normalize has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #nextMatch (cognitive 17) · ×1
  • #nextMatch (cognitive 17) web/pdf_find_controller.js:942 — #nextMatch has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · initialize (cognitive 17) · ×1
  • initialize (cognitive 17) web/app.js:202 — initialize has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 17) · ×1
  • (anonymous) (cognitive 17) web/app.js:1661 — (anonymous) has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #renderCanvas (cognitive 17) · ×1
  • #renderCanvas (cognitive 17) web/internal/page_view.js:678 — #renderCanvas has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · update (cognitive 17) · ×1
  • update (cognitive 17) src/shared/murmurhash3.js:31 — update has cognitive 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.
D2 · Cognitive Complexity · recordCharacterBBox (cognitive 17) · ×1
  • recordCharacterBBox (cognitive 17) src/display/canvas_dependency_tracker.js:628 — recordCharacterBBox has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #collectAttributes (cognitive 17) · ×1
  • #collectAttributes (cognitive 17) src/core/struct_tree.js:633 — #collectAttributes has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · soundStreamToWav (cognitive 17) · ×1
  • soundStreamToWav (cognitive 17) src/core/sound.js:87 — soundStreamToWav has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _transfers (cognitive 17) · ×1
  • _transfers (cognitive 17) src/core/operator_list.js:765 — _transfers has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getRanges (cognitive 17) · ×1
  • getRanges (cognitive 17) src/core/fonts.js:542 — getRanges has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _spaceWidth (cognitive 17) · ×1
  • _spaceWidth (cognitive 17) src/core/fonts.js:3511 — _spaceWidth has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generateHuffmanTable (cognitive 17) · ×1
  • generateHuffmanTable (cognitive 17) src/core/flate_stream.js:240 — generateHuffmanTable has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getAnnotationsData (cognitive 17) · ×1
  • getAnnotationsData (cognitive 17) src/core/document.js:738 — getAnnotationsData has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #isValidState (cognitive 16) · ×1
  • #isValidState (cognitive 16) web/pdf_history.js:463 — #isValidState has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #parsePageSize (cognitive 16) · ×1
  • #parsePageSize (cognitive 16) web/pdf_document_properties.js:263 — #parsePageSize has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editAltText (cognitive 16) · ×1
  • editAltText (cognitive 16) web/new_alt_text_manager.js:372 — editAltText has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _initializeMetadata (cognitive 16) · ×1
  • _initializeMetadata (cognitive 16) web/app.js:1896 — _initializeMetadata has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #setPosition (cognitive 16) · ×1
  • #setPosition (cognitive 16) web/alt_text_manager.js:188 — #setPosition has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createValidAbsoluteUrl (cognitive 16) · ×1
  • createValidAbsoluteUrl (cognitive 16) src/shared/util.js:450 — createValidAbsoluteUrl has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AFNumber_Format (cognitive 16) · ×1
  • AFNumber_Format (cognitive 16) src/scripting_api/aform.js:106 — AFNumber_Format has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bind (cognitive 16) · ×1
  • bind (cognitive 16) src/display/font_loader.js:155 — bind has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _prepareSMaskCanvas (cognitive 16) · ×1
  • _prepareSMaskCanvas (cognitive 16) src/display/canvas.js:1246 — _prepareSMaskCanvas has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _bakeSMaskCanvas (cognitive 16) · ×1
  • _bakeSMaskCanvas (cognitive 16) src/display/canvas.js:1373 — _bakeSMaskCanvas has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · complete (cognitive 16) · ×1
  • complete (cognitive 16) src/display/api.js:1561 — complete has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 16) · ×1
  • (anonymous) (cognitive 16) src/display/annotation_layer.js:1596 — (anonymous) has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _parseContent (cognitive 16) · ×1
  • _parseContent (cognitive 16) src/core/xml_parser.js:80 — _parseContent has cognitive 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.
D2 · Cognitive Complexity · mathML (cognitive 16) · ×1
  • mathML (cognitive 16) src/core/struct_tree.js:599 — mathML has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseKid (cognitive 16) · ×1
  • parseKid (cognitive 16) src/core/struct_tree.js:787 — parseKid has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _decodeType6Shading (cognitive 16) · ×1
  • _decodeType6Shading (cognitive 16) src/core/pattern.js:889 — _decodeType6Shading has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _decodeType7Shading (cognitive 16) · ×1
  • _decodeType7Shading (cognitive 16) src/core/pattern.js:1021 — _decodeType7Shading has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _buildFigureFromPatch (cognitive 16) · ×1
  • _buildFigureFromPatch (cognitive 16) src/core/pattern.js:1091 — _buildFigureFromPatch has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · adjustTrueTypeToUnicode (cognitive 16) · ×1
  • adjustTrueTypeToUnicode (cognitive 16) src/core/fonts.js:142 — adjustTrueTypeToUnicode has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generateFont (cognitive 16) · ×1
  • generateFont (cognitive 16) src/core/font_substitutions.js:634 — generateFont has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #removeType3ColorOperators (cognitive 16) · ×1
  • #removeType3ColorOperators (cognitive 16) src/core/evaluator.js:4965 — #removeType3ColorOperators has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getContentStream (cognitive 16) · ×1
  • getContentStream (cognitive 16) src/core/document.js:279 — getContentStream has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #getLinearizationPage (cognitive 16) · ×1
  • #getLinearizationPage (cognitive 16) src/core/document.js:1650 — #getLinearizationPage has cognitive complexity 16 (threshold 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.
D21 · Naming Consistency · LLM evaluation failed · ×1
  • LLM evaluation failed — naming-consistency evaluation failed: Value cannot be null. (Parameter 'json')
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 2 typed · 437 plain JS — the untyped files are extensions/chromium/background.js, extensions/chromium/contentscript.js, extensions/chromium/extension-router.js, extensions/chromium/options/migration.js, extensions/chromium/options/options.js, extensions/chromium/pdfHandler.js (+431 more).
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) src/core/evaluator.js:2058 — src/core/evaluator.js:2058 · src/core/evaluator.js:2097 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×1
  • Duplicated block (19 lines × 2 locations) src/core/xfa/template.js:678 — src/core/xfa/template.js:678 · src/core/xfa/template.js:5346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) src/core/xfa/config.js:316 — src/core/xfa/config.js:316 · src/core/xfa/config.js:757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (16 lines × 4 locations) · ×1
  • Duplicated block (16 lines × 4 locations) src/core/xfa/config.js:147 — src/core/xfa/config.js:147 · src/core/xfa/locale_set.js:52 · src/core/xfa/locale_set.js:164 · src/core/xfa/locale_set.js:203 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (15 lines × 16 locations) · ×1
  • Duplicated block (15 lines × 16 locations) src/core/core_utils.js:67 — src/core/core_utils.js:67 · src/core/xfa/config.js:60 · src/core/xfa/config.js:92 · src/core/xfa/config.js:210 · +12 more site(s) not listed — the 4 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (14 lines × 3 locations) · ×1
  • Duplicated block (14 lines × 3 locations) src/core/xfa/template.js:525 — src/core/xfa/template.js:525 · src/core/xfa/template.js:3684 · src/core/xfa/template.js:4631 — 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.
R2 · Cyclomatic Complexity · Complex function onKeyDown (cyclomatic 120, cognitive 142) · ×1
  • Complex function onKeyDown (cyclomatic 120, cognitive 142) web/app.js:3145 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function checkAndRepair (cyclomatic 112, cognitive 163) · ×1
  • Complex function checkAndRepair (cyclomatic 112, cognitive 163) src/core/fonts.js:1423 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function promiseBody (cyclomatic 110, cognitive 191) · ×1
  • Complex function promiseBody (cyclomatic 110, cognitive 191) src/core/evaluator.js:1730 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function bidi (cyclomatic 95, cognitive 148) · ×1
  • Complex function bidi (cyclomatic 95, cognitive 148) src/core/bidi.js:120 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function decompress (cyclomatic 84, cognitive 228) · ×1
  • Complex function decompress (cyclomatic 84, cognitive 228) external/brotli/decode.js:1214 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function (computed) (cyclomatic 74, cognitive 115) · ×1
  • Complex function (computed) (cyclomatic 74, cognitive 115) src/core/xfa/template.js:2741 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function extractCidKeyedFontProgram (cyclomatic 74, cognitive 68) · ×1
  • Complex function extractCidKeyedFontProgram (cyclomatic 74, cognitive 68) src/core/type1_parser.js:749 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function _makeBinary (cyclomatic 71, cognitive 110) · ×1
  • Complex function _makeBinary (cyclomatic 71, cognitive 110) src/core/postscript/ast.js:988 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function parseDestDictionary (cyclomatic 68, cognitive 121) · ×1
  • Complex function parseDestDictionary (cyclomatic 68, cognitive 121) src/core/catalog.js:1823 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function parse (cyclomatic 68, cognitive 98) · ×1
  • Complex function parse (cyclomatic 68, cognitive 98) src/core/jpg.js:885 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function parse (cyclomatic 65, cognitive 119) · ×1
  • Complex function parse (cyclomatic 65, cognitive 119) src/core/font_renderer.js:382 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function _initializeViewerComponents (cyclomatic 63, cognitive 75) · ×1
  • Complex function _initializeViewerComponents (cyclomatic 63, cognitive 75) web/app.js:414 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function translateFont (cyclomatic 61, cognitive 92) · ×1
  • Complex function translateFont (cyclomatic 61, cognitive 92) src/core/evaluator.js:4451 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function #execOp (cyclomatic 61, cognitive 38) · ×1
  • Complex function #execOp (cyclomatic 61, cognitive 38) src/core/postscript/js_evaluator.js:535 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function sanitizeTTProgram (cyclomatic 60, cognitive 125) · ×1
  • Complex function sanitizeTTProgram (cyclomatic 60, cognitive 125) src/core/fonts.js:2468 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function createImageData (cyclomatic 59, cognitive 93) · ×1
  • Complex function createImageData (cyclomatic 59, cognitive 93) src/core/image.js:715 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function #cloneStructTreeNode (cyclomatic 58, cognitive 121) · ×1
  • Complex function #cloneStructTreeNode (cyclomatic 58, cognitive 121) src/core/editor/pdf_editor.js:556 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function parse (cyclomatic 57, cognitive 94) · ×1
  • Complex function parse (cyclomatic 57, cognitive 94) src/core/xfa/formcalc_parser.js:277 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function execute (cyclomatic 57, cognitive 44) · ×1
  • Complex function execute (cyclomatic 57, cognitive 44) src/core/postscript/js_evaluator.js:326 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R2 · Cyclomatic Complexity · Complex function readCmapTable (cyclomatic 56, cognitive 101) · ×1
  • Complex function readCmapTable (cyclomatic 56, cognitive 101) src/core/fonts.js:1607 — Branch-heavy code is where defects cluster — extract decisions into smaller functions.
R3 · Large Files · Large Files · ×1
  • Large Files — 106 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: src/core/xfa/template.js (5910), src/core/annotation.js (5233), src/core/evaluator.js (5034), src/core/glyphlist.js (4552), src/display/canvas.js (3947), src/display/annotation_layer.js (3933) (+100 more).
R6 · Tooling · Tooling · ×1
  • Tooling — test ✓ · lint ✓ · typecheck ✗
R8 · Dependency Hygiene · Unused dependency 'cached-iterable' · ×1
  • Unused dependency 'cached-iterable' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'caniuse-lite' · ×1
  • Unused dependency 'caniuse-lite' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'core-js' · ×1
  • Unused dependency 'core-js' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Recommendation — 12 finding(s)
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 48 significant file(s) lose their only recent owner: src/core/xfa/xfa_object.js, src/core/xfa/bind.js, src/scripting_api/field.js, src/core/chunked_stream.js, external/cmapscompress/compress.mjs, src/core/fonts_utils.js, web/pdf_document_properties.js, src/core/primitives.js (+40 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 15 significant file(s) lose their only recent owner: web/internal/page_view.js, web/internal/multiline_view.js, src/core/flate_stream.js, src/display/touch_manager.js, src/core/unicode.js, src/display/editor/toolbar.js, src/display/webgpu.js, src/display/editor/ink.js (+7 more). Pair on, review, or document these before any departure.
D11 · Test Reliability · Test reliability not included · ×1
  • Test reliability not included — Test source is present (.ts, .mjs, .js) 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.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • Rotate the exposed credentials — git history can't be un-committed — Some of these secrets are in git HISTORY: deleting the file does not remove them (the commit persists on every clone, fork and backup). The remediation is to ROTATE each historically-exposed credential and treat it as compromised — not to delete the file. Rewriting history is disruptive and unreliable across existing forks. (Working-tree-only secrets — no commit — can instead be removed from the file and moved to a secret store.)
D29 · Static Analysis (SAST) · Static Analysis (SAST) not included (time budget) · ×1
  • Static Analysis (SAST) not included (time budget) — Static Analysis (SAST) couldn't be assessed within its 5-minute budget on a solution this large — not included in this run.
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 2 of 255 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 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). 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 — largest first: extensions/chromium/preserve-referer.js, extensions/chromium/extension-router.js. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · No build provenance · ×1
  • No build provenance — No SLSA provenance generation or build attestation found in CI — nothing binds a released artifact to the build that produced it, so a consumer cannot tell your artifact from a substituted one. On GitHub Actions, `actions/attest-build-provenance` (or slsa-github-generator) emits one from the job's own OIDC identity; elsewhere, run `cosign attest` over the released artifact from the release pipeline and publish the attestation beside it.
D36 · Supply-chain Provenance & Signing · No artifact signing · ×1
  • No artifact signing — No artifact signing found in CI — sign your released artifacts with whatever your ecosystem ships (a GPG/minisign detached signature — or `cosign sign-blob` — over the release archives, or over a checksum file published alongside them, `npm publish --provenance` under GitHub OIDC for npm packages) so consumers can verify what you built.
D36 · Supply-chain Provenance & Signing · No SBOM · ×1
  • No SBOM — No SBOM generation or committed SBOM found — produce one with what your ecosystem ships (`npm sbom --sbom-format cyclonedx` (npm 9+) or `@cyclonedx/cyclonedx-npm` over the lockfile, `syft` (or `anchore/sbom-action` in CI) over the source tree or released image). Publish it as a release asset (`*.spdx.json` / `*.cdx.json`) so consumers can see what they are installing.
D8 · Code Coverage · Coverage not included · ×1
  • Coverage not included — suite not readable by the collector — Coverage NOT READ here — but this repository measures it: a coverage step in CI (`codecov/codecov-action`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.ts, .mjs, .js), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
R10 · Code Duplication · …and 397 more · ×1
  • …and 397 more — 397 further occurrence(s) are not listed individually; the score already reflects all 437.
Info — 2 finding(s)
D12 · Dependency Hygiene · Dependency hygiene not measured · ×1
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene — This repository's dependency manifest (package.json) 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 D38 wherever the manifest is OSV-readable. Your package.json IS read in this same run: the frontend dependency lens (R8) parses it for unused declarations, undeclared imports and misplaced production dependencies — what is missing here is the outdated/deprecated/unmaintained signal for those npm packages, not the manifest.
D22 · Internal API Consistency · No exposed public API · ×1
  • No exposed public API — No intentionally-exposed types (IsPackable or .Contracts) to evaluate.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaksgitleaks detect --no-banner --report-format json --report-path /dev/stdout --exit-code 0 --source .2artifacts/raw/gitleaks-history.json
D30 · Dependency Vulnerabilitiesnone (no readable dependency manifest)none (no readable dependency manifest): not present in this environment0
D31 · IaC & Container Securitytrivytrivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.0
D32 · Data Compliance (PII/GDPR)semgrepsemgrep: not applicable — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.0
D33 · JS/npm Dependency Vulnerabilitiestrivytrivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0
D38 · OSV Dependency Vulnerabilitiesosv-scannerosv-scanner --format json --recursive .0artifacts/raw/osv-scanner.json
D40 · Network Egress Confinementruntime-hardeningruntime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0
D41 · Kernel & Syscall Confinementruntime-hardeningruntime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0
D42 · Runtime Threat Enforcementruntime-hardeningruntime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0

Run 01a00aa2-1ffd-716f-97d0-e160c9bf1e7c · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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